✨ Support setting navigation bar title
This commit is contained in:
12
bin/README.md
vendored
12
bin/README.md
vendored
@@ -224,6 +224,18 @@ Hide the window instead of exiting when clicking the close button. Default is `t
|
||||
--hide-on-close
|
||||
```
|
||||
|
||||
#### [title]
|
||||
|
||||
Set the window title bar text. If not specified, the window title will be empty.
|
||||
|
||||
```shell
|
||||
--title <string>
|
||||
|
||||
# Examples:
|
||||
--title "My Application"
|
||||
--title "Google Translate"
|
||||
```
|
||||
|
||||
#### [incognito]
|
||||
|
||||
Launch the application in incognito/private browsing mode. Default is `false`. When enabled, the webview will run in private mode, which means it won't store cookies, local storage, or browsing history. This is useful for privacy-sensitive applications.
|
||||
|
||||
12
bin/README_CN.md
vendored
12
bin/README_CN.md
vendored
@@ -232,6 +232,18 @@ pake [url] [options]
|
||||
--incognito
|
||||
```
|
||||
|
||||
#### [title]
|
||||
|
||||
设置窗口标题栏文本。如果未指定,窗口标题将为空。
|
||||
|
||||
```shell
|
||||
--title <string>
|
||||
|
||||
# 示例:
|
||||
--title "我的应用"
|
||||
--title "音乐播放器"
|
||||
```
|
||||
|
||||
#### [installer-language]
|
||||
|
||||
设置 Windows 安装包语言。支持 `zh-CN`、`ja-JP`,更多在 [Tauri 文档](https://tauri.app/distribute/windows-installer/#internationalization)。默认为 `en-US`。
|
||||
|
||||
1
bin/cli.ts
vendored
1
bin/cli.ts
vendored
@@ -128,6 +128,7 @@ program
|
||||
.default(DEFAULT.hideOnClose)
|
||||
.hideHelp(),
|
||||
)
|
||||
.addOption(new Option('--title <string>', 'Window title').hideHelp())
|
||||
.addOption(
|
||||
new Option('--incognito', 'Launch app in incognito/private mode').default(
|
||||
DEFAULT.incognito,
|
||||
|
||||
2
bin/helpers/merge.ts
vendored
2
bin/helpers/merge.ts
vendored
@@ -34,6 +34,7 @@ export async function mergeConfig(
|
||||
installerLanguage,
|
||||
hideOnClose,
|
||||
incognito,
|
||||
title,
|
||||
} = options;
|
||||
|
||||
const { platform } = process;
|
||||
@@ -51,6 +52,7 @@ export async function mergeConfig(
|
||||
disabled_web_shortcuts: disabledWebShortcuts,
|
||||
hide_on_close: hideOnClose,
|
||||
incognito: incognito,
|
||||
title: title || null,
|
||||
};
|
||||
Object.assign(tauriConf.pake.windows[0], { url, ...tauriConfWindowOptions });
|
||||
|
||||
|
||||
3
bin/types.ts
vendored
3
bin/types.ts
vendored
@@ -6,6 +6,9 @@ export interface PakeCliOptions {
|
||||
// Application name
|
||||
name?: string;
|
||||
|
||||
// Window title (supports Chinese characters)
|
||||
title?: string;
|
||||
|
||||
// Application icon
|
||||
icon: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user