From 71b257c0cf46b46c186d8e57500c5fb284e5b53b Mon Sep 17 00:00:00 2001
From: lencx
Date: Wed, 1 Mar 2023 19:21:59 +0800
Subject: [PATCH 01/19] chore: allowlist
---
Cargo.lock | 276 +++++++++++++-------------------
UPDATE_LOG.md | 2 -
package.json | 2 +-
src-tauri/Cargo.toml | 4 +-
src-tauri/src/scripts/cmd.js | 7 +
src-tauri/src/scripts/export.js | 1 +
src-tauri/tauri.conf.json | 25 ++-
src/view/about/index.tsx | 8 +-
8 files changed, 148 insertions(+), 177 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 97d7c31..638ead8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -51,13 +51,12 @@ checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800"
[[package]]
name = "async-broadcast"
-version = "0.5.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b19760fa2b7301cf235360ffd6d3558b1ed4249edd16d6cca8d690cee265b95"
+checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b"
dependencies = [
"event-listener",
"futures-core",
- "parking_lot",
]
[[package]]
@@ -265,9 +264,9 @@ dependencies = [
[[package]]
name = "bstr"
-version = "1.2.0"
+version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7f0778972c64420fdedc63f09919c8a88bda7b25135357fd25a5d9f3257e832"
+checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1"
dependencies = [
"memchr",
"serde",
@@ -688,17 +687,6 @@ dependencies = [
"syn",
]
-[[package]]
-name = "dbus"
-version = "0.9.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b"
-dependencies = [
- "libc",
- "libdbus-sys",
- "winapi",
-]
-
[[package]]
name = "dconf_rs"
version = "0.3.0"
@@ -855,6 +843,27 @@ dependencies = [
"syn",
]
+[[package]]
+name = "errno"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "errno-dragonfly"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf"
+dependencies = [
+ "cc",
+ "libc",
+]
+
[[package]]
name = "event-listener"
version = "2.5.3"
@@ -1120,15 +1129,15 @@ dependencies = [
[[package]]
name = "generator"
-version = "0.7.2"
+version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e"
+checksum = "33a20a288a94683f5f4da0adecdbe095c94a77c295e514cc6484e9394dd8376e"
dependencies = [
"cc",
"libc",
"log",
"rustversion",
- "windows 0.39.0",
+ "windows 0.44.0",
]
[[package]]
@@ -1406,9 +1415,9 @@ dependencies = [
[[package]]
name = "http"
-version = "0.2.8"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
+checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
dependencies = [
"bytes",
"fnv",
@@ -1566,6 +1575,16 @@ dependencies = [
"cfg-if",
]
+[[package]]
+name = "io-lifetimes"
+version = "1.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3"
+dependencies = [
+ "libc",
+ "windows-sys 0.45.0",
+]
+
[[package]]
name = "ipnet"
version = "2.7.1"
@@ -1695,15 +1714,6 @@ version = "0.2.139"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
-[[package]]
-name = "libdbus-sys"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f8d7ae751e1cb825c840ae5e682f59b098cdfd213c350ac268b61449a5f58a0"
-dependencies = [
- "pkg-config",
-]
-
[[package]]
name = "libloading"
version = "0.7.4"
@@ -1723,6 +1733,12 @@ dependencies = [
"safemem",
]
+[[package]]
+name = "linux-raw-sys"
+version = "0.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
+
[[package]]
name = "lock_api"
version = "0.4.9"
@@ -1764,19 +1780,6 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
-[[package]]
-name = "mac-notification-sys"
-version = "0.5.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e72d50edb17756489e79d52eb146927bec8eba9dd48faadf9ef08bca3791ad5"
-dependencies = [
- "cc",
- "dirs-next",
- "objc-foundation",
- "objc_id",
- "time",
-]
-
[[package]]
name = "malloc_buf"
version = "0.0.6"
@@ -1935,26 +1938,6 @@ version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
-[[package]]
-name = "nom8"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "notify-rust"
-version = "4.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3ce656bb6d22a93ae276a23de52d1aec5ba4db3ece3c0eb79dfd5add7384db6a"
-dependencies = [
- "dbus",
- "mac-notification-sys",
- "tauri-winrt-notification",
-]
-
[[package]]
name = "nu-ansi-term"
version = "0.46.0"
@@ -2007,18 +1990,18 @@ dependencies = [
[[package]]
name = "num_enum"
-version = "0.5.9"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b"
+checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9"
dependencies = [
"num_enum_derive",
]
[[package]]
name = "num_enum_derive"
-version = "0.5.9"
+version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e"
+checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -2157,16 +2140,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "os_pipe"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a53dbb20faf34b16087a931834cba2d7a73cc74af2b7ef345a4c8324e2409a12"
-dependencies = [
- "libc",
- "windows-sys 0.45.0",
-]
-
[[package]]
name = "overload"
version = "0.1.1"
@@ -2373,14 +2346,14 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
[[package]]
name = "plist"
-version = "1.4.0"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635"
+checksum = "9469799ca90293a376f68f6fcb8f11990d9cff55602cfba0ba83893c973a7f46"
dependencies = [
- "base64 0.13.1",
+ "base64 0.21.0",
"indexmap",
"line-wrap",
- "quick-xml 0.26.0",
+ "quick-xml",
"serde",
"time",
]
@@ -2425,9 +2398,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
name = "proc-macro-crate"
-version = "1.3.0"
+version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
dependencies = [
"once_cell",
"toml_edit",
@@ -2472,15 +2445,6 @@ dependencies = [
"unicode-ident",
]
-[[package]]
-name = "quick-xml"
-version = "0.23.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea"
-dependencies = [
- "memchr",
-]
-
[[package]]
name = "quick-xml"
version = "0.26.0"
@@ -2635,15 +2599,6 @@ version = "0.6.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
-[[package]]
-name = "remove_dir_all"
-version = "0.5.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
-dependencies = [
- "winapi",
-]
-
[[package]]
name = "reqwest"
version = "0.11.14"
@@ -2733,6 +2688,20 @@ dependencies = [
"semver 1.0.16",
]
+[[package]]
+name = "rustix"
+version = "0.36.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644"
+dependencies = [
+ "bitflags",
+ "errno",
+ "io-lifetimes",
+ "libc",
+ "linux-raw-sys",
+ "windows-sys 0.45.0",
+]
+
[[package]]
name = "rustversion"
version = "1.0.11"
@@ -2990,16 +2959,6 @@ dependencies = [
"lazy_static",
]
-[[package]]
-name = "shared_child"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0d94659ad3c2137fef23ae75b03d5241d633f8acded53d672decfa0e6e0caef"
-dependencies = [
- "libc",
- "winapi",
-]
-
[[package]]
name = "siphasher"
version = "0.3.10"
@@ -3008,9 +2967,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
[[package]]
name = "slab"
-version = "0.4.7"
+version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
+checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
dependencies = [
"autocfg",
]
@@ -3112,32 +3071,11 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
-[[package]]
-name = "strum"
-version = "0.22.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7ac893c7d471c8a21f31cfe213ec4f6d9afeed25537c772e08ef3f005f8729e"
-dependencies = [
- "strum_macros",
-]
-
-[[package]]
-name = "strum_macros"
-version = "0.22.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb"
-dependencies = [
- "heck 0.3.3",
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "syn"
-version = "1.0.107"
+version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
"proc-macro2",
"quote",
@@ -3308,12 +3246,10 @@ dependencies = [
"http",
"ignore",
"minisign-verify",
- "notify-rust",
"objc",
"once_cell",
"open",
"os_info",
- "os_pipe",
"percent-encoding",
"rand 0.8.5",
"raw-window-handle",
@@ -3324,7 +3260,6 @@ dependencies = [
"serde_json",
"serde_repr",
"serialize-to-javascript",
- "shared_child",
"state",
"tar",
"tauri-macros",
@@ -3429,14 +3364,15 @@ dependencies = [
[[package]]
name = "tauri-plugin-positioner"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c06e0a1f9650fec272f5e4fb2b60863cd9f5dde20ee80e085dd0a99b39b9f8e4"
+version = "0.2.7"
+source = "git+https://github.com/lencx/tauri-plugins-workspace#bf1106a0a5e178ce38ecde56751ba037307a7ae8"
dependencies = [
+ "log",
"serde",
"serde_json",
"serde_repr",
"tauri",
+ "thiserror",
]
[[package]]
@@ -3521,29 +3457,17 @@ dependencies = [
"windows 0.39.0",
]
-[[package]]
-name = "tauri-winrt-notification"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c58de036c4d2e20717024de2a3c4bf56c301f07b21bc8ef9b57189fce06f1f3b"
-dependencies = [
- "quick-xml 0.23.1",
- "strum",
- "windows 0.39.0",
-]
-
[[package]]
name = "tempfile"
-version = "3.3.0"
+version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
+checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95"
dependencies = [
"cfg-if",
"fastrand",
- "libc",
"redox_syscall",
- "remove_dir_all",
- "winapi",
+ "rustix",
+ "windows-sys 0.42.0",
]
[[package]]
@@ -3595,9 +3519,9 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.17"
+version = "0.3.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
+checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
dependencies = [
"itoa 1.0.5",
"serde",
@@ -3613,9 +3537,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
[[package]]
name = "time-macros"
-version = "0.2.6"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
+checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36"
dependencies = [
"time-core",
]
@@ -3699,19 +3623,19 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.5.1"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5"
+checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
[[package]]
name = "toml_edit"
-version = "0.18.1"
+version = "0.19.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b"
+checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825"
dependencies = [
"indexmap",
- "nom8",
"toml_datetime",
+ "winnow",
]
[[package]]
@@ -4192,6 +4116,15 @@ dependencies = [
"windows_x86_64_msvc 0.39.0",
]
+[[package]]
+name = "windows"
+version = "0.44.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b"
+dependencies = [
+ "windows-targets",
+]
+
[[package]]
name = "windows-bindgen"
version = "0.39.0"
@@ -4365,6 +4298,15 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
+[[package]]
+name = "winnow"
+version = "0.3.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "faf09497b8f8b5ac5d3bb4d05c0a99be20f26fd3d5f2db7b0716e946d5103658"
+dependencies = [
+ "memchr",
+]
+
[[package]]
name = "winreg"
version = "0.10.1"
diff --git a/UPDATE_LOG.md b/UPDATE_LOG.md
index 252f5c3..4467476 100644
--- a/UPDATE_LOG.md
+++ b/UPDATE_LOG.md
@@ -13,8 +13,6 @@
**New repository: https://github.com/lencx/nofwl**
-
-
## v0.11.0
Fix:
diff --git a/package.json b/package.json
index 82ff963..b4cbad0 100644
--- a/package.json
+++ b/package.json
@@ -76,6 +76,6 @@
"vite-tsconfig-paths": "^4.0.2"
},
"engines": {
- "node": "^14.18.0 || ^16.0.0"
+ "node": "^14.18.0 || ^16.0.0 || ^18.0.0"
}
}
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 74c6765..0bbaa90 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -26,8 +26,8 @@ wry = "0.24.1"
dark-light = "1.0.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.23.0", features = ["macros"] }
-tauri = { version = "1.2.4", features = ["api-all", "devtools", "global-shortcut", "system-tray", "updater"] }
-tauri-plugin-positioner = { version = "1.0.4", features = ["system-tray"] }
+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"] }
+tauri-plugin-positioner = { git = "https://github.com/lencx/tauri-plugins-workspace", features = ["system-tray"] }
tauri-plugin-log = { git = "https://github.com/lencx/tauri-plugins-workspace", branch = "dev", features = ["colored"] }
tauri-plugin-autostart = { git = "https://github.com/lencx/tauri-plugins-workspace", branch = "dev" }
tauri-plugin-window-state = { git = "https://github.com/lencx/tauri-plugins-workspace", branch = "dev" }
diff --git a/src-tauri/src/scripts/cmd.js b/src-tauri/src/scripts/cmd.js
index 385b4fb..819e446 100644
--- a/src-tauri/src/scripts/cmd.js
+++ b/src-tauri/src/scripts/cmd.js
@@ -166,6 +166,7 @@ async function cmdTip() {
// Enter a command starting with `/` and press a space to automatically fill `chatgpt prompt`.
// If more than one command appears in the search results, the first one will be used by default.
function cmdKeydown(event) {
+
if (!window.__CHAT_MODEL_CMD_PROMPT__) {
return;
}
@@ -245,8 +246,14 @@ async function cmdTip() {
searchInput.value = window.__CHAT_MODEL_CMD_PROMPT__;
initDom();
+
event.preventDefault();
}
+
+ if (event.keyCode === 13 && __TAURI_METADATA__.__currentWindow.label === 'tray') {
+ const btn = document.querySelector('form button');
+ if (btn) btn.click();
+ }
}
searchInput.removeEventListener('keydown', cmdKeydown, { capture: true });
searchInput.addEventListener('keydown', cmdKeydown, { capture: true });
diff --git a/src-tauri/src/scripts/export.js b/src-tauri/src/scripts/export.js
index c441a8a..16bb054 100644
--- a/src-tauri/src/scripts/export.js
+++ b/src-tauri/src/scripts/export.js
@@ -1,6 +1,7 @@
// *** Core Script - Export ***
async function init() {
+ if (window.location.pathname === '/auth/login') return;
const buttonOuterHTMLFallback = ``;
removeButtons();
if (window.buttonsInterval) {
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index bf73ab1..3d9647d 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,19 +7,38 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.0"
+ "version": "0.11.99"
},
"tauri": {
"allowlist": {
- "all": true,
+ "all": false,
"globalShortcut": {
"all": true
},
"fs": {
- "all": true,
+ "all": false,
+ "readFile": true,
+ "writeFile": true,
+ "readDir": true,
+ "createDir": true,
+ "exists": true,
+ "removeFile": true,
+ "removeDir": true,
"scope": [
"$HOME/.chatgpt/**"
]
+ },
+ "path": {
+ "all": true
+ },
+ "os": {
+ "all": true
+ },
+ "process": {
+ "all": true,
+ "exit": true,
+ "relaunch": true,
+ "relaunchDangerousAllowSymlinkMacos": true
}
},
"systemTray": {
diff --git a/src/view/about/index.tsx b/src/view/about/index.tsx
index 9a82e62..8ec8b34 100644
--- a/src/view/about/index.tsx
+++ b/src/view/about/index.tsx
@@ -56,7 +56,7 @@ const AboutChatGPT = () => {
helps you, you can buy me a cup of coffee (Chinese users can use WeChat to scan the code),
thanks!
-
+
{
+ />
+
);
};
From 5e5d6d268e8f06e2b0a279cf9595c52931871495 Mon Sep 17 00:00:00 2001
From: lencx
Date: Fri, 3 Mar 2023 23:18:37 +0800
Subject: [PATCH 02/19] fix: tray uses the Enter key to send a message (#533)
---
src-tauri/src/scripts/cmd.js | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src-tauri/src/scripts/cmd.js b/src-tauri/src/scripts/cmd.js
index 819e446..91ab1c6 100644
--- a/src-tauri/src/scripts/cmd.js
+++ b/src-tauri/src/scripts/cmd.js
@@ -166,8 +166,12 @@ async function cmdTip() {
// Enter a command starting with `/` and press a space to automatically fill `chatgpt prompt`.
// If more than one command appears in the search results, the first one will be used by default.
function cmdKeydown(event) {
-
if (!window.__CHAT_MODEL_CMD_PROMPT__) {
+ if (!event.shiftKey && event.keyCode === 13 && __TAURI_METADATA__.__currentWindow.label === 'tray') {
+ const btn = document.querySelector('form button');
+ if (btn) btn.click();
+ event.preventDefault();
+ }
return;
}
@@ -249,11 +253,6 @@ async function cmdTip() {
event.preventDefault();
}
-
- if (event.keyCode === 13 && __TAURI_METADATA__.__currentWindow.label === 'tray') {
- const btn = document.querySelector('form button');
- if (btn) btn.click();
- }
}
searchInput.removeEventListener('keydown', cmdKeydown, { capture: true });
searchInput.addEventListener('keydown', cmdKeydown, { capture: true });
From 56c0b8616d0b4f57b69227a330096dca0d85fc16 Mon Sep 17 00:00:00 2001
From: lencx
Date: Fri, 3 Mar 2023 23:19:51 +0800
Subject: [PATCH 03/19] fix: export btn (#541)
---
src-tauri/src/scripts/export.js | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src-tauri/src/scripts/export.js b/src-tauri/src/scripts/export.js
index 16bb054..6fe0f60 100644
--- a/src-tauri/src/scripts/export.js
+++ b/src-tauri/src/scripts/export.js
@@ -38,12 +38,7 @@ const Format = {
};
function shouldRemoveButtons() {
- const isOpenScreen = document.querySelector("h1.text-4xl");
- if(isOpenScreen){
- return true;
- }
- const inConversation = document.querySelector("form button>div");
- if(inConversation){
+ if (document.querySelector("form .text-2xl")) {
return true;
}
return false;
@@ -144,7 +139,7 @@ async function exportMarkdown() {
j.innerHTML = `${i.innerHTML}
`;
}
return j.innerHTML;
- }).join('
');
+ }).join('');
const data = ExportMD.turndown(content);
const { id, filename } = getName();
await invoke('save_file', { name: `notes/${id}.md`, content: data });
From 2cf9da20ead28307f92075bd2ff0bff3fd162d04 Mon Sep 17 00:00:00 2001
From: lencx
Date: Fri, 3 Mar 2023 23:39:18 +0800
Subject: [PATCH 04/19] chore: menu
---
UPDATE_LOG.md | 7 +++++++
src-tauri/src/app/menu.rs | 2 ++
src-tauri/src/conf.rs | 1 +
3 files changed, 10 insertions(+)
diff --git a/UPDATE_LOG.md b/UPDATE_LOG.md
index 4467476..de80a22 100644
--- a/UPDATE_LOG.md
+++ b/UPDATE_LOG.md
@@ -13,6 +13,13 @@
**New repository: https://github.com/lencx/nofwl**
+## v0.11.1
+
+Fix:
+
+- Export button blinks (https://github.com/lencx/ChatGPT/issues/541)
+- System tray supports sending with Enter key, for text line breaks please use the shortcut key `Shift + Enter` (https://github.com/lencx/ChatGPT/issues/533)
+
## v0.11.0
Fix:
diff --git a/src-tauri/src/app/menu.rs b/src-tauri/src/app/menu.rs
index ec905c9..c5b3645 100644
--- a/src-tauri/src/app/menu.rs
+++ b/src-tauri/src/app/menu.rs
@@ -143,6 +143,7 @@ pub fn init() -> Menu {
.into(),
CustomMenuItem::new("clear_conf".to_string(), "Clear Config").into(),
MenuItem::Separator.into(),
+ CustomMenuItem::new("nofwl".to_string(), "NoFWL Desktop Application").into(),
CustomMenuItem::new("buy_coffee".to_string(), "Buy lencx a coffee").into(),
]),
);
@@ -257,6 +258,7 @@ pub fn menu_handler(event: WindowMenuEvent) {
conf::APP_WEBSITE.into(),
None,
),
+ "nofwl" => open(&app, conf::NOFWL_APP.to_string()),
"buy_coffee" => open(&app, conf::BUY_COFFEE.to_string()),
"popup_search" => {
let app_conf = AppConf::read();
diff --git a/src-tauri/src/conf.rs b/src-tauri/src/conf.rs
index 0dc44fa..2faef14 100644
--- a/src-tauri/src/conf.rs
+++ b/src-tauri/src/conf.rs
@@ -10,6 +10,7 @@ use crate::utils::{app_root, create_file, exists};
pub const APP_WEBSITE: &str = "https://lencx.github.io/app/";
pub const ISSUES_URL: &str = "https://github.com/lencx/ChatGPT/issues";
+pub const NOFWL_APP: &str = "https://github.com/lencx/nofwl";
pub const UPDATE_LOG_URL: &str = "https://github.com/lencx/ChatGPT/blob/main/UPDATE_LOG.md";
pub const BUY_COFFEE: &str = "https://www.buymeacoffee.com/lencx";
pub const GITHUB_PROMPTS_CSV_URL: &str =
From 930a9de65573fe1f7a19058b1fa89614585d3160 Mon Sep 17 00:00:00 2001
From: lencx
Date: Fri, 3 Mar 2023 23:41:17 +0800
Subject: [PATCH 05/19] readme
---
README-ZH_CN.md | 12 ++++++------
README.md | 12 ++++++------
package.json | 2 +-
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/README-ZH_CN.md b/README-ZH_CN.md
index 0857bc0..a782a70 100644
--- a/README-ZH_CN.md
+++ b/README-ZH_CN.md
@@ -32,7 +32,7 @@
### Windows
-- [ChatGPT_0.11.0_windows_x86_64.msi](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_windows_x86_64.msi)
+- [ChatGPT_0.11.1_windows_x86_64.msi](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_windows_x86_64.msi)
- 使用 [winget](https://winstall.app/apps/lencx.ChatGPT):
```bash
@@ -43,12 +43,12 @@
winget install --id=lencx.ChatGPT -e --version 0.10.0
```
-**注意:如果安装路径和应用名称相同,会导致冲突 ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.11.0))**
+**注意:如果安装路径和应用名称相同,会导致冲突 ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.11.1))**
### Mac
-- [ChatGPT_0.11.0_macos_aarch64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_macos_aarch64.dmg)
-- [ChatGPT_0.11.0_macos_x86_64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_macos_x86_64.dmg)
+- [ChatGPT_0.11.1_macos_aarch64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_macos_aarch64.dmg)
+- [ChatGPT_0.11.1_macos_x86_64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_macos_x86_64.dmg)
- Homebrew \
_[Homebrew 快捷安装](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
```sh
@@ -64,8 +64,8 @@
### Linux
-- [ChatGPT_0.11.0_linux_x86_64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_linux_x86_64.deb)
-- [ChatGPT_0.11.0_linux_x86_64.AppImage.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_linux_x86_64.AppImage.tar.gz): **工作可靠,`.deb` 运行失败时可以尝试它**
+- [ChatGPT_0.11.1_linux_x86_64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_linux_x86_64.deb)
+- [ChatGPT_0.11.1_linux_x86_64.AppImage.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_linux_x86_64.AppImage.tar.gz): **工作可靠,`.deb` 运行失败时可以尝试它**
diff --git a/README.md b/README.md
index 01298f0..01ed602 100644
--- a/README.md
+++ b/README.md
@@ -41,7 +41,7 @@
### Windows
-- [ChatGPT_0.11.0_windows_x86_64.msi](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_windows_x86_64.msi): Direct download installer
+- [ChatGPT_0.11.1_windows_x86_64.msi](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_windows_x86_64.msi): Direct download installer
- Use [winget](https://winstall.app/apps/lencx.ChatGPT):
```bash
@@ -52,12 +52,12 @@
winget install --id=lencx.ChatGPT -e --version 0.10.0
```
-**Note: If the installation path and application name are the same, it will lead to conflict ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.11.0))**
+**Note: If the installation path and application name are the same, it will lead to conflict ([#142](https://github.com/lencx/ChatGPT/issues/142#issuecomment-0.11.1))**
### Mac
-- [ChatGPT_0.11.0_macos_aarch64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_macos_aarch64.dmg): Direct download installer
-- [ChatGPT_0.11.0_macos_x86_64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_macos_x86_64.dmg): Direct download installer
+- [ChatGPT_0.11.1_macos_aarch64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_macos_aarch64.dmg): Direct download installer
+- [ChatGPT_0.11.1_macos_x86_64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_macos_x86_64.dmg): Direct download installer
- Homebrew \
Or you can install with _[Homebrew](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
```sh
@@ -73,8 +73,8 @@
### Linux
-- [ChatGPT_0.11.0_linux_x86_64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_linux_x86_64.deb): Download `.deb` installer, advantage small size, disadvantage poor compatibility
-- [ChatGPT_0.11.0_linux_x86_64.AppImage.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.11.0/ChatGPT_0.11.0_linux_x86_64.AppImage.tar.gz): Works reliably, you can try it if `.deb` fails to run
+- [ChatGPT_0.11.1_linux_x86_64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_linux_x86_64.deb): Download `.deb` installer, advantage small size, disadvantage poor compatibility
+- [ChatGPT_0.11.1_linux_x86_64.AppImage.tar.gz](https://github.com/lencx/ChatGPT/releases/download/v0.11.1/ChatGPT_0.11.1_linux_x86_64.AppImage.tar.gz): Works reliably, you can try it if `.deb` fails to run
diff --git a/package.json b/package.json
index b4cbad0..66829e2 100644
--- a/package.json
+++ b/package.json
@@ -11,7 +11,7 @@
"fix:conf": "tr override --json.tauri_updater_active=false",
"fix:tray": "tr override --json.tauri_systemTray_iconPath=\"icons/tray-icon-light.png\" --json.tauri_systemTray_iconAsTemplate=false",
"fix:tray:mac": "tr override --json.tauri_systemTray_iconPath=\"icons/tray-icon.png\" --json.tauri_systemTray_iconAsTemplate=true",
- "download": "tr download --mdfile=README.md,README-ZH_CN.md --f1=38 --f2=35",
+ "download": "tr download --mdfile=README.md,README-ZH_CN.md --f1=52 --f2=43",
"fmt:rs": "cargo fmt",
"tr": "tr",
"tauri": "tauri",
From 82cf795624a0e9cca0981fd9b52495f7ec6dbdc7 Mon Sep 17 00:00:00 2001
From: lencx
Date: Fri, 3 Mar 2023 23:42:25 +0800
Subject: [PATCH 06/19] v0.11.1
---
src-tauri/tauri.conf.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 3d9647d..ca99788 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.99"
+ "version": "0.11.1"
},
"tauri": {
"allowlist": {
From 0ca6cd3db2730a4c6a8e7db8c37c34141249f801 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 00:15:05 +0800
Subject: [PATCH 07/19] fix: mac
---
.github/workflows/release.yml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2db8f8e..a23b988 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -124,12 +124,18 @@ jobs:
- name: Rename artifacts
run: |
mv "artifacts/aarch64/dmg/ChatGPT_${{ env.version }}_aarch64.dmg" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.dmg"
- mv "artifacts/aarch64/macos/ChatGPT.app.tar.gz" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.app.tar.gz"
mv "artifacts/aarch64/macos/ChatGPT.app.tar.gz.sig" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.app.tar.gz.sig"
+ tar -xzf "artifacts/aarch64/macos/ChatGPT.app.tar.gz"
+ xattr -r -d com.apple.quarantine "artifacts/aarch64/macos/ChatGPT.app"
+ tar -czf "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.app.tar.gz" "artifacts/aarch64/macos/ChatGPT.app"
+ rm -rf "artifacts/aarch64/macos"
mv "artifacts/x86_64/dmg/ChatGPT_${{ env.version }}_x64.dmg" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.dmg"
- mv "artifacts/x86_64/macos/ChatGPT.app.tar.gz" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.app.tar.gz"
mv "artifacts/x86_64/macos/ChatGPT.app.tar.gz.sig" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.app.tar.gz.sig"
+ tar -xzf "artifacts/x86_64/macos/ChatGPT.app.tar.gz"
+ xattr -r -d com.apple.quarantine "artifacts/x86_64/macos/ChatGPT.app"
+ tar -czf "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.app.tar.gz" "artifacts/x86_64/macos/ChatGPT.app"
+ rm -rf "artifacts/x86_64/macos"
mv "artifacts/x86_64/deb/chat-gpt_${{ env.version }}_amd64.deb" "artifacts/x86_64/deb/ChatGPT_${{ env.version }}_linux_x86_64.deb"
mv "artifacts/x86_64/appimage/chat-gpt_${{ env.version }}_amd64.AppImage.tar.gz" "artifacts/ChatGPT_${{ env.version }}_linux_x86_64.AppImage.tar.gz"
From 228b55ab0b6674fd7e6f62e9c62387438e9975b9 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 00:16:59 +0800
Subject: [PATCH 08/19] version
---
src-tauri/tauri.conf.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index ca99788..52470ed 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.1"
+ "version": "0.11.0"
},
"tauri": {
"allowlist": {
From 15d0853cdb6b1f697f128cafd70b642d3a1c1037 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 00:17:13 +0800
Subject: [PATCH 09/19] v0.11.1
---
src-tauri/tauri.conf.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 52470ed..ca99788 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.0"
+ "version": "0.11.1"
},
"tauri": {
"allowlist": {
From d968e6ad6d2002b990fd3e9d094355dad3256486 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 01:23:43 +0800
Subject: [PATCH 10/19] fix: error
---
.github/workflows/release.yml | 4 ++++
src-tauri/tauri.conf.json | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a23b988..a0d1c6d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -54,6 +54,10 @@ jobs:
with:
key: ${{ matrix.target }}
+ - name: Install dependencies (macos only)
+ if: matrix.os == 'macos-latest'
+ run: pip install xattr
+
- name: Install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index ca99788..52470ed 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.1"
+ "version": "0.11.0"
},
"tauri": {
"allowlist": {
From 4d752c844d3218b2867089bb9389344a577445b2 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 01:24:07 +0800
Subject: [PATCH 11/19] v0.11.1
---
src-tauri/tauri.conf.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 52470ed..ca99788 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.0"
+ "version": "0.11.1"
},
"tauri": {
"allowlist": {
From a0e2af599fe49507b5a2b5043bd726dae23cfdef Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 08:06:10 +0800
Subject: [PATCH 12/19] fix: error
---
.github/workflows/release.yml | 9 +++++----
src-tauri/tauri.conf.json | 2 +-
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a0d1c6d..a34219c 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -54,10 +54,6 @@ jobs:
with:
key: ${{ matrix.target }}
- - name: Install dependencies (macos only)
- if: matrix.os == 'macos-latest'
- run: pip install xattr
-
- name: Install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
@@ -110,6 +106,11 @@ jobs:
steps:
- uses: actions/checkout@v3
+ - name: Install xattr
+ run: |
+ sudo apt-get update
+ sudo apt-get install -y xattr
+
- name: Query version number
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index ca99788..52470ed 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.1"
+ "version": "0.11.0"
},
"tauri": {
"allowlist": {
From 5e16d91a3e8cb81c72d88b4036179654da942d8b Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 08:06:27 +0800
Subject: [PATCH 13/19] v0.11.1
---
src-tauri/tauri.conf.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 52470ed..ca99788 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.0"
+ "version": "0.11.1"
},
"tauri": {
"allowlist": {
From ab43dd3d739576dbcb8b59b47a095d95d44fdb98 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 09:14:57 +0800
Subject: [PATCH 14/19] fix: error
---
.github/workflows/release.yml | 23 +++++++++++++++--------
src-tauri/tauri.conf.json | 2 +-
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index a34219c..7eae77d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -54,6 +54,10 @@ jobs:
with:
key: ${{ matrix.target }}
+ - name: Install xattr (macos only)
+ if: matrix.os == 'macos-latest'
+ run: pip install xattr
+
- name: Install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-latest'
run: |
@@ -77,6 +81,15 @@ jobs:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
+ - name: fix macos install
+ if: matrix.os == 'macos-latest'
+ run: |
+ rm ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
+ tar -xzf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz
+ xattr -r -d com.apple.quarantine ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
+ rm ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz
+ tar -czf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
+
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
with:
@@ -129,18 +142,12 @@ jobs:
- name: Rename artifacts
run: |
mv "artifacts/aarch64/dmg/ChatGPT_${{ env.version }}_aarch64.dmg" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.dmg"
+ mv "artifacts/aarch64/macos/ChatGPT.app.tar.gz" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.app.tar.gz"
mv "artifacts/aarch64/macos/ChatGPT.app.tar.gz.sig" "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.app.tar.gz.sig"
- tar -xzf "artifacts/aarch64/macos/ChatGPT.app.tar.gz"
- xattr -r -d com.apple.quarantine "artifacts/aarch64/macos/ChatGPT.app"
- tar -czf "artifacts/ChatGPT_${{ env.version }}_macos_aarch64.app.tar.gz" "artifacts/aarch64/macos/ChatGPT.app"
- rm -rf "artifacts/aarch64/macos"
mv "artifacts/x86_64/dmg/ChatGPT_${{ env.version }}_x64.dmg" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.dmg"
+ mv "artifacts/x86_64/macos/ChatGPT.app.tar.gz" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.app.tar.gz"
mv "artifacts/x86_64/macos/ChatGPT.app.tar.gz.sig" "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.app.tar.gz.sig"
- tar -xzf "artifacts/x86_64/macos/ChatGPT.app.tar.gz"
- xattr -r -d com.apple.quarantine "artifacts/x86_64/macos/ChatGPT.app"
- tar -czf "artifacts/ChatGPT_${{ env.version }}_macos_x86_64.app.tar.gz" "artifacts/x86_64/macos/ChatGPT.app"
- rm -rf "artifacts/x86_64/macos"
mv "artifacts/x86_64/deb/chat-gpt_${{ env.version }}_amd64.deb" "artifacts/x86_64/deb/ChatGPT_${{ env.version }}_linux_x86_64.deb"
mv "artifacts/x86_64/appimage/chat-gpt_${{ env.version }}_amd64.AppImage.tar.gz" "artifacts/ChatGPT_${{ env.version }}_linux_x86_64.AppImage.tar.gz"
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index ca99788..52470ed 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.1"
+ "version": "0.11.0"
},
"tauri": {
"allowlist": {
From 98aaed5cb9a775cb879077b6fdd014262cab6fb2 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 09:16:15 +0800
Subject: [PATCH 15/19] v0.11.1
---
src-tauri/tauri.conf.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 52470ed..ca99788 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.0"
+ "version": "0.11.1"
},
"tauri": {
"allowlist": {
From a913135a27146e1fa8171e1888b494a4774d8b08 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 09:35:03 +0800
Subject: [PATCH 16/19] fix: error
---
.github/workflows/release.yml | 4 ++--
src-tauri/tauri.conf.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 7eae77d..4856a81 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -84,10 +84,10 @@ jobs:
- name: fix macos install
if: matrix.os == 'macos-latest'
run: |
- rm ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
+ rm -rf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
tar -xzf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz
xattr -r -d com.apple.quarantine ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
- rm ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz
+ rm -rf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz
tar -czf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
- uses: actions/upload-artifact@v3
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index ca99788..52470ed 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.1"
+ "version": "0.11.0"
},
"tauri": {
"allowlist": {
From b4a6c0145a6a9e1f6c7ffeb01d70fa33cfef97e2 Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 09:35:44 +0800
Subject: [PATCH 17/19] v0.11.1
---
src-tauri/tauri.conf.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 52470ed..ca99788 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.0"
+ "version": "0.11.1"
},
"tauri": {
"allowlist": {
From ba32674419f76991b2d2db599a279124073f45fd Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 10:00:00 +0800
Subject: [PATCH 18/19] fix: error
---
.github/workflows/release.yml | 5 ++---
src-tauri/tauri.conf.json | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4856a81..f8b3011 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -84,11 +84,10 @@ jobs:
- name: fix macos install
if: matrix.os == 'macos-latest'
run: |
- rm -rf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
tar -xzf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz
- xattr -r -d com.apple.quarantine ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
+ xattr -r -d com.apple.quarantine ChatGPT.app
rm -rf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz
- tar -czf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app
+ tar -czf ./target/${{ matrix.target }}/release/bundle/macos/ChatGPT.app.tar.gz ChatGPT.app
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest'
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index ca99788..52470ed 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.1"
+ "version": "0.11.0"
},
"tauri": {
"allowlist": {
From 1f7e91d4cc7787dde3f9b82fafa3121ea56b8f8b Mon Sep 17 00:00:00 2001
From: lencx
Date: Sat, 4 Mar 2023 10:00:44 +0800
Subject: [PATCH 19/19] v0.11.1
---
src-tauri/tauri.conf.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 52470ed..ca99788 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.11.0"
+ "version": "0.11.1"
},
"tauri": {
"allowlist": {