diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 2cb8df7..491248a 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -5,15 +5,6 @@ description = "A desktop and mobile leaderboards viewer for Berry Dash" authors = ["Lncvrt"] edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[lib] -# The `_lib` suffix may seem redundant but it is necessary -# to make the lib name unique and wouldn't conflict with the bin name. -# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 -name = "berry_leaderboards_lib" -crate-type = ["staticlib", "cdylib", "rlib"] - [build-dependencies] tauri-build = { version = "2.2.0", features = [] } diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs deleted file mode 100644 index 4a277ef..0000000 --- a/src-tauri/src/lib.rs +++ /dev/null @@ -1,14 +0,0 @@ -// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/ -#[tauri::command] -fn greet(name: &str) -> String { - format!("Hello, {}! You've been greeted from Rust!", name) -} - -#[cfg_attr(mobile, tauri::mobile_entry_point)] -pub fn run() { - tauri::Builder::default() - .plugin(tauri_plugin_opener::init()) - .invoke_handler(tauri::generate_handler![greet]) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); -} diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 9bc1c78..304764f 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -9,11 +9,15 @@ fn main() { #[cfg(target_os = "macos")] { use tauri::Manager; - use window_vibrancy::{apply_vibrancy, NSVisualEffectMaterial}; + use window_vibrancy::{apply_vibrancy, NSVisualEffectMaterial, NSVisualEffectState}; let window = app.get_webview_window("main").unwrap(); - apply_vibrancy(&window, NSVisualEffectMaterial::HudWindow, None, None) - .expect("Unsupported platform! 'apply_vibrancy' is only supported on macOS"); + apply_vibrancy( + &window, + NSVisualEffectMaterial::UnderWindowBackground, + Some(NSVisualEffectState::Active), + None + ).expect("failed to apply vibrancy"); } Ok(()) })