fix(env): is mobile flag (#8005)

only 'mobile' entry has isMobile = true flag
This commit is contained in:
EYHN
2024-09-04 09:21:36 +00:00
parent 53886a7cd3
commit 2524491bd1
78 changed files with 169 additions and 205 deletions
+2 -2
View File
@@ -44,7 +44,7 @@ export const dateFormatOptions: DateFormats[] = [
];
const appSettingBaseAtom = atomWithStorage<AppSetting>('affine-settings', {
clientBorder: environment.isDesktop && !environment.isWindows,
clientBorder: environment.isElectron && !environment.isWindows,
windowFrameStyle: 'frameless',
dateFormat: dateFormatOptions[0],
startWeekOnMonday: false,
@@ -61,7 +61,7 @@ type SetStateAction<Value> = Value | ((prev: Value) => Value);
const appSettingEffect = atomEffect(get => {
const settings = get(appSettingBaseAtom);
// some values in settings should be synced into electron side
if (environment.isDesktop) {
if (environment.isElectron) {
logger.debug('sync settings to electron', settings);
// this api type in @affine/electron-api, but it is circular dependency this package, use any here
(window as any).apis?.updater
@@ -1,7 +1,7 @@
import type { FlagInfo } from './types';
const isNotStableBuild = runtimeConfig.appBuildType !== 'stable';
const isDesktopEnvironment = environment.isDesktop;
const isDesktopEnvironment = environment.isElectron;
const isCanaryBuild = runtimeConfig.appBuildType === 'canary';
export const AFFINE_FLAGS = {