feat: add name editing

This commit is contained in:
Xylight committed 2024-07-25 11:49:54 -07:00
1 parent 926af69ec5
commit 9c9e5dff76
4 files changed
+44 -6

No files matched your search

+2 -2
View File
@@ -61,14 +61,14 @@
gap-4 overflow-auto max-h-72"
>
{#each $themeData.themes as theme}
<ThemePreset {theme} />
<ThemePreset bind:theme />
{/each}
<button
on:click={() => {
const newTheme = {
id: Math.max(...$themeData.themes.map((t) => t.id)) + 1,
colors: getDefaultColors(),
name: `New Theme`,
name: $t('routes.theme.preset.new'),
}
$themeData.themes = [...$themeData.themes, newTheme]