mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
feat: add menu item
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
use crate::{app::window, conf, utils};
|
||||
use tauri::{utils::config::WindowUrl, window::WindowBuilder, App, Manager};
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
use tauri::TitleBarStyle;
|
||||
|
||||
pub fn init(
|
||||
app: &mut App,
|
||||
chat_conf: conf::ChatConfJson,
|
||||
) -> std::result::Result<(), Box<dyn std::error::Error>> {
|
||||
let conf = utils::get_tauri_conf().unwrap();
|
||||
let url = conf.build.dev_path.to_string();
|
||||
let tauri_conf = utils::get_tauri_conf().unwrap();
|
||||
let url = tauri_conf.build.dev_path.to_string();
|
||||
let theme = conf::ChatConfJson::theme();
|
||||
window::mini_window(&app.app_handle());
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
@@ -18,8 +16,9 @@ pub fn init(
|
||||
.fullscreen(false)
|
||||
.inner_size(800.0, 600.0)
|
||||
.hidden_title(true)
|
||||
.title_bar_style(TitleBarStyle::Overlay)
|
||||
.theme(theme)
|
||||
.always_on_top(chat_conf.always_on_top)
|
||||
.title_bar_style(conf::ChatConfJson::titlebar())
|
||||
.initialization_script(&utils::user_script())
|
||||
.initialization_script(include_str!("../assets/html2canvas.js"))
|
||||
.initialization_script(include_str!("../assets/jspdf.js"))
|
||||
@@ -34,6 +33,7 @@ pub fn init(
|
||||
.resizable(true)
|
||||
.fullscreen(false)
|
||||
.inner_size(800.0, 600.0)
|
||||
.theme(theme)
|
||||
.always_on_top(chat_conf.always_on_top)
|
||||
.initialization_script(&utils::user_script())
|
||||
.initialization_script(include_str!("../assets/html2canvas.js"))
|
||||
|
||||
Reference in New Issue
Block a user