diff --git a/src/pages/Guide/index.tsx b/src/pages/Guide/index.tsx index 9d8eba3e..c985c311 100644 --- a/src/pages/Guide/index.tsx +++ b/src/pages/Guide/index.tsx @@ -10,6 +10,7 @@ import { Languages } from '../Preferences/sections/Languages'; import { TiddlyWiki } from '../Preferences/sections/TiddlyWiki'; import { NewUserMessage } from './NewUserMessage'; import { useAutoCreateFirstWorkspace } from './useAutoCreateFirstWorkspace'; +import { useRestartSnackbar } from '@/components/RestartSnackbar'; const InnerContentRoot = styled.div` flex: 1; @@ -27,6 +28,7 @@ export function Guide(): JSX.Element { const [wikiCreationMessage, wikiCreationMessageSetter] = useState(''); useAutoCreateFirstWorkspace(workspacesList, wikiCreationMessageSetter); const preferences = usePreferenceObservable(); + const [requestRestartCountDown, RestartSnackbar] = useRestartSnackbar(); return ( <> @@ -36,7 +38,8 @@ export function Guide(): JSX.Element { )} - + + {RestartSnackbar} ); } diff --git a/src/services/windows/index.ts b/src/services/windows/index.ts index 450d182e..4c4b1594 100644 --- a/src/services/windows/index.ts +++ b/src/services/windows/index.ts @@ -135,6 +135,7 @@ export class Window implements IWindowService { } // create new window + const { hideMenuBar: autoHideMenuBar, titleBar: showTitleBar, menuBarAlwaysOnTop, alwaysOnTop } = await this.preferenceService.getPreferences(); let windowWithBrowserViewConfig: Partial = {}; let windowWithBrowserViewState: windowStateKeeperState | undefined; const WindowToKeepPositionState = [WindowNames.main, WindowNames.menuBar]; @@ -161,10 +162,10 @@ export class Window implements IWindowService { maximizable: true, minimizable: true, fullscreenable: true, - autoHideMenuBar: false, + autoHideMenuBar, // hide titleBar should not take effect on setting window - titleBarStyle: ![WindowNames.main, WindowNames.menuBar].includes(windowName) || (await this.preferenceService.get('titleBar')) ? 'default' : 'hidden', - alwaysOnTop: windowName === WindowNames.menuBar ? await this.preferenceService.get('menuBarAlwaysOnTop') : await this.preferenceService.get('alwaysOnTop'), + titleBarStyle: (![WindowNames.main, WindowNames.menuBar].includes(windowName) || showTitleBar) ? 'default' : 'hidden', + alwaysOnTop: windowName === WindowNames.menuBar ? menuBarAlwaysOnTop : alwaysOnTop, webPreferences: { devTools: !isTest, nodeIntegration: false,