fix: finish 2.9.0 plugin moves and get every check green

This commit is contained in:
LukeGus committed 2026-09-24 23:35:18 -05:00
1 parent 8c1e02af89
commit 6489b62ece
335 files changed
+29878 -17749

No files matched your search

+20 -1
View File
@@ -4,7 +4,10 @@ import type {
PluginManifest,
TermixApp,
} from "@termix/plugin-sdk/frontend";
import type { PluginContributions } from "@/api/plugins-api";
import {
PLUGIN_SETTINGS_CHANGED_EVENT,
type PluginContributions,
} from "@/api/plugins-api";
import { registerRailItem } from "@/sidebar/rail-items";
import { registerTabType, type TabRenderProps } from "@/shell/tab-registry";
import { registerPanel, type PanelRenderProps } from "@/shell/panel-registry";
@@ -415,6 +418,22 @@ export function createPluginApp(
onRemoteServerChange: (listener) => track(onRemoteServerChange(listener)),
},
onSettingsChanged: (listener) => {
const handler = (event: Event) => {
const detail = (event as CustomEvent).detail as {
pluginId?: string;
scope: "admin" | "user" | "host";
hostId?: number;
};
if (detail?.pluginId !== pluginId) return;
listener({ scope: detail.scope, hostId: detail.hostId });
};
window.addEventListener(PLUGIN_SETTINGS_CHANGED_EVENT, handler);
return track(() =>
window.removeEventListener(PLUGIN_SETTINGS_CHANGED_EVENT, handler),
);
},
onDispose(dispose) {
if (disposed) {
dispose();