Compare commits

..

10 Commits

Author SHA1 Message Date
lencx
9f26e854df v0.2.1 2022-12-12 19:19:33 +08:00
lencx
4bedb8b5c1 feat: menu optimization 2022-12-12 19:19:10 +08:00
lencx
dea81eb3d9 awesome 2022-12-12 18:50:31 +08:00
lencx
9e5dff5dab Merge pull request #22 from lencx/doc 2022-12-12 16:30:17 +08:00
lencx
2a3e252eb0 readme 2022-12-12 16:29:23 +08:00
lencx
0da9aef346 Merge pull request #21 from lencx/doc 2022-12-12 16:26:49 +08:00
lencx
fd221815a6 readme 2022-12-12 16:26:09 +08:00
lencx
410c1c597c Merge pull request #19 from lencx/doc 2022-12-12 14:14:07 +08:00
lencx
15610ae1d3 readme 2022-12-12 14:12:29 +08:00
lencx
bc940d97db Merge pull request #18 from lencx/dev 2022-12-12 13:05:06 +08:00
7 changed files with 43 additions and 22 deletions

View File

@@ -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

View File

@@ -10,7 +10,9 @@
[Awesome ChatGPT](./AWESOME.md)
## Downloads
## 📦 Downloads
[📝 Update Log](./UPDATE_LOG.md)
<!-- download start -->
@@ -24,7 +26,7 @@
<!-- download end -->
## Install
### Install
Easily install with _[Homebrew](https://brew.sh) ([Cask](https://docs.brew.sh/Cask-Cookbook)):_
@@ -41,7 +43,7 @@ tap repo, "https://github.com/#{repo}.git"
cask "popcorn-time", args: { "no-quarantine": true }
~~~
## Features
## Features
- multi-platform: `macOS` `Linux` `Windows`
- export ChatGPT history (PNG, PDF and Share Link)
@@ -54,34 +56,39 @@ 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.
## Preview
## TODO
- web access capability ([#20](https://github.com/lencx/ChatGPT/issues/20))
- ...
## 👀 Preview
<img width="320" src="./assets/install.png" alt="install"> <img width="320" src="./assets/chat.png" alt="chat">
<img width="320" src="./assets/export.png" alt="export"> <img width="320" src="./assets/tray.png" alt="tray">
<img width="320" src="./assets/auto-update.png" alt="auto update">
<img width="320" src="./assets/chat-ua.png" alt="user agent"> <img width="320" src="./assets/auto-update.png" alt="auto update">
---
<a href="https://www.buymeacoffee.com/lencx" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
## FAQ
## FAQ
### Can't open ChatGPT
@@ -124,6 +131,10 @@ yarn dev
yarn build
```
## ❤️ Thanks
- The share buttons code is copied directly from [@liady](https://github.com/liady) extension with minor modifications.
## Related
- [Tauri](https://tauri.app) - Build an optimized, secure, and frontend-independent application for multi-platform deployment.

View File

@@ -1,5 +1,9 @@
# UPDATE LOG
## v0.2.1
feat: menu optimization
## v0.2.0
feat: menu enhancement

BIN
assets/chat-ua.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

View File

@@ -17,11 +17,6 @@ pub fn init(context: &Context<EmbeddedAssets>) -> 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<EmbeddedAssets>) -> 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<EmbeddedAssets>) -> 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<EmbeddedAssets>) -> 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<tauri::Wry>) {
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<tauri::Wry>) {
)
.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();

View File

@@ -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 {

View File

@@ -7,7 +7,7 @@
},
"package": {
"productName": "ChatGPT",
"version": "0.2.0"
"version": "0.2.1"
},
"tauri": {
"allowlist": {