diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 08f6524..0ea8b6d 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -43,7 +43,6 @@ fn main() { game::add_game, game::list_games, window::open_file_dialog, - window::close_file_dialog ]) .run(tauri::generate_context!()) .expect("error while running tauri application"); diff --git a/src-tauri/src/window.rs b/src-tauri/src/window.rs index 700f28c..f409748 100644 --- a/src-tauri/src/window.rs +++ b/src-tauri/src/window.rs @@ -1,34 +1,18 @@ -use tauri::Manager; use window_shadows::set_shadow; use crate::{error::BackendError, Response}; #[tauri::command] pub async fn open_file_dialog(handle: tauri::AppHandle) -> Result { - let dialog = tauri::WindowBuilder::new(&handle, "file", tauri::WindowUrl::App("file.html".into())) - .decorations(false) - .build()?; + let dialog = + tauri::WindowBuilder::new(&handle, "file", tauri::WindowUrl::App("file.html".into())) + .decorations(false) + .build()?; set_shadow(dialog, true)?; - - Ok(Response { - kind: "success".to_owned(), - message: "Window::OpenFileDialog successful".to_owned(), - }) -} - -#[tauri::command] -pub async fn close_file_dialog(handle: tauri::AppHandle) -> Result { - handle - .get_window("file") - .ok_or(BackendError { - kind: "tauri::Error".to_owned(), - message: "the window with the label `file` not found".to_owned(), - })? - .close()?; Ok(Response { kind: "success".to_owned(), - message: "Window::CloseFileDialog successful".to_owned(), + message: "Window::OpenFileDialog successful".to_owned(), }) } diff --git a/src/App.vue b/src/App.vue index 3c8caf1..defc374 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,17 +1,21 @@ diff --git a/src/style.css b/src/style.css index 1a9a8d0..b5c61c9 100644 --- a/src/style.css +++ b/src/style.css @@ -1,13 +1,3 @@ @tailwind base; @tailwind components; @tailwind utilities; - -/* Titlebar.vue */ - -#titlebar { - @apply navbar bg-base-100 absolute shadow-lg shadow-base-300; -} - -#titlebar-hover { - @apply absolute w-full h-8; -}