server reboot too

This commit is contained in:
legop3
2026-02-18 15:13:38 -05:00
parent 40e21d4ac5
commit 7e772ab607
6 changed files with 98 additions and 11 deletions
+2
View File
@@ -21,6 +21,7 @@ const SessionContext = createContext({
setCommunityGoal: async () => {},
setAdminReason: async () => {},
rebootRover: async () => {},
rebootServer: async () => {},
});
function useAckEmitter(socket) {
@@ -120,6 +121,7 @@ export function SessionProvider({ children }) {
setAdminReason: (text) => emitWithAck('adminReason:set', { text }),
rebootRover: (roverId) =>
emitWithAck('command', { roverId, type: 'reboot', data: { reboot: {} } }),
rebootServer: () => emitWithAck('server:reboot'),
pushAlert: (alert) =>
setAlerts((prev) => [
...prev.slice(-49),