mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
fix(electron): window only ui (#2926)
This commit is contained in:
18
packages/env/src/global.ts
vendored
18
packages/env/src/global.ts
vendored
@@ -35,6 +35,8 @@ declare global {
|
||||
events: any;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-var
|
||||
var platform: Platform | undefined;
|
||||
// eslint-disable-next-line no-var
|
||||
var environment: Environment;
|
||||
// eslint-disable-next-line no-var
|
||||
@@ -96,6 +98,22 @@ const { publicRuntimeConfig: config } = getConfig() as {
|
||||
|
||||
publicRuntimeConfigSchema.parse(config);
|
||||
|
||||
export const platformSchema = z.enum([
|
||||
'aix',
|
||||
'android',
|
||||
'darwin',
|
||||
'freebsd',
|
||||
'haiku',
|
||||
'linux',
|
||||
'openbsd',
|
||||
'sunos',
|
||||
'win32',
|
||||
'cygwin',
|
||||
'netbsd',
|
||||
]);
|
||||
|
||||
export type Platform = z.infer<typeof platformSchema>;
|
||||
|
||||
type BrowserBase = {
|
||||
/**
|
||||
* @example https://app.affine.pro
|
||||
|
||||
Reference in New Issue
Block a user