feat(ui): Terrakotta Nacht replaces Soft, smooth menus and sliding notes on phones
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m21s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m21s
- dark counterpart of Terrakotta; Soft users move to it - add tailwindcss-animate: the existing animate-in/fade/slide classes now run; menus zoom in, sheets slide up, notes slide in on phones - no animations with reduced motion chore(release): v0.13.0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8d93bdc3b8
commit
2c9b4762fc
15 files changed
+148
-89
No files matched your search
@@ -65,3 +65,21 @@ describe('custom themes', () => {
|
||||
expect(document.documentElement.classList.contains('dark')).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('built-in themes', () => {
|
||||
beforeEach(() => localStorage.clear());
|
||||
|
||||
it('moves removed themes to their successors', () => {
|
||||
localStorage.setItem('mindsift_active_theme', 'soft');
|
||||
expect(getActiveTheme()).toBe('terracotta-night');
|
||||
localStorage.setItem('mindsift_active_theme', 'high-contrast');
|
||||
expect(getActiveTheme()).toBe('dark');
|
||||
});
|
||||
|
||||
it('treats Terrakotta as a light theme and Terrakotta Nacht as dark', () => {
|
||||
setActiveTheme('terracotta');
|
||||
expect(document.documentElement.classList.contains('dark')).toBe(false);
|
||||
setActiveTheme('terracotta-night');
|
||||
expect(document.documentElement.classList.contains('dark')).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -58,14 +58,14 @@ export const AVAILABLE_THEMES: ThemeOption[] = [
|
||||
isRounded: true,
|
||||
},
|
||||
{
|
||||
id: 'soft',
|
||||
name: 'Soft Slate (Abgerundet)',
|
||||
subtitle: 'Schiefer-Blau mit weichen Radien (10px)',
|
||||
file: 'src/themes/theme-soft.css',
|
||||
previewBg: '#0f172a',
|
||||
previewPanel: '#1e293b',
|
||||
previewAccent: '#3b82f6',
|
||||
previewText: '#f8fafc',
|
||||
id: 'terracotta-night',
|
||||
name: 'Terrakotta Nacht (Glut)',
|
||||
subtitle: 'Espresso, Creme & glühende Terrakotta (12px)',
|
||||
file: 'src/themes/theme-terracotta-night.css',
|
||||
previewBg: '#17110d',
|
||||
previewPanel: '#211913',
|
||||
previewAccent: '#e8794a',
|
||||
previewText: '#f3e8da',
|
||||
isRounded: true,
|
||||
},
|
||||
{
|
||||
@@ -188,8 +188,12 @@ function load(key: string): string | null {
|
||||
}
|
||||
}
|
||||
|
||||
// Removed themes and their successors
|
||||
const RETIRED_THEMES: Record<string, ThemeId> = { soft: 'terracotta-night', 'high-contrast': 'dark' };
|
||||
|
||||
export function getActiveTheme(): ThemeId {
|
||||
const saved = load(THEME_STORAGE_KEY);
|
||||
const stored = load(THEME_STORAGE_KEY);
|
||||
const saved = stored && RETIRED_THEMES[stored] ? RETIRED_THEMES[stored] : stored;
|
||||
if (saved && AVAILABLE_THEMES.some((t) => t.id === saved)) return saved;
|
||||
if (saved && isCustomThemeId(saved) && load(CUSTOM_CSS_CACHE_KEY)) return saved;
|
||||
return 'dark';
|
||||
|
||||
Reference in new issue
Block a user