mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-31 23:55:23 +00:00
feat: convert wake-on-lan into a plugin (B20)
This commit is contained in:
1 parent
d4ec444558
commit
2ac7779eda
50 files changed
+17844
-199
No files matched your search
@@ -0,0 +1,15 @@
|
||||
import { Zap } from "lucide-react";
|
||||
import type { TermixApp } from "@termix/plugin-sdk/frontend";
|
||||
import { hasMacAddress, wakeHost } from "./host-action.js";
|
||||
|
||||
export function activate(app: TermixApp): void {
|
||||
app.registerHostAction({
|
||||
id: "wake-on-lan",
|
||||
titleKey: "hostAction.title",
|
||||
icon: Zap,
|
||||
kind: "open",
|
||||
order: 50,
|
||||
when: (host) => hasMacAddress(host as Record<string, unknown>),
|
||||
run: (host) => wakeHost(app.api, app.t, String(host.id)),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user