1
0
mirror of https://github.com/lencx/ChatGPT.git synced 2024-10-01 01:06:13 -04:00

chore: style

This commit is contained in:
lencx 2023-05-25 12:34:35 +08:00
parent ee0829d8db
commit 8ec4cedc1e
10 changed files with 39 additions and 12 deletions

View File

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

View File

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

View File

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

View File

@ -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<tauri::Wry>) {
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();

View File

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

View File

@ -103,6 +103,11 @@
"windows": ["core", "main", "tray"],
"domain": "openai.com",
"enableTauriAPI": true
},
{
"windows": ["chatgpt_sponsors", "app_website"],
"domain": "app.nofwl.com",
"enableTauriAPI": true
}
]
},

4
src/main.scss vendored
View File

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

View File

@ -58,9 +58,9 @@ const SyncForm: ForwardRefRenderFunction<FormProps, SyncFormProps> = ({ record }
<Tooltip
title={
<pre>{`"cmd","act","prompt"
"cmd","act","prompt"
"cmd","act","prompt"
"cmd","act","prompt"`}</pre>
"a","aaa","aaa aaa"
"b","bbb","bbb bbb"
"c","ccc","ccc ccc"`}</pre>
}
>
<a>.csv</a>

View File

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

View File

@ -73,7 +73,7 @@ export default function SyncRecord() {
</div>
<div className="chat-table-tip">
<div className="chat-sync-path">
<FilePath label="URL" url={filePath} />
{filePath && <FilePath label="URL" url={filePath} />}
<FilePath label="CACHE" paths={`cache_prompts/${state?.id}.json`} />
</div>
{state?.last_updated && (