diff --git a/src/components/nodes/NodesList.vue b/src/components/nodes/NodesList.vue index 884d8e1..d6f9e3d 100644 --- a/src/components/nodes/NodesList.vue +++ b/src/components/nodes/NodesList.vue @@ -2,8 +2,32 @@
-
- +
+
+ +
+
+ + + + +
@@ -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) => {