forked from 1b-agent/opencadstudio-upstream
1 parent
6686141d3b
commit
2424eeb74d
10 files changed
+56
-22
No files matched your search
+13
-5
@@ -291,8 +291,11 @@ impl OpenCADStudio {
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub(in crate::app) fn fetch_releases_task(&self, _repo: String) -> Task<Message> {
|
||||
Task::none()
|
||||
pub(in crate::app) fn fetch_releases_task(&self, repo: String) -> Task<Message> {
|
||||
Task::done(Message::PluginReleasesFetched(
|
||||
repo,
|
||||
Err("External plugins are available in the desktop app.".to_string()),
|
||||
))
|
||||
}
|
||||
|
||||
/// Background task: fetch a repository README from its default branch.
|
||||
@@ -306,8 +309,11 @@ impl OpenCADStudio {
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub(in crate::app) fn fetch_plugin_readme_task(&self, _repo: String) -> Task<Message> {
|
||||
Task::none()
|
||||
pub(in crate::app) fn fetch_plugin_readme_task(&self, repo: String) -> Task<Message> {
|
||||
Task::done(Message::PluginReadmeFetched(
|
||||
repo,
|
||||
Err("Plugin details are available in the desktop app.".to_string()),
|
||||
))
|
||||
}
|
||||
|
||||
/// Background task: download and install the `tag` release of `owner/repo`.
|
||||
@@ -328,7 +334,9 @@ impl OpenCADStudio {
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub(in crate::app) fn install_task(&self, _repo: String, _tag: String) -> Task<Message> {
|
||||
Task::none()
|
||||
Task::done(Message::PluginInstalled(Err(
|
||||
"External plugins are available in the desktop app.".to_string(),
|
||||
)))
|
||||
}
|
||||
|
||||
/// Gather the full persisted config (all sections) from live app state.
|
||||
|
||||
+12
-8
@@ -4056,14 +4056,20 @@ impl OpenCADStudio {
|
||||
|
||||
// ── Plugin Manager window ─────────────────────────────────────
|
||||
Message::PluginManagerOpen => {
|
||||
// Refresh the on-disk external-plugin list each time the manager
|
||||
// opens so newly dropped-in packages show up.
|
||||
self.external_plugins = crate::plugin::external::discover();
|
||||
self.marketplace_status.clear();
|
||||
self.active_modal = Some(super::ModalKind::PluginManager);
|
||||
// Fetch the curated registry and release lists for linked repos.
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
{
|
||||
self.command_line
|
||||
.push_info("External plugins are available in the desktop app.");
|
||||
return Task::none();
|
||||
}
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
{
|
||||
// Refresh the on-disk external-plugin list each time the manager
|
||||
// opens so newly dropped-in packages show up.
|
||||
self.external_plugins = crate::plugin::external::discover();
|
||||
self.marketplace_status.clear();
|
||||
self.active_modal = Some(super::ModalKind::PluginManager);
|
||||
// Fetch the curated registry and release lists for linked repos.
|
||||
self.plugin_registry_loading = true;
|
||||
self.plugin_registry_error = None;
|
||||
self.plugin_registry_error_details_open = false;
|
||||
@@ -4100,8 +4106,6 @@ impl OpenCADStudio {
|
||||
}
|
||||
return Task::batch(tasks);
|
||||
}
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
Task::none()
|
||||
}
|
||||
Message::PluginManagerClose => {
|
||||
self.close_active_modal();
|
||||
|
||||
Reference in new issue
Block a user