-
{{ getNodeShortName(node.num) }}
+
+
+
{{ getNodeShortName(node.num) }}
+
diff --git a/src/components/nodes/NodesList.vue b/src/components/nodes/NodesList.vue
index e85934b..8de861f 100644
--- a/src/components/nodes/NodesList.vue
+++ b/src/components/nodes/NodesList.vue
@@ -1,5 +1,5 @@
-
+
@@ -7,14 +7,14 @@
-
-
+
+
-
+
{{ getNodeLongName(node.num) }}
@@ -40,6 +40,33 @@
+
+
+
+
+
+
+
+
+
+
{{ getNodeLongName(node.num) }}
+
{{ getNodeHexId(node.num) }}
+
+
+
+
+
+
+ Forget Node
+
+
+
+
+
@@ -51,10 +78,14 @@ import NodeUtils from "../../js/NodeUtils.js";
import moment from "moment";
import NodeIcon from "./NodeIcon.vue";
import GlobalState from "../../js/GlobalState.js";
+import IconButton from "../IconButton.vue";
+import DropDownMenu from "../DropDownMenu.vue";
+import NodeAPI from "../../js/NodeAPI.js";
+import DropDownMenuItem from "../DropDownMenuItem.vue";
export default {
name: 'NodesList',
- components: {NodeIcon},
+ components: {DropDownMenuItem, DropDownMenu, IconButton, NodeIcon},
emits: [
"node-click",
],
@@ -79,6 +110,17 @@ export default {
formatUnixSecondsAgo(unixSeconds) {
return moment.unix(unixSeconds).fromNow();
},
+ async onDeleteNode(node) {
+
+ // confirm user wants to remove this node
+ if(!confirm("Are you sure you want to forget this node?")){
+ return;
+ }
+
+ // remove node
+ await NodeAPI.removeNodeByNum(node.num);
+
+ },
},
computed: {
GlobalState() {
diff --git a/src/main.js b/src/main.js
index 388e5d0..68bd2df 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,5 +1,6 @@
import { createApp } from 'vue';
import { createRouter, createWebHashHistory } from 'vue-router';
+import vClickOutside from "click-outside-vue3";
import "./style.css";
import App from './components/App.vue';
@@ -41,6 +42,7 @@ const router = createRouter({
createApp(App)
.use(router)
+ .use(vClickOutside)
.mount('#app');
// disconnect before unloading page (chrome webview on android was crashing without this...)