This commit is contained in:
@@ -11,9 +11,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return store.state.localeText[key];
|
return store.state.localeText[key];
|
||||||
},
|
},
|
||||||
isFetching: false,
|
|
||||||
fetch(keys) {
|
fetch(keys) {
|
||||||
this.isFetching = true;
|
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
//step 1: build an array of keys that we don't have already
|
//step 1: build an array of keys that we don't have already
|
||||||
//Note: this will ensure only unique keys go into the store so it's safe to call this with dupes as can happen
|
//Note: this will ensure only unique keys go into the store so it's safe to call this with dupes as can happen
|
||||||
@@ -25,7 +23,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (needIt.length == 0) {
|
if (needIt.length == 0) {
|
||||||
resolve();
|
resolve();
|
||||||
this.isFetching = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//step 2: get it
|
//step 2: get it
|
||||||
@@ -37,11 +35,9 @@ export default {
|
|||||||
store.commit("addLocaleText", item);
|
store.commit("addLocaleText", item);
|
||||||
});
|
});
|
||||||
resolve();
|
resolve();
|
||||||
this.isFetching = false;
|
|
||||||
})
|
})
|
||||||
.catch(function(error) {
|
.catch(function(error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
this.isFetching = false;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-layout row v-if="this.ready">
|
<v-layout row v-if="this.ready">
|
||||||
<v-flex >
|
<v-flex>
|
||||||
<h1>{{ this.$gzlocale.get("Log")}}</h1>
|
<h1>{{ this.$gzlocale.get("Log")}}</h1>
|
||||||
<v-textarea v-model="logText" full-width readonly auto-grow></v-textarea>
|
<v-textarea v-model="logText" full-width readonly auto-grow></v-textarea>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
@@ -17,15 +17,10 @@ export default {
|
|||||||
this.$gzlocale
|
this.$gzlocale
|
||||||
.fetch(["Log"])
|
.fetch(["Log"])
|
||||||
.then(function() {
|
.then(function() {
|
||||||
// Trigger the fetchEnd event
|
|
||||||
// document.dispatchEvent(fetchEnd);
|
|
||||||
console.log("FETCHED OK");
|
|
||||||
that.ready = true;
|
that.ready = true;
|
||||||
})
|
})
|
||||||
.catch(function(thing) {
|
.catch(function(err) {
|
||||||
// Trigger the fetchEnd event
|
throw err;
|
||||||
//document.dispatchEvent(fetchEnd);
|
|
||||||
console.log("FETCHED FAILED!" + thing);
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
Reference in New Issue
Block a user