diff --git a/AWESOME.md b/AWESOME.md
index e5866a0..bb72e9d 100644
--- a/AWESOME.md
+++ b/AWESOME.md
@@ -1,5 +1,6 @@
# Awesome ChatGPT
+- [Awesome ChatGPT Prompts](https://github.com/f/awesome-chatgpt-prompts) - This repo includes ChatGPT promt curation to use ChatGPT better.
- [Awesome ChatGPT](https://github.com/humanloop/awesome-chatgpt) - Curated list of awesome tools, demos, docs for ChatGPT and GPT-3
## Extension
diff --git a/README.md b/README.md
index 487f11b..2e4ed16 100644
--- a/README.md
+++ b/README.md
@@ -18,9 +18,9 @@
**Latest:**
-- `Mac`: [ChatGPT_0.2.0_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.2.0/ChatGPT_0.2.0_x64.dmg)
-- `Linux`: [chat-gpt_0.2.0_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.2.0/chat-gpt_0.2.0_amd64.deb)
-- `Windows`: [ChatGPT_0.2.0_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.2.0/ChatGPT_0.2.0_x64_en-US.msi)
+- `Mac`: [ChatGPT_0.2.1_x64.dmg](https://github.com/lencx/ChatGPT/releases/download/v0.2.1/ChatGPT_0.2.1_x64.dmg)
+- `Linux`: [chat-gpt_0.2.1_amd64.deb](https://github.com/lencx/ChatGPT/releases/download/v0.2.1/chat-gpt_0.2.1_amd64.deb)
+- `Windows`: [ChatGPT_0.2.1_x64_en-US.msi](https://github.com/lencx/ChatGPT/releases/download/v0.2.1/ChatGPT_0.2.1_x64_en-US.msi)
[Other version...](https://github.com/lencx/ChatGPT/releases)
@@ -56,23 +56,28 @@ cask "popcorn-time", args: { "no-quarantine": true }
### Menu
-- **ChatGPT**
- - `Restart ChatGPT`: After editing the injection script file, you can restart the application through this menu item to make the script take effect.
- **Preferences**
- `Theme` - `Light`, `Dark` (Only macOS and Windows are supported).
- `Always On Top`: Window is always on top of other windows.
- `Titlebar`: Only supports macOS.
- - `User Agent` ([#17](https://github.com/lencx/ChatGPT/issues/17)): Customize `user agent` to prevent security detection interception.
+ - `User Agent` ([#17](https://github.com/lencx/ChatGPT/issues/17)): Customize `user agent` to prevent security detection interception. Default is empty string.
+ - `Inject Script`: User scripts that can modify web pages.
- `Switch Origin` ([#14](https://github.com/lencx/ChatGPT/issues/14)): Modify website address, the default is `https://chat.openai.com`. Please ensure that the mirror address is consistent with the UI of the original URL, otherwise the export function will fail.
- `Clear Config`: Clear all chatgpt configuration files (`path: ~/.chatgpt/*`), dangerous operation, please backup data.
- - `Inject Script`: User scripts that can modify web pages.
+ - `Restart ChatGPT`: After editing the injection script file, you can restart the application through this menu item to make the script take effect.
- `Awesome ChatGPT`: Related resources recommended.
- **Edit** - `Undo`, `Redo`, `Cut`, `Copy`, `SelectAll`, ...
- **View** - `Go Back`, `Go Forward`, `Scroll to Top of Screen`, `Scroll to Bottom of Screen`, `Refresh the Screen`, ...
- **Help**
+ - `Update Log`: ChatGPT app changelog.
- `Report Bug`: Defects and Suggestions Feedback.
- `Toggle Developer Tools`: Developer tools for debugging web pages.
+## TODO
+
+- web access capability ([#20](https://github.com/lencx/ChatGPT/issues/20))
+- ...
+
## 👀 Preview
diff --git a/UPDATE_LOG.md b/UPDATE_LOG.md
index 8a72f09..f82c11c 100644
--- a/UPDATE_LOG.md
+++ b/UPDATE_LOG.md
@@ -1,5 +1,9 @@
# UPDATE LOG
+## v0.2.1
+
+feat: menu optimization
+
## v0.2.0
feat: menu enhancement
diff --git a/src-tauri/src/app/menu.rs b/src-tauri/src/app/menu.rs
index da1d212..9534089 100644
--- a/src-tauri/src/app/menu.rs
+++ b/src-tauri/src/app/menu.rs
@@ -17,11 +17,6 @@ pub fn init(context: &Context) -> Menu {
name,
Menu::new()
.add_native_item(MenuItem::About(name.into(), AboutMetadata::default()))
- .add_native_item(MenuItem::Separator)
- .add_item(
- CustomMenuItem::new("restart".to_string(), "Restart ChatGPT")
- .accelerator("CmdOrCtrl+Shift+R"),
- )
.add_native_item(MenuItem::Services)
.add_native_item(MenuItem::Separator)
.add_native_item(MenuItem::Hide)
@@ -71,6 +66,7 @@ pub fn init(context: &Context) -> Menu {
always_on_top_menu.into(),
#[cfg(target_os = "macos")]
titlebar_menu.into(),
+ MenuItem::Separator.into(),
// fix: Checking if the site connection is secure
// @link: https://github.com/lencx/ChatGPT/issues/17
CustomMenuItem::new("user_agent".to_string(), "User Agent")
@@ -82,9 +78,13 @@ pub fn init(context: &Context) -> Menu {
CustomMenuItem::new("inject_script".to_string(), "Inject Script")
.accelerator("CmdOrCtrl+J")
.into(),
+ MenuItem::Separator.into(),
CustomMenuItem::new("clear_conf".to_string(), "Clear Config")
.accelerator("CmdOrCtrl+D")
.into(),
+ CustomMenuItem::new("restart".to_string(), "Restart ChatGPT")
+ .accelerator("CmdOrCtrl+Shift+R")
+ .into(),
MenuItem::Separator.into(),
CustomMenuItem::new("awesome".to_string(), "Awesome ChatGPT")
.accelerator("CmdOrCtrl+Z")
@@ -133,6 +133,7 @@ pub fn init(context: &Context) -> Menu {
let help_menu = Submenu::new(
"Help",
Menu::new()
+ .add_item(CustomMenuItem::new("update_log".to_string(), "Update Log"))
.add_item(CustomMenuItem::new("report_bug".to_string(), "Report Bug"))
.add_item(
CustomMenuItem::new("dev_tools".to_string(), "Toggle Developer Tools")
@@ -160,9 +161,8 @@ pub fn menu_handler(event: WindowMenuEvent) {
let menu_handle = core_window.menu_handle();
match menu_id {
- // App
- "restart" => tauri::api::process::restart(&app.env()),
// Preferences
+ "restart" => tauri::api::process::restart(&app.env()),
"inject_script" => open(&app, script_path),
"clear_conf" => utils::clear_conf(&app),
"switch_origin" => window::origin_window(&app),
@@ -214,6 +214,7 @@ pub fn menu_handler(event: WindowMenuEvent) {
)
.unwrap(),
// Help
+ "update_log" => open(&app, conf::UPDATE_LOG_URL.to_string()),
"report_bug" => open(&app, conf::ISSUES_URL.to_string()),
"dev_tools" => {
win.open_devtools();
diff --git a/src-tauri/src/conf.rs b/src-tauri/src/conf.rs
index d2c73e4..c73cb0e 100644
--- a/src-tauri/src/conf.rs
+++ b/src-tauri/src/conf.rs
@@ -7,7 +7,11 @@ use tauri::Theme;
#[cfg(target_os = "macos")]
use tauri::TitleBarStyle;
+// pub const USER_AGENT: &str = "5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36";
+// pub const PHONE_USER_AGENT: &str = "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1";
+
pub const ISSUES_URL: &str = "https://github.com/lencx/ChatGPT/issues";
+pub const UPDATE_LOG_URL: &str = "https://github.com/lencx/ChatGPT/blob/main/UPDATE_LOG.md";
pub const AWESOME_URL: &str = "https://github.com/lencx/ChatGPT/blob/main/AWESOME.md";
pub const DEFAULT_CHAT_CONF: &str = r#"{
"always_on_top": false,
@@ -15,8 +19,8 @@ pub const DEFAULT_CHAT_CONF: &str = r#"{
"titlebar": true,
"default_origin": "https://chat.openai.com",
"origin": "https://chat.openai.com",
- "ua_pc": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
- "ua_phone": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
+ "ua_pc": "",
+ "ua_phone": ""
}"#;
pub const DEFAULT_CHAT_CONF_MAC: &str = r#"{
"always_on_top": false,
@@ -24,8 +28,8 @@ pub const DEFAULT_CHAT_CONF_MAC: &str = r#"{
"titlebar": false,
"default_origin": "https://chat.openai.com",
"origin": "https://chat.openai.com",
- "ua_pc": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1",
- "ua_phone": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"
+ "ua_pc": "",
+ "ua_phone": ""
}"#;
pub struct ChatState {
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 92d2700..f83df14 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
- "version": "0.2.0"
+ "version": "0.2.1"
},
"tauri": {
"allowlist": {