Improve column management (#221)

* wip: redesign store

* feat: update trending column

* feat: add more functions
This commit is contained in:
雨宮蓮
2024-07-02 12:51:50 +07:00
committed by GitHub
parent ed4f89ff66
commit 8eb01c8bbf
17 changed files with 281 additions and 214 deletions

View File

@@ -138,6 +138,21 @@ pub fn resize_column(
}
}
#[tauri::command]
#[specta::specta]
pub fn reload_column(label: &str, app_handle: tauri::AppHandle) -> Result<(), String> {
match app_handle.get_webview(label) {
Some(webview) => {
if webview.eval("window.location.reload()").is_ok() {
Ok(())
} else {
Err("Reload column failed".into())
}
}
None => Err("Webview not found".into()),
}
}
#[tauri::command]
#[specta::specta]
pub fn open_window(window: Window, app_handle: tauri::AppHandle) -> Result<(), String> {