Skip to content

Commit

Permalink
fix: change current theme for imported themes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xyphyn committed Jul 25, 2024
1 parent e40d3c5 commit 079d6f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/ui/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,13 @@ if (browser) {
if (oldColors) {
themeData.update((td) => ({
...td,
currentTheme: Math.max(...td.themes.map((t) => t.id)) + 1,
themes: [
...td.themes,
{
id: Math.max(...td.themes.map((t) => t.id)) + 1,
colors: JSON.parse(oldColors),
name: t.get('routes.theme.preset.imported') ?? 'Your Theme',
name: t.get('routes.theme.preset.imported') || 'Your Theme',
},
],
}))
Expand Down

0 comments on commit 079d6f5

Please sign in to comment.