small fixes
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, ref,watch } from "vue"
|
import { computed, ref } from "vue"
|
||||||
import { useTheme } from "vuetify"
|
import { useTheme } from "vuetify"
|
||||||
import { FindDiff } from "@/plugins/utils"
|
import { FindDiff } from "@/plugins/utils"
|
||||||
import Data from "@/store/modules/data"
|
import Data from "@/store/modules/data"
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ export default {
|
|||||||
logLevels: [
|
logLevels: [
|
||||||
{ title: 'DEBUG', value: 'debug' },
|
{ title: 'DEBUG', value: 'debug' },
|
||||||
{ title: 'INFO', value: 'info' },
|
{ title: 'INFO', value: 'info' },
|
||||||
{ title: 'WARNING', value: 'warn' },
|
{ title: 'WARNING', value: 'warning' },
|
||||||
{ title: 'ERROR', value: 'error' },
|
{ title: 'ERROR', value: 'err' },
|
||||||
],
|
],
|
||||||
logCount: 10,
|
logCount: 10,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,23 @@ const Data = defineStore('Data', {
|
|||||||
this.lastLoad = Math.floor((new Date()).getTime()/1000)
|
this.lastLoad = Math.floor((new Date()).getTime()/1000)
|
||||||
|
|
||||||
// Set new data
|
// Set new data
|
||||||
|
if (msg.obj.config) this.oldData.config = msg.obj.config
|
||||||
|
if (msg.obj.clients) this.oldData.clients = msg.obj.clients
|
||||||
|
if (msg.obj.tls) this.oldData.tlsConfigs = msg.obj.tls
|
||||||
|
this.onlines = msg.obj.onlines
|
||||||
if (msg.obj.lastLog) {
|
if (msg.obj.lastLog) {
|
||||||
const sb = Message()
|
const sb = Message()
|
||||||
sb.showMessage('Core error: \n' + msg.obj.lastLog,'error', 5000)
|
sb.showMessage('Core error: \n' + msg.obj.lastLog,'error', 5000)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (msg.obj.config) {
|
||||||
|
// To avoid ref copy
|
||||||
|
const data = JSON.parse(JSON.stringify(msg.obj))
|
||||||
|
if (data.subURI) this.subURI = data.subURI
|
||||||
|
if (data.config) this.config = data.config
|
||||||
|
if (data.clients) this.clients = data.clients
|
||||||
|
if (data.tls) this.tlsConfigs = data.tls
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async pushData() {
|
async pushData() {
|
||||||
|
|||||||
Reference in New Issue
Block a user