This commit is contained in:
2019-03-06 21:35:50 +00:00
parent 60717ac8e0
commit d6a82f902e
3 changed files with 33 additions and 60 deletions

View File

@@ -1,42 +1,42 @@
<template>
<v-layout row>
<v-flex>
<h1>{{ lt("Log")}}</h1>
<v-layout row v-if="this.ready">
<v-flex >
<h1>{{ this.$gzlocale.get("Log")}}</h1>
<v-textarea v-model="logText" full-width readonly auto-grow></v-textarea>
</v-flex>
</v-layout>
</template>
<script>
/* xeslint-disable */
//import lt from "../api/locale";
import store from "../store";
import lt from "../api/locale";
/* eslint-disable */
import _ from "../utils/libs/lodash.js";
export default {
data() {
return { logText: "", blah: 2 };
created() {
var that = this;
// debugger;
this.$gzlocale
.fetch(["Log"])
.then(function() {
// Trigger the fetchEnd event
// document.dispatchEvent(fetchEnd);
console.log("FETCHED OK");
that.ready = true;
})
.catch(function(thing) {
// Trigger the fetchEnd event
//document.dispatchEvent(fetchEnd);
console.log("FETCHED FAILED!" + thing);
});
},
beforeRouteEnter(to, from, next) {
lt.fetch(["Log"]).then(() => {
next();
});
data() {
return { logText: "", ready: false };
},
mounted() {
var outText = "";
_.forEach(store.state.logArray, function(value) {
_.forEach(this.$store.state.logArray, function(value) {
outText += value + "\n";
});
this.logText = outText;
},
methods: {
lt: function(key) {
return lt.get(key);
}
}
};
</script>
<style>
</style>