Improve column management (#221)
* wip: redesign store * feat: update trending column * feat: add more functions
This commit is contained in:
@@ -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> {
|
||||
|
||||
@@ -124,6 +124,7 @@ fn main() {
|
||||
commands::window::close_column,
|
||||
commands::window::reposition_column,
|
||||
commands::window::resize_column,
|
||||
commands::window::reload_column,
|
||||
commands::window::open_window,
|
||||
commands::window::open_main_window,
|
||||
commands::window::set_badge
|
||||
|
||||
Reference in New Issue
Block a user