mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-02-25 09:30:54 -08:00
parent
80510ce5e9
commit
eff4cd5a2a
2 changed files with 8 additions and 4 deletions
|
|
@ -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 (
|
||||
<>
|
||||
<InnerContentRoot>
|
||||
|
|
@ -36,7 +38,8 @@ export function Guide(): JSX.Element {
|
|||
)}
|
||||
</InnerContentRoot>
|
||||
<Languages languageSelectorOnly />
|
||||
<TiddlyWiki />
|
||||
<TiddlyWiki requestRestartCountDown={requestRestartCountDown} />
|
||||
{RestartSnackbar}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<BrowserWindowConstructorOptions> = {};
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue