-
+
@@ -18,10 +42,16 @@
import NodeUtils from "../../js/NodeUtils.js";
import GlobalState from "../../js/GlobalState.js";
import NodeListItem from "./NodeListItem.vue";
+import IconButton from "../IconButton.vue";
+import DropDownMenu from "../DropDownMenu.vue";
+import DropDownMenuItem from "../DropDownMenuItem.vue";
export default {
name: 'NodesList',
components: {
+ DropDownMenuItem,
+ DropDownMenu,
+ IconButton,
NodeListItem,
},
emits: [
@@ -32,6 +62,7 @@ export default {
},
data() {
return {
+ order: "heard-recently",
nodesSearchTerm: "",
};
},
@@ -50,7 +81,17 @@ export default {
orderedNodes() {
// get ordered nodes
- var orderedNodes = this.nodesOrderedByLastHeard;
+ var orderedNodes = [];
+ switch(this.order){
+ case "a-z": {
+ orderedNodes = this.nodesOrderedByName;
+ break;
+ }
+ case "heard-recently": {
+ orderedNodes = this.nodesOrderedByLastHeard;
+ break;
+ }
+ }
// find our node in the list
const myNode = orderedNodes.find((node) => {