Files
Folo/packages/internal/shared/src/constants.ts
T
Innei 4d746522f1 refactor: remove unused files and clean up project structure
- Deleted obsolete configuration files and unused components across various packages.
- Updated package.json files to reflect the removal of dependencies.
- Cleaned up code by removing unnecessary exports and unused imports in multiple modules.

Signed-off-by: Innei <tukon479@gmail.com>
2025-04-28 20:58:51 +08:00

39 lines
970 B
TypeScript

import type { ElectronAPI } from "@electron-toolkit/preload"
declare const globalThis: {
window: Window & {
electron?: ElectronAPI
api?: { canWindowBlur: boolean }
}
electron?: ElectronAPI
}
export enum ModeEnum {
development = "development",
staging = "staging",
production = "production",
}
export const MODE = import.meta.env.MODE as ModeEnum
export const { PROD } = import.meta.env
export const DEV =
"process" in globalThis ? process.env.NODE_ENV === "development" : import.meta.env.DEV
export const APP_PROTOCOL = DEV ? "follow-dev" : "follow"
export const DEEPLINK_SCHEME = `${APP_PROTOCOL}://` as const
export const SYSTEM_CAN_UNDER_BLUR_WINDOW = globalThis?.window?.electron
? globalThis?.window.api?.canWindowBlur
: false
export const IN_ELECTRON = !!globalThis["electron"]
declare const ELECTRON: boolean
/**
* Current build type for electron
*/
export const ELECTRON_BUILD = !!ELECTRON
export const WEB_BUILD = !ELECTRON