feat(demo): start the demo in the round Fjord Night theme
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m44s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m44s
A visitor without a chosen theme on this device sees the demo in fjord-night instead of the square default; a chosen theme stays and real installations are unchanged. Release v0.27.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
68bc4d279c
commit
9ed63281ed
7 files changed
+29
-6
No files matched your search
@@ -42,6 +42,8 @@ import {
|
||||
AVAILABLE_THEMES,
|
||||
customThemeOption,
|
||||
initThemeOnBoot,
|
||||
hasChosenTheme,
|
||||
DEMO_THEME,
|
||||
watchSystemScheme,
|
||||
isCustomThemeId,
|
||||
setActiveTheme as applyTheme,
|
||||
@@ -595,6 +597,13 @@ export const App: React.FC = () => {
|
||||
);
|
||||
}, [authStatus.demoMode, authStatus.demoResetInSeconds]);
|
||||
|
||||
// Demo: first visit on this device starts with a round theme instead of the square default
|
||||
useEffect(() => {
|
||||
if (!authStatus.demoMode || hasChosenTheme()) return;
|
||||
applyTheme(DEMO_THEME);
|
||||
setActiveThemeState(DEMO_THEME);
|
||||
}, [authStatus.demoMode]);
|
||||
|
||||
// Web Share Target: import shared thoughts from external apps
|
||||
useEffect(() => {
|
||||
if (!user) return;
|
||||
|
||||
Reference in new issue
Block a user