Leon Etienne (ubuntu wsl) cb5f43bf25 Finished settings page
2020-10-02 18:09:51 +02:00

45 lines
831 B
Vue

<template>
<div class="log-box">
<LogEntry v-for="(nObj, nKey) in logs"
:mode="(nObj.type === 0) ? 'normal' : ((nObj.type === 1) ? 'warn' : 'error')"
:message="nObj.compiledMessage"
:key="nKey" />
</div>
</template>
<script>
import LogEntry from "~/components/LogEntry";
export default {
components: {
LogEntry,
},
computed: {
logs: function() {
return this.$store.state.logs.logs;
}
},
mounted() {
const that = this;
this.$store.dispatch("logs/update");
setInterval(function(){
that.$store.dispatch("logs/update");
}, 1000);
return;
}
}
</script>
<style lang="scss" scoped>
.log-box {
width: 100%;
height: 600px;
border-radius: 5px;
padding: 20px;
background-color: #fff5;
overflow-y: scroll;
}
</style>