mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 07:35:24 +00:00
feat: move automations into a first-party plugin
This commit is contained in:
1 parent
a6f6a0439c
commit
e0f14f2ecf
47 files changed
+384
-125
No files matched your search
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Frontend half of the automations plugin.
|
||||
*
|
||||
* AutomationsPanel is a left-sidebar railView panel (opened from the rail,
|
||||
* not a Tab), the same shape as FleetsPanel/HostsPanel/AiPanel. None of those
|
||||
* go through registerRailItem/registerTabComponent either -- per
|
||||
* src/ui/shell/pluginLoader.ts's own comment, a rail-view panel like this is
|
||||
* rendered directly by AppShell.tsx rather than registered at runtime, the
|
||||
* same way ai's AiPanel is. AutomationsPanel is reached today through a
|
||||
* direct relative import in AppShell.tsx
|
||||
* (../../plugins/automations/frontend/AutomationsPanel) and in
|
||||
* src/ui/shell/tabUtils.tsx (for its promotable/dockable tab surface), not
|
||||
* through register() below.
|
||||
*
|
||||
* register()/unregister() still follow the same shape every other plugin's
|
||||
* frontend entry does, so this is ready the moment a real frontend plugin
|
||||
* loader exists -- see plugins/ssh-terminal/frontend/index.mjs and
|
||||
* src/ui/tests/sidebar/plugin-extension-seam.test.tsx, which says outright
|
||||
* "there is no plugin loader yet".
|
||||
*/
|
||||
|
||||
export const id = "automations";
|
||||
export const railViewId = "automations";
|
||||
|
||||
export async function register({ registerRailItem, icons }) {
|
||||
registerRailItem?.({
|
||||
id: railViewId,
|
||||
icon: icons.Workflow,
|
||||
labelKey: "nav.automations",
|
||||
separatorAfter: true,
|
||||
});
|
||||
}
|
||||
|
||||
export async function unregister({ unregisterRailItem }) {
|
||||
unregisterRailItem?.(railViewId);
|
||||
}
|
||||
Reference in new issue
Block a user