mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-11 20:08:37 +00:00
feat(electron): add offline mode (#8086)
fix AF-1334
It seems `session.enableNetworkEmulation({ offline: true });` does not work - https://github.com/electron/electron/issues/21250
implemented using an in-house solution.
When turned on:

This commit is contained in:
@@ -96,6 +96,13 @@ export const AFFINE_FLAGS = {
|
||||
configurable: isCanaryBuild,
|
||||
defaultState: isCanaryBuild,
|
||||
},
|
||||
enable_offline_mode: {
|
||||
category: 'affine',
|
||||
displayName: 'Offline Mode',
|
||||
description: 'Enables offline mode.',
|
||||
configurable: isDesktopEnvironment,
|
||||
defaultState: false,
|
||||
},
|
||||
} satisfies { [key in string]: FlagInfo };
|
||||
|
||||
export type AFFINE_FLAGS = typeof AFFINE_FLAGS;
|
||||
|
||||
Reference in New Issue
Block a user