Support force internal navigation parameter
This commit is contained in:
8
bin/cli.ts
vendored
8
bin/cli.ts
vendored
@@ -174,6 +174,14 @@ program
|
||||
.default(DEFAULT.startToTray)
|
||||
.hideHelp(),
|
||||
)
|
||||
.addOption(
|
||||
new Option(
|
||||
'--force-internal-navigation',
|
||||
'Keep every link inside the Pake window instead of opening external handlers',
|
||||
)
|
||||
.default(DEFAULT.forceInternalNavigation)
|
||||
.hideHelp(),
|
||||
)
|
||||
.addOption(
|
||||
new Option('--installer-language <string>', 'Installer language')
|
||||
.default(DEFAULT.installerLanguage)
|
||||
|
||||
1
bin/defaults.ts
vendored
1
bin/defaults.ts
vendored
@@ -30,6 +30,7 @@ export const DEFAULT_PAKE_OPTIONS: PakeCliOptions = {
|
||||
keepBinary: false,
|
||||
multiInstance: false,
|
||||
startToTray: false,
|
||||
forceInternalNavigation: false,
|
||||
};
|
||||
|
||||
// Just for cli development
|
||||
|
||||
2
bin/helpers/merge.ts
vendored
2
bin/helpers/merge.ts
vendored
@@ -73,6 +73,7 @@ export async function mergeConfig(
|
||||
enableDragDrop,
|
||||
multiInstance,
|
||||
startToTray,
|
||||
forceInternalNavigation,
|
||||
} = options;
|
||||
|
||||
const { platform } = process;
|
||||
@@ -96,6 +97,7 @@ export async function mergeConfig(
|
||||
enable_wasm: wasm,
|
||||
enable_drag_drop: enableDragDrop,
|
||||
start_to_tray: startToTray && showSystemTray,
|
||||
force_internal_navigation: forceInternalNavigation,
|
||||
};
|
||||
Object.assign(tauriConf.pake.windows[0], { url, ...tauriConfWindowOptions });
|
||||
|
||||
|
||||
3
bin/types.ts
vendored
3
bin/types.ts
vendored
@@ -96,6 +96,9 @@ export interface PakeCliOptions {
|
||||
|
||||
// Start app minimized to tray, default false
|
||||
startToTray: boolean;
|
||||
|
||||
// Force navigation to stay inside the Pake window even for external links
|
||||
forceInternalNavigation: boolean;
|
||||
}
|
||||
|
||||
export interface PakeAppOptions extends PakeCliOptions {
|
||||
|
||||
Reference in New Issue
Block a user