Skip to content

Commit 8fd2b9a

Browse files
authored
Merge branch 'tw93:main' into main
2 parents 0d04362 + 949b891 commit 8fd2b9a

15 files changed

Lines changed: 156 additions & 55 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
name_zh: ${{ matrix.config.name_zh }}
9797
url: ${{ matrix.config.url }}
9898
icon: ${{ matrix.config.icon }}
99+
new_window: ${{ matrix.config.new_window || false }}
99100

100101
# Publish Docker image (runs in parallel with app builds)
101102
publish-docker:

.github/workflows/single-app.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ on:
2626
icon:
2727
description: "App Icon"
2828
required: false
29+
new_window:
30+
description: "Allow sites to open new windows"
31+
required: false
32+
default: false
2933
workflow_call:
3034
inputs:
3135
name:
@@ -52,6 +56,11 @@ on:
5256
description: "App Icon"
5357
type: string
5458
required: false
59+
new_window:
60+
description: "Allow sites to open new windows"
61+
type: boolean
62+
required: false
63+
default: false
5564
secrets:
5665
PAKE_SIGNING_IDENTITY:
5766
required: false
@@ -174,6 +183,10 @@ jobs:
174183
ARGS+=("--icon" "src-tauri/png/${{ inputs.name }}_512.png")
175184
fi
176185
186+
if [ "${{ inputs.new_window }}" = "true" ]; then
187+
ARGS+=("--new-window")
188+
fi
189+
177190
# Build once with multiple targets (faster than separate builds)
178191
node dist/cli.js "${ARGS[@]}" --targets deb,appimage
179192
@@ -217,6 +230,10 @@ jobs:
217230
ARGS+=("--icon" "src-tauri/icons/${{ inputs.name }}.icns")
218231
fi
219232
233+
if [ "${{ inputs.new_window }}" = "true" ]; then
234+
ARGS+=("--new-window")
235+
fi
236+
220237
node dist/cli.js "${ARGS[@]}" --targets universal --multi-arch
221238
222239
mkdir -p output/macos
@@ -282,6 +299,10 @@ jobs:
282299
$args += "--icon", "src-tauri\png\${{ inputs.name }}_256.ico"
283300
}
284301
302+
if ("${{ inputs.new_window }}" -eq "true") {
303+
$args += "--new-window"
304+
}
305+
285306
$args += "--targets", "x64"
286307
287308
node dist/cli.js $args

.gitignore

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,45 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
pnpm-debug.log*
8-
lerna-debug.log*
9-
10-
node_modules
11-
dist-ssr
12-
*.local
131

14-
# Editor directories and files
15-
.vscode
16-
.idea
2+
!dist/.gitkeep
3+
!dist/about_pake.html
4+
!dist/cli.js
5+
.claude/
176
.DS_Store
18-
*.suo
19-
*.ntvs*
20-
*.njsproj
21-
*.sln
22-
*.sw?
23-
output
24-
*.msi
7+
.idea
8+
.next
9+
.vscode
10+
*.app
11+
*.AppImage
2512
*.deb
2613
*.desktop
27-
*.AppImage
2814
*.dmg
29-
*.app
30-
31-
dist
32-
!dist/about_pake.html
33-
!dist/cli.js
34-
!dist/.gitkeep
35-
src-tauri/.cargo/config.toml
36-
src-tauri/.cargo/
37-
.next
38-
src-tauri/.pake/
39-
src-tauri/gen
15+
*.local
16+
*.log
17+
*.msi
18+
*.njsproj
19+
*.ntvs*
20+
*.sln
21+
*.suo
22+
*.sw?
4023
*.tmp
41-
4224
# AI assistant docs (do not commit)
43-
.claude/
44-
AGENTS.md
25+
# AI Assistant files
26+
# Editor directories and files
27+
# Logs
4528
AGENT.md
29+
AGENTS.md
4630
CLAUDE.md
31+
dist
32+
dist-ssr
33+
journal/
34+
lerna-debug.log*
35+
logs
36+
node_modules
37+
npm-debug.log*
38+
output
39+
pnpm-debug.log*
40+
src-tauri/.cargo/
41+
src-tauri/.cargo/config.toml
42+
src-tauri/.pake/
43+
src-tauri/gen
44+
yarn-debug.log*
45+
yarn-error.log*

bin/helpers/cli-program.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ ${green('|_| \\__,_|_|\\_\\___| can turn any webpage into a desktop app with
238238
.hideHelp(),
239239
)
240240
.addOption(
241-
new Option('--new-window', 'Allow new window for third-party login')
241+
new Option(
242+
'--new-window',
243+
'Allow sites to open new windows (for auth flows, tabs, branches)',
244+
)
242245
.default(DEFAULT.newWindow)
243246
.hideHelp(),
244247
)

bin/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export interface PakeCliOptions {
121121
// Turn on rapid build mode (app only, no dmg/deb/msi), good for debugging
122122
iterativeBuild: boolean;
123123

124-
// Allow new window for third-party login, default false
124+
// Allow sites to open new windows, default false
125125
newWindow: boolean;
126126

127127
// Auto-install app to /Applications (macOS) after build, default false

default_app_list.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
"name": "chatgpt",
4646
"title": "ChatGPT",
4747
"name_zh": "ChatGPT",
48-
"url": "https://chatgpt.com/"
48+
"url": "https://chatgpt.com/",
49+
"new_window": true
4950
},
5051
{
5152
"name": "flomo",

dist/cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2231,7 +2231,7 @@ ${green('|_| \\__,_|_|\\_\\___| can turn any webpage into a desktop app with
22312231
.addOption(new Option('--iterative-build', 'Turn on rapid build mode (app only, no dmg/deb/msi), good for debugging')
22322232
.default(DEFAULT_PAKE_OPTIONS.iterativeBuild)
22332233
.hideHelp())
2234-
.addOption(new Option('--new-window', 'Allow new window for third-party login')
2234+
.addOption(new Option('--new-window', 'Allow sites to open new windows (for auth flows, tabs, branches)')
22352235
.default(DEFAULT_PAKE_OPTIONS.newWindow)
22362236
.hideHelp())
22372237
.option('--install', 'Auto-install app to /Applications (macOS) after build and remove local bundle', DEFAULT_PAKE_OPTIONS.install)

docs/cli-usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ Ignore TLS certificate validation errors when loading the target URL. Useful for
528528

529529
#### [new-window]
530530

531-
Allow new window for third-party login authorization.
531+
Allow sites to open new windows, such as authentication popups, extra tabs, or branch views.
532532

533533
```shell
534534
--new-window

docs/cli-usage_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ pake ./my-app/index.html --name "my-app" --use-local-file
526526

527527
#### [new-window]
528528

529-
允许弹出新窗口,适用于第三方登录授权
529+
允许网站打开新窗口,例如登录授权弹窗、额外标签页或分支会话页面
530530

531531
```shell
532532
--new-window

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)