added reboot to command menu
This commit is contained in:
@@ -32,6 +32,7 @@ import {
|
|||||||
XCircleIcon,
|
XCircleIcon,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
import { RebootDialog } from "@components/Dialog/RebootDialog.tsx";
|
||||||
|
|
||||||
export interface Group {
|
export interface Group {
|
||||||
label: string;
|
label: string;
|
||||||
@@ -117,7 +118,7 @@ export const CommandPalette = () => {
|
|||||||
return {
|
return {
|
||||||
label:
|
label:
|
||||||
device.nodes.get(device.hardware.myNodeNum)?.user?.longName ??
|
device.nodes.get(device.hardware.myNodeNum)?.user?.longName ??
|
||||||
device.hardware.myNodeNum.toString(),
|
device.hardware.myNodeNum.toString(),
|
||||||
icon: (
|
icon: (
|
||||||
<Avatar
|
<Avatar
|
||||||
text={device.nodes.get(device.hardware.myNodeNum)?.user
|
text={device.nodes.get(device.hardware.myNodeNum)?.user
|
||||||
@@ -172,6 +173,13 @@ export const CommandPalette = () => {
|
|||||||
removeDevice(selectedDevice ?? 0);
|
removeDevice(selectedDevice ?? 0);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Reboot",
|
||||||
|
icon: PowerIcon,
|
||||||
|
action() {
|
||||||
|
connection?.reboot(0);
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Schedule Shutdown",
|
label: "Schedule Shutdown",
|
||||||
icon: PowerIcon,
|
icon: PowerIcon,
|
||||||
|
|||||||
Reference in New Issue
Block a user