Fixed reactivity of found host array
This commit is contained in:
parent
6d4851918f
commit
78a4b309db
1 changed files with 7 additions and 4 deletions
|
|
@ -81,7 +81,7 @@
|
||||||
|
|
||||||
<div class="uk-grid-medium uk-grid-match uk-margin-top" uk-grid>
|
<div class="uk-grid-medium uk-grid-match uk-margin-top" uk-grid>
|
||||||
|
|
||||||
<div v-for="host in Object.values(foundHosts)" :key="host.name">
|
<div v-for="host in foundHostArray" :key="host.name">
|
||||||
<hostCard
|
<hostCard
|
||||||
:name="host.name"
|
:name="host.name"
|
||||||
:hostname="host.hostname"
|
:hostname="host.hostname"
|
||||||
|
|
@ -108,8 +108,8 @@
|
||||||
import { version } from 'punycode';
|
import { version } from 'punycode';
|
||||||
|
|
||||||
// Import mDNS package if running in Electron
|
// Import mDNS package if running in Electron
|
||||||
var userAgent = navigator.userAgent.toLowerCase();
|
import isElectron from '../../modules/isElectron';
|
||||||
if (userAgent.indexOf(' electron/') > -1) {
|
if (isElectron()) {
|
||||||
var mdns = require('mdns-js');
|
var mdns = require('mdns-js');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -164,7 +164,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof data.port !== "undefined") {
|
if (typeof data.port !== "undefined") {
|
||||||
context.foundHosts[hostData.hostname] = hostData
|
context.$set(context.foundHosts, hostData.hostname, hostData)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(context.foundHosts)
|
console.log(context.foundHosts)
|
||||||
|
|
@ -296,6 +296,9 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
foundHostArray: function () {
|
||||||
|
return Object.values(this.foundHosts)
|
||||||
|
},
|
||||||
// Stylises the hostname input box based on connection status
|
// Stylises the hostname input box based on connection status
|
||||||
IpFormClasses: function () {
|
IpFormClasses: function () {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue