This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<v-layout row>
|
||||||
<h1>{{ lt("Log")}}</h1>
|
<v-flex xs12 sm6 offset-sm3>
|
||||||
<span>{{log()}}</span>
|
<h1>{{ lt("Log")}}</h1>
|
||||||
</div>
|
<v-textarea v-model="logText" full-width></v-textarea>
|
||||||
|
</v-flex>
|
||||||
|
</v-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -13,18 +15,17 @@ import store from "../store";
|
|||||||
import lt from "../api/locale";
|
import lt from "../api/locale";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return { logText: "" };
|
||||||
},
|
},
|
||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
lt.fetch(["Log"]).then(() => {
|
lt.fetch(["Log"]).then(() => {
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
this.logText = store.state.logArray.toString();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
log: function() {
|
|
||||||
return store.state.logArray;
|
|
||||||
},
|
|
||||||
lt: function(key) {
|
lt: function(key) {
|
||||||
return lt.get(key);
|
return lt.get(key);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,25 +7,12 @@ Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNTQxNTE5NTA5IiwiZXhwIjoi
|
|||||||
|
|
||||||
|
|
||||||
- Clean up error log view so it displays correctly with copyable text box and scrollbars of some kind
|
- Clean up error log view so it displays correctly with copyable text box and scrollbars of some kind
|
||||||
|
- started on it but it's narrow, this keeps happening, what to do, look into layout??
|
||||||
|
- Also make the title part of the textbox as I think it supports in v-textarea
|
||||||
|
|
||||||
- pre-fetch: noticed it's not pausing long enough to get teh fetched text at times (log view)
|
|
||||||
- !!This will be important to every form loading data so need to get it right here!!
|
|
||||||
- This seems to be best done in the router if I want to prefetch before the component lifecycle starts
|
|
||||||
otherwise the alternate approach is to do it in teh component but show a loading or placeholder
|
|
||||||
which is a good idea for some things like loading big lists etc but won't work with localetext
|
|
||||||
so perhaps a mix.
|
|
||||||
Here is the definitive link: https://router.vuejs.org/guide/advanced/data-fetching.html
|
|
||||||
- Need everything to stay on hold until the fetch of localized text is completed for that view somehow
|
|
||||||
- fetch in router? or how can I hold things off in vue lifecycle until it's done with the fetch of the keys?
|
|
||||||
Useful links (but see router based solution link above as that's more "canon"):
|
|
||||||
- https://vuejs.org/v2/cookbook/using-axios-to-consume-apis.html
|
|
||||||
- https://stackoverflow.com/questions/40813975/how-to-structure-api-calls-in-vue-js
|
|
||||||
- https://stackoverflow.com/questions/49577394/which-vuejs-lifecycle-hook-must-asynchronous-http-requests-be-called-in
|
|
||||||
- this might be of use, it uses async await a lot and seems to get to the heart of the issue:
|
|
||||||
https://developer.okta.com/blog/2018/02/15/build-crud-app-vuejs-node
|
|
||||||
See the created method
|
|
||||||
|
|
||||||
|
- Loading indicator for xhr stuff
|
||||||
|
- The thin line one I saw is pretty skookum
|
||||||
- Dummy form with all RAVEN required input controls on it for testing
|
- Dummy form with all RAVEN required input controls on it for testing
|
||||||
- As if a widget but not actual widget api calls yet so can expand this form later and save time
|
- As if a widget but not actual widget api calls yet so can expand this form later and save time
|
||||||
- Dirty form check and prevent route leave: https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards
|
- Dirty form check and prevent route leave: https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards
|
||||||
|
|||||||
Reference in New Issue
Block a user