diff --git a/README-ZH_CN.md b/README-ZH_CN.md index 5fb9060..51f4e4c 100644 --- a/README-ZH_CN.md +++ b/README-ZH_CN.md @@ -97,7 +97,6 @@ sudo xattr -r -d com.apple.quarantine /YOUR_PATH/ChatGPT.app - 跨平台: `macOS` `Linux` `Windows` - 导出 ChatGPT 聊天记录 (支持 PNG, PDF 和生成分享链接) -- 主窗口和系统托盘支持自定义 URL,将任意网站包装成一个桌面应用 - 应用自动升级通知 - 丰富的快捷键 - 系统托盘悬浮窗 @@ -112,17 +111,14 @@ sudo xattr -r -d com.apple.quarantine /YOUR_PATH/ChatGPT.app - `Theme` - `Light`, `Dark`, `System` (仅支持 macOS 和 Windows) - `Stay On Top`: 窗口置顶 - `Titlebar`: 是否显示 `Titlebar`,仅 macOS 支持 - - `Inject Script`: 用于修改网站的用户自定义脚本 - `Hide Dock Icon` ([#35](https://github.com/lencx/ChatGPT/issues/35)): 隐藏 Dock 中的应用图标 (仅 macOS 支持) - 系统图盘右键单击打开菜单,然后在菜单项中点击 `Show Dock Icon` 可以重新将应用图标显示在 Dock(`SystemTrayMenu -> Show Dock Icon`) - `Control Center`: ChatGPT 应用的控制中心,它将为应用提供无限的可能 - 设置 `Theme`,`Stay On Top`,`Titlebar` 等 - `User Agent` ([#17](https://github.com/lencx/ChatGPT/issues/17)): 自定义 `user agent` 防止网站安全检测,默认值为空 - - `Switch Origin` ([#14](https://github.com/lencx/ChatGPT/issues/14)): 切换网站源地址,默认为 `https://chat.openai.com`。需要注意的是镜像网站的 UI 需要和原网站一致,否则可能会导致某些功能不工作 - `Go to Config`: 打开 ChatGPT 配置目录 (`path: ~/.chatgpt/*`) - `Clear Config`: 清除 ChatGPT 配置数据 (`path: ~/.chatgpt/*`), 这是危险操作,请提前备份数据 - `Restart ChatGPT`: 重启应用。如果注入脚本编辑完成,或者应用可卡死可以通过此菜单重新启动应用 - - `Awesome ChatGPT`: 一个很棒的 ChatGPT 推荐列表 - **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** diff --git a/README.md b/README.md index 7eb4d7f..31b3a1a 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,6 @@ You can look at **[awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt - Multi-platform: `macOS` `Linux` `Windows` - Text-to-Speech - Export ChatGPT history (PNG, PDF and Markdown) -- The main window and system tray support custom URLs to wrap any website into a desktop application - Automatic application upgrade notification - Common shortcut keys - System tray hover window diff --git a/UPDATE_LOG.md b/UPDATE_LOG.md index 008573c..c08a732 100644 --- a/UPDATE_LOG.md +++ b/UPDATE_LOG.md @@ -13,6 +13,21 @@ **New repository: https://github.com/lencx/nofwl** +## v1.0.0 + +Note: This version modifies some configuration files. It is recommended to backup the `~/.chatgpt` folder in advance to avoid loss of important configurations. + +Feat: + +- The synchronization method for prompts has been optimized, now supporting local file uploads +- Scripts have been externalized, allowing for editing and synchronization +- Removed the `Awesome` menu from `Control Center` + +Fix: + +- Chat history export is blank +- Change the export files location to the `Download` directory + ## v0.12.0 Feat: diff --git a/src-tauri/src/app/menu.rs b/src-tauri/src/app/menu.rs index 83f53e6..5e6bc10 100644 --- a/src-tauri/src/app/menu.rs +++ b/src-tauri/src/app/menu.rs @@ -145,6 +145,8 @@ pub fn init() -> Menu { .into(), CustomMenuItem::new("clear_conf", "Clear Config").into(), MenuItem::Separator.into(), + CustomMenuItem::new("chatgpt_sponsors", "ChatGPT Sponsors").into(), + MenuItem::Separator.into(), CustomMenuItem::new("nofwl", "NoFWL Desktop Application").into(), CustomMenuItem::new("sponsor", "Sponsor Author").into(), ]), @@ -245,6 +247,13 @@ pub fn menu_handler(event: WindowMenuEvent) { None, ), "nofwl" => open(&app, conf::NOFWL_APP), + "chatgpt_sponsors" => window::cmd::wa_window( + app, + "chatgpt_sponsors".into(), + "Sponsors".into(), + conf::APP_SPONSORS.into(), + None, + ), "sponsor" => window::sponsor_window(app), "popup_search" => { let app_conf = AppConf::read(); diff --git a/src-tauri/src/conf.rs b/src-tauri/src/conf.rs index 593c392..d43dfee 100644 --- a/src-tauri/src/conf.rs +++ b/src-tauri/src/conf.rs @@ -9,6 +9,7 @@ use tauri::TitleBarStyle; use crate::utils::{app_root, create_file, exists}; pub const APP_WEBSITE: &str = "https://lencx.github.io/app/"; +pub const APP_SPONSORS: &str = "https://lencx.github.io/app/sponsors"; 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"; diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 4d4ca34..74a904a 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -103,6 +103,11 @@ "windows": ["core", "main", "tray"], "domain": "openai.com", "enableTauriAPI": true + }, + { + "windows": ["chatgpt_sponsors", "app_website"], + "domain": "app.nofwl.com", + "enableTauriAPI": true } ] }, diff --git a/src/main.scss b/src/main.scss index cd4b9de..28a1d3b 100644 --- a/src/main.scss +++ b/src/main.scss @@ -125,8 +125,8 @@ body, transition: all 300ms ease; border-radius: 4px; &:hover { - color: rgba(0, 0, 0, 0.88); - background-color: rgba(0, 0, 0, 0.06); + color: rgba(120, 120, 90, 0.88); + background-color: rgba(40, 40, 40, 0.06); cursor: pointer; } } diff --git a/src/view/prompts/SyncCustom/Form.tsx b/src/view/prompts/SyncCustom/Form.tsx index 711176c..e330d57 100644 --- a/src/view/prompts/SyncCustom/Form.tsx +++ b/src/view/prompts/SyncCustom/Form.tsx @@ -58,9 +58,9 @@ const SyncForm: ForwardRefRenderFunction = ({ record } {`"cmd","act","prompt" -"cmd","act","prompt" -"cmd","act","prompt" -"cmd","act","prompt"`} +"a","aaa","aaa aaa" +"b","bbb","bbb bbb" +"c","ccc","ccc ccc"`} } > .csv diff --git a/src/view/prompts/SyncCustom/index.tsx b/src/view/prompts/SyncCustom/index.tsx index 46ff0fb..ce6deb4 100644 --- a/src/view/prompts/SyncCustom/index.tsx +++ b/src/view/prompts/SyncCustom/index.tsx @@ -154,7 +154,6 @@ export default function SyncCustom() { const file = vals?.file?.file?.originFileObj; const data = opAdd(vals); const parseData = await parseLocal(file); - if (parseData[0]) { const id = data[0].id; const filePath = await path.join(await chatRoot(), 'cache_prompts', `${id}.json`); @@ -164,6 +163,9 @@ export default function SyncCustom() { await promptCacheCmd(); hide(); message.success('Data added successfully'); + } else { + opRemove(data?.[0]?.[opSafeKey]); + return; } } } diff --git a/src/view/prompts/SyncRecord/index.tsx b/src/view/prompts/SyncRecord/index.tsx index 5f3c0ab..5b1f518 100644 --- a/src/view/prompts/SyncRecord/index.tsx +++ b/src/view/prompts/SyncRecord/index.tsx @@ -73,7 +73,7 @@ export default function SyncRecord() {
- + {filePath && }
{state?.last_updated && (