mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 15:15:24 +00:00
feat: replace core homepage widget registry with generic extension points
This commit is contained in:
1 parent
b8bbcd2196
commit
50d43e29fb
18 files changed
+242
-147
No files matched your search
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user