Add links to plugins

This commit is contained in:
Gregory Schier
2025-06-23 09:46:54 -07:00
parent 1948fb78bd
commit a1b1eafd39
6 changed files with 29 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
use crate::error::Error::ApiErr;
use crate::error::Result;
use crate::plugin_meta::get_plugin_meta;
use log::{info, warn};
@@ -9,7 +10,6 @@ use tauri::{AppHandle, Runtime, is_dev};
use ts_rs::TS;
use yaak_common::api_client::yaak_api_client;
use yaak_models::query_manager::QueryManagerExt;
use crate::error::Error::ApiErr;
pub async fn get_plugin<R: Runtime>(
app_handle: &AppHandle<R>,
@@ -108,6 +108,7 @@ fn base_url(path: &str) -> Url {
pub struct PluginVersion {
pub id: String,
pub version: String,
pub url: String,
pub description: Option<String>,
pub name: String,
pub display_name: String,

View File

@@ -52,7 +52,7 @@ pub async fn download_and_install<R: Runtime>(
checked_at: Some(Utc::now().naive_utc()),
directory: plugin_dir_str.clone(),
enabled: true,
url: None,
url: Some(plugin_version.url.clone()),
..Default::default()
},
&UpdateSource::Background,