small fixes
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, onMounted, ref,watch } from "vue"
|
||||
import { computed, ref } from "vue"
|
||||
import { useTheme } from "vuetify"
|
||||
import { FindDiff } from "@/plugins/utils"
|
||||
import Data from "@/store/modules/data"
|
||||
|
||||
@@ -60,8 +60,8 @@ export default {
|
||||
logLevels: [
|
||||
{ title: 'DEBUG', value: 'debug' },
|
||||
{ title: 'INFO', value: 'info' },
|
||||
{ title: 'WARNING', value: 'warn' },
|
||||
{ title: 'ERROR', value: 'error' },
|
||||
{ title: 'WARNING', value: 'warning' },
|
||||
{ title: 'ERROR', value: 'err' },
|
||||
],
|
||||
logCount: 10,
|
||||
}
|
||||
|
||||
@@ -21,10 +21,23 @@ const Data = defineStore('Data', {
|
||||
this.lastLoad = Math.floor((new Date()).getTime()/1000)
|
||||
|
||||
// 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) {
|
||||
const sb = Message()
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user