mirror of
https://github.com/lencx/ChatGPT.git
synced 2024-10-01 01:06:13 -04:00
chore: config
This commit is contained in:
parent
9cb4009ec2
commit
da1e66bb9f
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@ -54,10 +54,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
key: ${{ matrix.target }}
|
key: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Install xattr (macos only)
|
|
||||||
if: matrix.os == 'macos-latest'
|
|
||||||
run: pip install xattr
|
|
||||||
|
|
||||||
- name: Install dependencies (ubuntu only)
|
- name: Install dependencies (ubuntu only)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
@ -110,11 +106,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install xattr
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y xattr
|
|
||||||
|
|
||||||
- name: Query version number
|
- name: Query version number
|
||||||
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV
|
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
22
Cargo.lock
generated
22
Cargo.lock
generated
@ -2140,6 +2140,16 @@ dependencies = [
|
|||||||
"winapi",
|
"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]]
|
[[package]]
|
||||||
name = "overload"
|
name = "overload"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
@ -2959,6 +2969,16 @@ dependencies = [
|
|||||||
"lazy_static",
|
"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]]
|
[[package]]
|
||||||
name = "siphasher"
|
name = "siphasher"
|
||||||
version = "0.3.10"
|
version = "0.3.10"
|
||||||
@ -3250,6 +3270,7 @@ dependencies = [
|
|||||||
"once_cell",
|
"once_cell",
|
||||||
"open",
|
"open",
|
||||||
"os_info",
|
"os_info",
|
||||||
|
"os_pipe",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"raw-window-handle",
|
"raw-window-handle",
|
||||||
@ -3260,6 +3281,7 @@ dependencies = [
|
|||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_repr",
|
"serde_repr",
|
||||||
"serialize-to-javascript",
|
"serialize-to-javascript",
|
||||||
|
"shared_child",
|
||||||
"state",
|
"state",
|
||||||
"tar",
|
"tar",
|
||||||
"tauri-macros",
|
"tauri-macros",
|
||||||
|
@ -26,7 +26,7 @@ wry = "0.24.1"
|
|||||||
dark-light = "1.0.0"
|
dark-light = "1.0.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tokio = { version = "1.23.0", features = ["macros"] }
|
tokio = { version = "1.23.0", features = ["macros"] }
|
||||||
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 = { 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-all", "shell-open-api", "system-tray", "updater"] }
|
||||||
tauri-plugin-positioner = { git = "https://github.com/lencx/tauri-plugins-workspace", features = ["system-tray"] }
|
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-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-autostart = { git = "https://github.com/lencx/tauri-plugins-workspace", branch = "dev" }
|
||||||
|
@ -72,6 +72,12 @@ pub fn init() -> Menu {
|
|||||||
} else {
|
} else {
|
||||||
system_tray
|
system_tray
|
||||||
};
|
};
|
||||||
|
let hide_dock_icon = CustomMenuItem::new("hide_dock_icon", "Hide Dock Icon");
|
||||||
|
let hide_dock_icon_menu = if app_conf.tray {
|
||||||
|
hide_dock_icon
|
||||||
|
} else {
|
||||||
|
hide_dock_icon.disabled()
|
||||||
|
};
|
||||||
|
|
||||||
let auto_update = app_conf.get_auto_update();
|
let auto_update = app_conf.get_auto_update();
|
||||||
let preferences_menu = Submenu::new(
|
let preferences_menu = Submenu::new(
|
||||||
@ -85,7 +91,7 @@ pub fn init() -> Menu {
|
|||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
titlebar_menu.into(),
|
titlebar_menu.into(),
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
CustomMenuItem::new("hide_dock_icon", "Hide Dock Icon").into(),
|
hide_dock_icon_menu.into(),
|
||||||
system_tray_menu.into(),
|
system_tray_menu.into(),
|
||||||
CustomMenuItem::new("inject_script", "Inject Script")
|
CustomMenuItem::new("inject_script", "Inject Script")
|
||||||
.accelerator("CmdOrCtrl+J")
|
.accelerator("CmdOrCtrl+J")
|
||||||
@ -134,6 +140,7 @@ pub fn init() -> Menu {
|
|||||||
popup_search_menu.into(),
|
popup_search_menu.into(),
|
||||||
CustomMenuItem::new("sync_prompts", "Sync Prompts").into(),
|
CustomMenuItem::new("sync_prompts", "Sync Prompts").into(),
|
||||||
MenuItem::Separator.into(),
|
MenuItem::Separator.into(),
|
||||||
|
CustomMenuItem::new("clear_cache", "Clear Cache").into(),
|
||||||
CustomMenuItem::new("go_conf", "Go to Config")
|
CustomMenuItem::new("go_conf", "Go to Config")
|
||||||
.accelerator("CmdOrCtrl+Shift+G")
|
.accelerator("CmdOrCtrl+Shift+G")
|
||||||
.into(),
|
.into(),
|
||||||
@ -236,6 +243,20 @@ pub fn menu_handler(event: WindowMenuEvent<tauri::Wry>) {
|
|||||||
"inject_script" => open(&app, &script_path),
|
"inject_script" => open(&app, &script_path),
|
||||||
"go_conf" => utils::open_file(utils::app_root()),
|
"go_conf" => utils::open_file(utils::app_root()),
|
||||||
"clear_conf" => utils::clear_conf(&app),
|
"clear_conf" => utils::clear_conf(&app),
|
||||||
|
"clear_cache" => {
|
||||||
|
let main_win = app.get_window("core");
|
||||||
|
let tray_win = app.get_window("tray");
|
||||||
|
if let Some(main) = main_win {
|
||||||
|
main
|
||||||
|
.eval("window.__clearCache && window.__clearCache()")
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
if let Some(tray) = tray_win {
|
||||||
|
tray
|
||||||
|
.eval("window.__clearCache && window.__clearCache()")
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
"app_website" => window::cmd::wa_window(
|
"app_website" => window::cmd::wa_window(
|
||||||
app,
|
app,
|
||||||
"app_website".into(),
|
"app_website".into(),
|
||||||
|
7
src-tauri/src/scripts/core.js
vendored
7
src-tauri/src/scripts/core.js
vendored
@ -176,6 +176,13 @@ function coreZoom() {
|
|||||||
window.__zoomIn = zoomIn;
|
window.__zoomIn = zoomIn;
|
||||||
window.__zoomOut = zoomOut;
|
window.__zoomOut = zoomOut;
|
||||||
window.__zoom0 = zoom0;
|
window.__zoom0 = zoom0;
|
||||||
|
|
||||||
|
window.__clearCache = () => {
|
||||||
|
window.localStorage.clear();
|
||||||
|
window.sessionStorage.clear();
|
||||||
|
window.applicationCache && window.applicationCache.update();
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
"globalShortcut": {
|
"globalShortcut": {
|
||||||
"all": true
|
"all": true
|
||||||
},
|
},
|
||||||
|
"shell": {
|
||||||
|
"all": true
|
||||||
|
},
|
||||||
"fs": {
|
"fs": {
|
||||||
"all": false,
|
"all": false,
|
||||||
"readFile": true,
|
"readFile": true,
|
||||||
@ -25,7 +28,8 @@
|
|||||||
"removeFile": true,
|
"removeFile": true,
|
||||||
"removeDir": true,
|
"removeDir": true,
|
||||||
"scope": [
|
"scope": [
|
||||||
"$HOME/.chatgpt/**"
|
"$HOME/.chatgpt/**",
|
||||||
|
"$DOWNLOAD/**"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"path": {
|
"path": {
|
||||||
|
4
src/view/settings/General.tsx
vendored
4
src/view/settings/General.tsx
vendored
@ -33,11 +33,11 @@ export default function General() {
|
|||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
{platformInfo === 'darwin' && (
|
{/* {platformInfo === 'darwin' && (
|
||||||
<Form.Item label="Hide Dock Icon" name="hide_dock_icon" valuePropName="checked">
|
<Form.Item label="Hide Dock Icon" name="hide_dock_icon" valuePropName="checked">
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)} */}
|
||||||
<Form.Item label="Theme" name="theme">
|
<Form.Item label="Theme" name="theme">
|
||||||
<Radio.Group>
|
<Radio.Group>
|
||||||
<Radio value="light">Light</Radio>
|
<Radio value="light">Light</Radio>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "ESNext",
|
"target": "ES2015",
|
||||||
"useDefineForClassFields": true,
|
"useDefineForClassFields": true,
|
||||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||||
"allowJs": false,
|
"allowJs": false,
|
||||||
|
Loading…
Reference in New Issue
Block a user