feat: replace core homepage widget registry with generic extension points

This commit is contained in:
LukeGus committed 2026-09-29 13:23:51 -05:00
1 parent b8bbcd2196
commit 50d43e29fb
18 files changed
+242 -147

No files matched your search

+4 -9
View File
@@ -1,10 +1,6 @@
import type { ComponentType } from "react";
import { Network, Plug } from "lucide-react";
import type {
HomepageWidgetContribution,
TabProps,
TermixApp,
} from "@termix/plugin-sdk/frontend";
import type { TabProps, TermixApp } from "@termix/plugin-sdk/frontend";
import { TunnelTab } from "./TunnelTab";
import { HostTunnelsSection } from "./HostTunnelsSection";
import {
@@ -84,7 +80,7 @@ export function activate(app: TermixApp): void {
icon: Plug as ComponentType<{ className?: string }>,
});
app.registerHomepageWidget({
app.registerExtension("homepage.widgets", {
id: "tunnel_widget",
name: "Tunnel Manager",
description: "Embedded SSH tunnel manager for a configured host",
@@ -93,9 +89,8 @@ export function activate(app: TermixApp): void {
defaultConfig: { hostId: 0 },
defaultSize: { w: GRID_SIZE * 16, h: GRID_SIZE * 10 },
minSize: { w: GRID_SIZE * 8, h: GRID_SIZE * 6 },
component: TunnelWidget,
editFormComponent: TunnelWidgetEditForm,
} as HomepageWidgetContribution);
components: { view: TunnelWidget, editForm: TunnelWidgetEditForm },
});
// The dashboard's active tunnel counter.
app.registerAction(