chore: clean up tauri commands

This commit is contained in:
reya
2024-05-18 14:59:34 +07:00
parent 99d9c70826
commit ca06f2b6ed
11 changed files with 21 additions and 388 deletions

View File

@@ -4,7 +4,6 @@ use std::path::PathBuf;
use tauri::utils::config::WindowEffectsConfig;
use tauri::window::Effect;
use tauri::TitleBarStyle;
use tauri::Url;
use tauri::WebviewWindowBuilder;
use tauri::{LogicalPosition, LogicalSize, Manager, WebviewUrl};
@@ -57,22 +56,6 @@ pub fn close_column(label: &str, app_handle: tauri::AppHandle) -> Result<bool, (
}
}
#[tauri::command]
pub fn navigate(label: &str, url: &str, app_handle: tauri::AppHandle) -> Result<(), String> {
match app_handle.get_webview(label) {
Some(mut webview) => {
if let Ok(new_url) = Url::parse(url) {
println!("navigate to: {}", new_url);
webview.navigate(new_url);
Ok(())
} else {
Err("URL is not valid".into())
}
}
None => Err("Webview not found".into()),
}
}
#[tauri::command]
pub fn reposition_column(
label: &str,