Skip to content

Commit 71b257c

Browse files
committed
chore: allowlist
1 parent 0c0197f commit 71b257c

File tree

8 files changed

+148
-177
lines changed

8 files changed

+148
-177
lines changed

Cargo.lock

+109-167
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UPDATE_LOG.md

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
**New repository: https://github.com/lencx/nofwl**
1515

16-
<img width="250" src="https://user-images.githubusercontent.com/16164244/219439614-d5c3710c-e0b3-4df9-9b3c-c150ba0ba5f1.png" />
17-
1816
## v0.11.0
1917

2018
Fix:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@
7676
"vite-tsconfig-paths": "^4.0.2"
7777
},
7878
"engines": {
79-
"node": "^14.18.0 || ^16.0.0"
79+
"node": "^14.18.0 || ^16.0.0 || ^18.0.0"
8080
}
8181
}

src-tauri/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ wry = "0.24.1"
2626
dark-light = "1.0.0"
2727
serde = { version = "1.0", features = ["derive"] }
2828
tokio = { version = "1.23.0", features = ["macros"] }
29-
tauri = { version = "1.2.4", features = ["api-all", "devtools", "global-shortcut", "system-tray", "updater"] }
30-
tauri-plugin-positioner = { version = "1.0.4", features = ["system-tray"] }
29+
tauri = { version = "1.2.4", features = ["devtools", "fs-create-dir", "fs-exists", "fs-read-dir", "fs-read-file", "fs-remove-dir", "fs-remove-file", "fs-write-file", "global-shortcut", "global-shortcut-all", "os-all", "path-all", "process-all", "shell-open-api", "system-tray", "updater"] }
30+
tauri-plugin-positioner = { git = "https://github.com/lencx/tauri-plugins-workspace", features = ["system-tray"] }
3131
tauri-plugin-log = { git = "https://github.com/lencx/tauri-plugins-workspace", branch = "dev", features = ["colored"] }
3232
tauri-plugin-autostart = { git = "https://github.com/lencx/tauri-plugins-workspace", branch = "dev" }
3333
tauri-plugin-window-state = { git = "https://github.com/lencx/tauri-plugins-workspace", branch = "dev" }

src-tauri/src/scripts/cmd.js

+7
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ async function cmdTip() {
166166
// Enter a command starting with `/` and press a space to automatically fill `chatgpt prompt`.
167167
// If more than one command appears in the search results, the first one will be used by default.
168168
function cmdKeydown(event) {
169+
169170
if (!window.__CHAT_MODEL_CMD_PROMPT__) {
170171
return;
171172
}
@@ -245,8 +246,14 @@ async function cmdTip() {
245246
searchInput.value = window.__CHAT_MODEL_CMD_PROMPT__;
246247

247248
initDom();
249+
248250
event.preventDefault();
249251
}
252+
253+
if (event.keyCode === 13 && __TAURI_METADATA__.__currentWindow.label === 'tray') {
254+
const btn = document.querySelector('form button');
255+
if (btn) btn.click();
256+
}
250257
}
251258
searchInput.removeEventListener('keydown', cmdKeydown, { capture: true });
252259
searchInput.addEventListener('keydown', cmdKeydown, { capture: true });

src-tauri/src/scripts/export.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// *** Core Script - Export ***
22

33
async function init() {
4+
if (window.location.pathname === '/auth/login') return;
45
const buttonOuterHTMLFallback = `<button class="btn flex justify-center gap-2 btn-neutral" id="download-png-button">Try Again</button>`;
56
removeButtons();
67
if (window.buttonsInterval) {

src-tauri/tauri.conf.json

+22-3
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,38 @@
77
},
88
"package": {
99
"productName": "ChatGPT",
10-
"version": "0.11.0"
10+
"version": "0.11.99"
1111
},
1212
"tauri": {
1313
"allowlist": {
14-
"all": true,
14+
"all": false,
1515
"globalShortcut": {
1616
"all": true
1717
},
1818
"fs": {
19-
"all": true,
19+
"all": false,
20+
"readFile": true,
21+
"writeFile": true,
22+
"readDir": true,
23+
"createDir": true,
24+
"exists": true,
25+
"removeFile": true,
26+
"removeDir": true,
2027
"scope": [
2128
"$HOME/.chatgpt/**"
2229
]
30+
},
31+
"path": {
32+
"all": true
33+
},
34+
"os": {
35+
"all": true
36+
},
37+
"process": {
38+
"all": true,
39+
"exit": true,
40+
"relaunch": true,
41+
"relaunchDangerousAllowSymlinkMacos": true
2342
}
2443
},
2544
"systemTray": {

src/view/about/index.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const AboutChatGPT = () => {
5656
helps you, you can buy me a cup of coffee (Chinese users can use WeChat to scan the code),
5757
thanks!
5858
</p>
59-
<p className="imgs">
59+
<p className="imgs" style={{ float: 'left' }}>
6060
<a href="https://www.buymeacoffee.com/lencx" target="_blank">
6161
<img
6262
src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png"
@@ -67,8 +67,12 @@ const AboutChatGPT = () => {
6767
<img
6868
width="200"
6969
src="https://user-images.githubusercontent.com/16164244/207228025-117b5f77-c5d2-48c2-a070-774b7a1596f2.png"
70-
></img>
70+
/>
7171
</p>
72+
<img
73+
width="250"
74+
src="https://user-images.githubusercontent.com/16164244/219439614-d5c3710c-e0b3-4df9-9b3c-c150ba0ba5f1.png"
75+
/>
7276
</div>
7377
);
7478
};

0 commit comments

Comments
 (0)