add shadcn-svelte, add custom titlebar
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#[tauri::command]
|
||||
pub fn wave(name: &str) -> String {
|
||||
format!("Hello, {}! You've been waved from Rust, with a different file!", name)
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn greet(name: &str) -> String {
|
||||
format!("Hello, {}! You've been greeted from Rust, with a different file!", name)
|
||||
}
|
@@ -1,12 +1,23 @@
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
mod actions;
|
||||
use tauri::Manager;
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
let mut builder = tauri::Builder::default().plugin(tauri_plugin_fs::init());
|
||||
#[cfg(desktop)]
|
||||
{
|
||||
builder = builder.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
||||
let _ = app
|
||||
.get_webview_window("main")
|
||||
.expect("no main window")
|
||||
.set_focus();
|
||||
}));
|
||||
}
|
||||
|
||||
builder
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.plugin(tauri_plugin_sql::Builder::default().build())
|
||||
.invoke_handler(tauri::generate_handler![actions::greet, actions::wave])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
|
Reference in New Issue
Block a user