mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-10 18:23:50 +00:00
Move timezone configuration to App component
This commit is contained in:
parent
9f985b6070
commit
3db97c07ad
13
src/App.vue
13
src/App.vue
|
@ -9,11 +9,22 @@
|
||||||
import { Component, Vue } from 'vue-property-decorator';
|
import { Component, Vue } from 'vue-property-decorator';
|
||||||
import Header from '@/components/layout/Header.vue';
|
import Header from '@/components/layout/Header.vue';
|
||||||
import Body from '@/components/layout/Body.vue';
|
import Body from '@/components/layout/Body.vue';
|
||||||
|
import { namespace } from 'vuex-class';
|
||||||
|
import { SettingsGetters } from './store/modules/settings';
|
||||||
|
import { setTimezone } from './shared/formatters';
|
||||||
|
|
||||||
|
const uiSettingsNs = namespace('uiSettings');
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: { Header, Body },
|
components: { Header, Body },
|
||||||
})
|
})
|
||||||
export default class App extends Vue {}
|
export default class App extends Vue {
|
||||||
|
@uiSettingsNs.Getter [SettingsGetters.timezone]: string;
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
setTimezone(this.timezone);
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
@ -58,7 +58,6 @@ import { LayoutActions, LayoutGetters } from '@/store/modules/layout';
|
||||||
import { BotStoreGetters } from '@/store/modules/ftbot';
|
import { BotStoreGetters } from '@/store/modules/ftbot';
|
||||||
import Favico from 'favico.js';
|
import Favico from 'favico.js';
|
||||||
import { OpenTradeVizOptions, SettingsGetters } from '@/store/modules/settings';
|
import { OpenTradeVizOptions, SettingsGetters } from '@/store/modules/settings';
|
||||||
import { setTimezone } from '@/shared/formatters';
|
|
||||||
|
|
||||||
const ftbot = namespace('ftbot');
|
const ftbot = namespace('ftbot');
|
||||||
const layoutNs = namespace('layout');
|
const layoutNs = namespace('layout');
|
||||||
|
@ -96,8 +95,6 @@ export default class NavBar extends Vue {
|
||||||
|
|
||||||
@uiSettingsNs.Getter [SettingsGetters.openTradesInTitle]: string;
|
@uiSettingsNs.Getter [SettingsGetters.openTradesInTitle]: string;
|
||||||
|
|
||||||
@uiSettingsNs.Getter [SettingsGetters.timezone]: string;
|
|
||||||
|
|
||||||
favicon: Favico | undefined = undefined;
|
favicon: Favico | undefined = undefined;
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -108,7 +105,6 @@ export default class NavBar extends Vue {
|
||||||
// Query botstate - this will enable / disable certain modes
|
// Query botstate - this will enable / disable certain modes
|
||||||
this.getState();
|
this.getState();
|
||||||
}
|
}
|
||||||
setTimezone(this.timezone);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user