mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-29 21:51:59 +02:00
Tweak workspace settings and a bunch of small things
This commit is contained in:
@@ -13,6 +13,13 @@ use yaak_models::models::Plugin;
|
||||
use yaak_models::query_manager::QueryManagerExt;
|
||||
use yaak_models::util::UpdateSource;
|
||||
|
||||
pub async fn delete_and_uninstall<R: Runtime>(window: &WebviewWindow<R>, plugin_id: &str) -> Result<Plugin> {
|
||||
let plugin_manager = window.state::<PluginManager>();
|
||||
let plugin = window.db().delete_plugin_by_id(plugin_id, &UpdateSource::from_window(&window))?;
|
||||
plugin_manager.uninstall(&PluginWindowContext::new(&window), plugin.directory.as_str()).await?;
|
||||
Ok(plugin)
|
||||
}
|
||||
|
||||
pub async fn download_and_install<R: Runtime>(
|
||||
window: &WebviewWindow<R>,
|
||||
name: &str,
|
||||
|
||||
Reference in New Issue
Block a user