mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-02-05 07:13:23 -08:00
fix: do this in view window
This commit is contained in:
parent
cdd1b8471b
commit
bbe2465cff
2 changed files with 5 additions and 3 deletions
|
|
@ -8,7 +8,7 @@ import './common/log';
|
|||
import './common/remote';
|
||||
import * as service from './common/services';
|
||||
import { ViewChannel } from '@/constants/channels';
|
||||
import { IPossibleWindowMeta } from '@services/windows/WindowProperties';
|
||||
import { IPossibleWindowMeta, WindowNames } from '@services/windows/WindowProperties';
|
||||
import { browserViewMetaData } from './common/browserViewMetaData';
|
||||
import './common/authingPostMessage';
|
||||
import './view';
|
||||
|
|
@ -24,9 +24,9 @@ declare global {
|
|||
}
|
||||
}
|
||||
|
||||
if (browserViewMetaData.windowName === 'main') {
|
||||
if (browserViewMetaData.windowName === WindowNames.view) {
|
||||
// automatically reload page when wifi/network is connected
|
||||
// https://www.electronjs.org/docs/tutorial/online-offline-events
|
||||
// https://www.electronjs.org/docs/latest/tutorial/online-offline-events
|
||||
const handleOnlineOffline = (): void => {
|
||||
void ipcRenderer.invoke(ViewChannel.onlineStatusChanged, window.navigator.onLine);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ export enum WindowNames {
|
|||
addWorkspace = 'addWorkspace',
|
||||
auth = 'auth',
|
||||
editWorkspace = 'editWorkspace',
|
||||
/** Window with workspace list and new wiki button on left side bar */
|
||||
main = 'main',
|
||||
menuBar = 'menuBar',
|
||||
newWindow = 'newWindow',
|
||||
notifications = 'notifications',
|
||||
preferences = 'preferences',
|
||||
spellcheck = 'spellcheck',
|
||||
/** browserView that loads the wiki webpage */
|
||||
view = 'view',
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue