Fix: Daily log file not adding newlines to logs, Add: Config log page loads last 5000 logs for the current day #72

This commit is contained in:
advplyr 2021-10-31 19:10:45 -05:00
parent 6ccde8f66f
commit 8ca6c62a03
8 changed files with 87 additions and 54 deletions

View file

@ -1,31 +0,0 @@
export const state = () => ({
isListening: false,
logs: []
})
export const getters = {
}
export const actions = {
setLogListener({ state, commit, dispatch }) {
dispatch('$nuxtSocket/emit', {
label: 'main',
evt: 'set_log_listener',
msg: 0
}, { root: true })
commit('setIsListening', true)
}
}
export const mutations = {
setIsListening(state, val) {
state.isListening = val
},
logEvt(state, payload) {
state.logs.push(payload)
if (state.logs.length > 500) {
state.logs = state.logs.slice(50)
}
}
}