Fixed scene edit duration input not properly synchronizing with edit deltas.

This commit is contained in:
DebaucheryLibrarian 2024-10-06 23:54:54 +02:00
parent bd2a1e4514
commit 50b2fa02ca
1 changed files with 6 additions and 10 deletions

View File

@ -129,31 +129,31 @@
<input <input
type="number" type="number"
class="input" class="input"
:value="item.value[0]" :value="edits[item.key]?.[0] ?? item.value[0]"
min="0" min="0"
max="100" max="100"
:disabled="!editing.has(item.key)" :disabled="!editing.has(item.key)"
@input="setDuration('h', $event)" @change="setDuration('h', $event)"
>H >H
<input <input
type="number" type="number"
class="input" class="input"
:value="item.value[1]" :value="edits[item.key]?.[1] ?? item.value[1]"
min="0" min="0"
max="59" max="59"
:disabled="!editing.has(item.key)" :disabled="!editing.has(item.key)"
@input="setDuration('m', $event)" @change="setDuration('m', $event)"
>M >M
<input <input
type="number" type="number"
class="input" class="input"
:value="item.value[2]" :value="edits[item.key]?.[2] ?? item.value[2]"
min="0" min="0"
max="59" max="59"
:disabled="!editing.has(item.key)" :disabled="!editing.has(item.key)"
@input="setDuration('s', $event)" @change="setDuration('s', $event)"
>S >S
</div> </div>
</div> </div>
@ -214,8 +214,6 @@ const pageContext = inject('pageContext');
const user = pageContext.user; const user = pageContext.user;
const scene = ref(pageContext.pageProps.scene); const scene = ref(pageContext.pageProps.scene);
// console.log(scene);
const fields = computed(() => [ const fields = computed(() => [
{ {
key: 'actors', key: 'actors',
@ -298,8 +296,6 @@ function toggleField(item) {
function setValue(item, event) { function setValue(item, event) {
edits.value[item.key] = event.target.value; edits.value[item.key] = event.target.value;
console.log(edits.value);
} }
const timeUnits = ['h', 'm', 's']; const timeUnits = ['h', 'm', 's'];