feat: upgrade app to svelte-5
This commit is contained in:
@ -38,9 +38,9 @@
|
||||
updateSettings($settings);
|
||||
}
|
||||
|
||||
manager.on("settings", (settings) => {
|
||||
settingTypes = settings.types;
|
||||
$settings = settings.values;
|
||||
manager.on("settings", (_settings) => {
|
||||
settingTypes = _settings.types;
|
||||
settings.set(_settings.values);
|
||||
});
|
||||
|
||||
manager.on("result", (result) => {
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
<div class="wrapper">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr on:click={() => ($open.runtime = !$open.runtime)}>
|
||||
<td>{$open.runtime ? "-" : "+"} runtime </td>
|
||||
<td>{humanizeDuration(runtime || 1000)}</td>
|
||||
@ -61,6 +62,7 @@
|
||||
<td>faces </td>
|
||||
<td>{humanizeNumber(faces || 0)}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
|
||||
type Button = { type: "button"; label?: string; callback: () => void };
|
||||
|
||||
type Input = NodeInput | Button;
|
||||
type InputType = NodeInput | Button;
|
||||
|
||||
interface Nested {
|
||||
[key: string]: (Nested & { __title?: string }) | Input;
|
||||
[key: string]: (Nested & { __title?: string }) | InputType;
|
||||
}
|
||||
|
||||
export let id: string;
|
||||
@ -24,7 +24,7 @@
|
||||
export let depth = 0;
|
||||
|
||||
const keys = Object.keys(settings).filter((key) => key !== "__title");
|
||||
function isNodeInput(v: Input | Nested): v is Input {
|
||||
function isNodeInput(v: InputType | Nested): v is InputType {
|
||||
return v && "type" in v;
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user