diff --git a/src/routes/(app)/config/settings/+page.svelte b/src/routes/(app)/config/settings/+page.svelte index 2e33e63d..e7328e26 100644 --- a/src/routes/(app)/config/settings/+page.svelte +++ b/src/routes/(app)/config/settings/+page.svelte @@ -40,100 +40,52 @@ - - {$LL.backup.TITLE()} - {$LL.backup.AUTO_BACKUP()} - - {$LL.backup.DISCLAIMER()} - - - downloadFile(createChordBackup())}> - piano - {$LL.configure.chords.TITLE()} - - downloadFile(createLayoutBackup())}> - keyboard - {$LL.configure.layout.TITLE()} - - downloadFile(createSettingsBackup())}> - settings - Settings - - - - download{$LL.backup.DOWNLOAD()} - settings_backup_restore{$LL.backup.RESTORE()} - - - - - Device + + {#if $deviceMeta} + {#each $deviceMeta?.settings as category} + {titlecase(category.name)} + {/each} + {/if} + Backup + + {$LL.deviceManager.AUTO_CONNECT()} - {#if $serialPort} - {#if $deviceMeta?.factoryDefaults?.settings} - restoreFromFile($deviceMeta.factoryDefaults!.settings)} - >reset_settingsReset Settings - {/if} - Recovery... - {/if} - - {#if $deviceMeta} - {#each $deviceMeta.settings as category} - - - {#if category.items[0]?.name === "enable"} - {titlecase(category.name)} - {:else} + {#if $deviceMeta} + {#each $deviceMeta.settings as category} + + {titlecase(category.name)} + + {#if category.description} + {category.description} {/if} - - {#if category.description} - {category.description} - {/if} - {#each category.items as item} - {#if item.name !== "enable"} + {#each category.items as item} {#if item.unit === "H"} Color {:else if item.unit !== "S" && item.unit !== "B"} - {#if item.enum} - + {#each item.enum as name, value} {titlecase(name)} {/each} {:else if item.range[0] === 0 && item.range[1] === 1} - + {:else} - + {item.unit} + />{item.unit} + {/if} + {titlecase(item.name)} {#if item.description} - {titlecase(item.name)} - {item.description} - {:else} - {titlecase(item.name)} + {item.description} {/if} {/if} - {/if} - {/each} - - {/each} - {/if} + {/each} + + {/each} + {/if} + + + {$LL.backup.TITLE()} + {$LL.backup.AUTO_BACKUP()} + + {$LL.backup.DISCLAIMER()} + + + downloadFile(createChordBackup())}> + piano + {$LL.configure.chords.TITLE()} + + downloadFile(createLayoutBackup())}> + keyboard + {$LL.configure.layout.TITLE()} + + downloadFile(createSettingsBackup())}> + settings + Settings + + + + download{$LL.backup.DOWNLOAD()} + settings_backup_restore{$LL.backup.RESTORE()} + + + + +
- {$LL.backup.DISCLAIMER()} -
{category.description}
{item.description}
+ {$LL.backup.DISCLAIMER()} +