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

chore: fmt

This commit is contained in:
lencx 2023-01-21 22:51:16 +08:00
parent 5b6a69444e
commit 1e5ec6028d
3 changed files with 36 additions and 36 deletions

View File

@ -299,8 +299,8 @@ pub async fn sync_prompts(app: AppHandle, time: u64) -> Option<Vec<ModelRecord>>
fs::write(
&model,
serde_json::json!({
"name": "ChatGPT Model",
"link": "https://github.com/lencx/ChatGPT"
"name": "ChatGPT Model",
"link": "https://github.com/lencx/ChatGPT"
})
.to_string(),
)
@ -319,9 +319,9 @@ pub async fn sync_prompts(app: AppHandle, time: u64) -> Option<Vec<ModelRecord>>
fs::write(
model_cmd,
serde_json::to_string_pretty(&serde_json::json!({
"name": "ChatGPT CMD",
"last_updated": time,
"data": cmd_data,
"name": "ChatGPT CMD",
"last_updated": time,
"data": cmd_data,
}))
.unwrap(),
)

View File

@ -348,18 +348,18 @@ pub fn menu_handler(event: WindowMenuEvent<tauri::Wry>) {
"scroll_top" => win
.eval(
r#"window.scroll({
top: 0,
left: 0,
behavior: "smooth"
})"#,
top: 0,
left: 0,
behavior: "smooth"
})"#,
)
.unwrap(),
"scroll_bottom" => win
.eval(
r#"window.scroll({
top: document.body.scrollHeight,
left: 0,
behavior: "smooth"})"#,
top: document.body.scrollHeight,
left: 0,
behavior: "smooth"})"#,
)
.unwrap(),
// Help

View File

@ -18,32 +18,32 @@ pub const BUY_COFFEE: &str = "https://www.buymeacoffee.com/lencx";
pub const GITHUB_PROMPTS_CSV_URL: &str =
"https://raw.githubusercontent.com/f/awesome-chatgpt-prompts/main/prompts.csv";
pub const DEFAULT_CHAT_CONF: &str = r#"{
"stay_on_top": false,
"auto_update": "Prompt",
"theme": "Light",
"tray": true,
"titlebar": true,
"popup_search": false,
"global_shortcut": "",
"hide_dock_icon": false,
"default_origin": "https://chat.openai.com",
"origin": "https://chat.openai.com",
"ua_window": "",
"ua_tray": ""
"stay_on_top": false,
"auto_update": "Prompt",
"theme": "Light",
"tray": true,
"titlebar": true,
"popup_search": false,
"global_shortcut": "",
"hide_dock_icon": false,
"default_origin": "https://chat.openai.com",
"origin": "https://chat.openai.com",
"ua_window": "",
"ua_tray": ""
}"#;
pub const DEFAULT_CHAT_CONF_MAC: &str = r#"{
"stay_on_top": false,
"auto_update": "Prompt",
"theme": "Light",
"tray": true,
"titlebar": false,
"popup_search": false,
"global_shortcut": "",
"hide_dock_icon": false,
"default_origin": "https://chat.openai.com",
"origin": "https://chat.openai.com",
"ua_window": "",
"ua_tray": ""
"stay_on_top": false,
"auto_update": "Prompt",
"theme": "Light",
"tray": true,
"titlebar": false,
"popup_search": false,
"global_shortcut": "",
"hide_dock_icon": false,
"default_origin": "https://chat.openai.com",
"origin": "https://chat.openai.com",
"ua_window": "",
"ua_tray": ""
}"#;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]