mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-26 18:48:35 +02:00
Tweak workspace settings and a bunch of small things
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
use crate::api::{
|
||||
PluginSearchResponse, PluginUpdatesResponse, check_plugin_updates, search_plugins,
|
||||
check_plugin_updates, search_plugins, PluginSearchResponse, PluginUpdatesResponse,
|
||||
};
|
||||
use crate::error::Result;
|
||||
use crate::install::download_and_install;
|
||||
use tauri::{AppHandle, Runtime, WebviewWindow, command};
|
||||
use crate::install::{delete_and_uninstall, download_and_install};
|
||||
use tauri::{command, AppHandle, Runtime, WebviewWindow};
|
||||
use yaak_models::models::Plugin;
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn search<R: Runtime>(
|
||||
@@ -23,6 +24,14 @@ pub(crate) async fn install<R: Runtime>(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn uninstall<R: Runtime>(
|
||||
plugin_id: &str,
|
||||
window: WebviewWindow<R>,
|
||||
) -> Result<Plugin> {
|
||||
delete_and_uninstall(&window, plugin_id).await
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub(crate) async fn updates<R: Runtime>(app_handle: AppHandle<R>) -> Result<PluginUpdatesResponse> {
|
||||
check_plugin_updates(&app_handle).await
|
||||
|
||||
Reference in New Issue
Block a user