From e831f842cfc891e30f4508b67cf22adbdf53118c Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Fri, 20 Sep 2019 16:42:16 +0100 Subject: [PATCH] Add newly saved hosts to the beginning of the array --- src/components/viewComponents/connectDisplay.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/viewComponents/connectDisplay.vue b/src/components/viewComponents/connectDisplay.vue index 7c7a490f..496ec92c 100644 --- a/src/components/viewComponents/connectDisplay.vue +++ b/src/components/viewComponents/connectDisplay.vue @@ -283,7 +283,8 @@ export default { }, saveHost: function() { - this.savedHosts.push( + // We use unshift instead of push to add the entry to the beginning of the array + this.savedHosts.unshift( { name: this.$store.state.apiConfig.name, hostname: this.$store.state.host,