feat(core): add open link in app to doc menu (#8597)

add "open in desktop app" menu item for editor

fix AF-1547
This commit is contained in:
pengx17
2024-10-29 05:49:49 +00:00
committed by Peng Xiao
parent 5690720652
commit 835fdc33c0
21 changed files with 222 additions and 117 deletions

View File

@@ -41,9 +41,9 @@ const ReleaseTypeSchema = z.enum(['stable', 'beta', 'canary', 'internal']);
const envBuildType = (process.env.BUILD_TYPE || 'canary').trim().toLowerCase();
const buildType = ReleaseTypeSchema.parse(envBuildType);
const isDev = process.env.NODE_ENV === 'development';
let schema =
let scheme =
buildType === 'stable' ? 'affine' : (`affine-${envBuildType}` as Schema);
schema = isDev ? 'affine-dev' : schema;
scheme = isDev ? 'affine-dev' : scheme;
export const appInfo = {
electron: true,
@@ -53,7 +53,7 @@ export const appInfo = {
viewId:
process.argv.find(arg => arg.startsWith('--view-id='))?.split('=')[1] ??
'unknown',
schema,
scheme,
};
function getMainAPIs() {