cleaning up javascript code

This commit is contained in:
2025-07-29 09:01:37 +02:00
parent 89abbf5c62
commit 90a936b07f
13 changed files with 138 additions and 114 deletions

View File

@@ -1,19 +1,19 @@
<script>
import { activeField } from './field_sync.svelte.js';
import { t } from '../translations.svelte.js';
import { t } from '../translations.svelte.js';
let {
editable = false,
onclick = evt => {},
onSet = newVal => {return true;},
type = 'div',
value = $bindable(null)
onclick = evt => {},
onSet = newVal => {return true;},
type = 'div',
value = $bindable(null)
} = $props();
let editing = $state(false);
let editing = $state(false);
let editValue = $state(value);
let timer = null;
let start = 0;
let timer = null;
let start = 0;
async function applyEdit(){
let success = await onSet(editValue);
@@ -22,7 +22,7 @@
}
function resetEdit(){
editing = false;
editing = false;
editValue = value;
}