feat: added disconnect method to core lib (#712)
This commit is contained in:
@@ -37,7 +37,8 @@
|
||||
"rebootToOtaMode": "Reboot To OTA Mode",
|
||||
"resetNodeDb": "Reset Node DB",
|
||||
"factoryResetDevice": "Factory Reset Device",
|
||||
"factoryResetConfig": "Factory Reset Config"
|
||||
"factoryResetConfig": "Factory Reset Config",
|
||||
"disconnect": "Disconnect"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
ArrowLeftRightIcon,
|
||||
BoxSelectIcon,
|
||||
BugIcon,
|
||||
CloudOff,
|
||||
EraserIcon,
|
||||
FactoryIcon,
|
||||
LayersIcon,
|
||||
@@ -199,6 +200,15 @@ export const CommandPalette = () => {
|
||||
connection?.resetNodes();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t("contextual.command.disconnect"),
|
||||
icon: CloudOff,
|
||||
action() {
|
||||
connection?.disconnect().catch((error) => {
|
||||
console.error("Failed to disconnect:", error);
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
label: t("contextual.command.factoryResetDevice"),
|
||||
icon: FactoryIcon,
|
||||
|
||||
Reference in New Issue
Block a user