mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 14:45:24 +00:00
feat: finish the remote-desktop plugin (B14)
This commit is contained in:
1 parent
0af2c94983
commit
14eb558b85
215 files changed
+30029
-3921
No files matched your search
@@ -18,6 +18,7 @@ import {
|
||||
registerHostContextMenuItem,
|
||||
} from "@/sidebar/host-contributions";
|
||||
import { registerPaletteEntry } from "@/shell/palette-registry";
|
||||
import { registerHostProtocol } from "@/sidebar/host-protocols";
|
||||
import {
|
||||
registerDashboardCard,
|
||||
type DashboardCardRenderProps,
|
||||
@@ -30,7 +31,7 @@ import {
|
||||
registerAction,
|
||||
registerSlotContribution,
|
||||
} from "@/shell/action-registry";
|
||||
import { pluginWsUrl } from "@/lib/plugin-transport";
|
||||
import { pluginApiFor, pluginWsUrl } from "@/lib/plugin-transport";
|
||||
import { registerPluginComponent } from "./component-registry";
|
||||
import type { WidgetTypeDefinition } from "@/types/homepage-types";
|
||||
import type { LucideIcon } from "lucide-react";
|
||||
@@ -208,6 +209,19 @@ export function createPluginApp(
|
||||
);
|
||||
},
|
||||
|
||||
registerHostProtocol(protocol) {
|
||||
return track(
|
||||
registerHostProtocol({
|
||||
...protocol,
|
||||
pluginId,
|
||||
titleKey: key(protocol.titleKey),
|
||||
descriptionKey: protocol.descriptionKey
|
||||
? key(protocol.descriptionKey)
|
||||
: undefined,
|
||||
}),
|
||||
);
|
||||
},
|
||||
|
||||
registerHostBadge(badge) {
|
||||
return track(
|
||||
registerHostBadge({
|
||||
@@ -367,6 +381,12 @@ export function createPluginApp(
|
||||
}
|
||||
},
|
||||
api: pluginHostBridge.getApi(pluginId),
|
||||
apiFor: (origin) =>
|
||||
pluginApiFor(
|
||||
pluginId,
|
||||
origin as never,
|
||||
pluginHostBridge.getApi(pluginId) as never,
|
||||
) as unknown as TermixApp["api"],
|
||||
wsUrl: (path, options) =>
|
||||
pluginWsUrl(pluginId, path, options as never) as ReturnType<
|
||||
TermixApp["wsUrl"]
|
||||
|
||||
Reference in new issue
Block a user