2021-06-12 15:19:24 +00:00
|
|
|
<template>
|
|
|
|
<div class="container mt-3">
|
|
|
|
<b-card header="FreqUI Settings">
|
|
|
|
<div class="text-left">
|
|
|
|
<b-form-group
|
|
|
|
description="Lock dynamic layouts, so they cannot move anymore.\nCan also be set from the navbar at the top."
|
|
|
|
>
|
|
|
|
<b-checkbox v-model="layoutLockedLocal">Lock layout</b-checkbox>
|
|
|
|
</b-form-group>
|
|
|
|
<b-form-group
|
|
|
|
label="Show open trades in header"
|
|
|
|
description="Decide if open trades should be visualized"
|
|
|
|
>
|
|
|
|
<b-form-select
|
|
|
|
v-model="openTradesVisualization"
|
|
|
|
:options="openTradesOptions"
|
|
|
|
></b-form-select>
|
|
|
|
</b-form-group>
|
2021-07-01 05:15:11 +00:00
|
|
|
<b-form-group
|
|
|
|
label="UTC Timezone"
|
|
|
|
description="Select timezone (we recommend UTC is recommended as exchanges usually work in UTC)"
|
|
|
|
>
|
|
|
|
<b-form-select v-model="timezoneLoc" :options="timezoneOptions"></b-form-select>
|
|
|
|
</b-form-group>
|
2021-09-01 04:47:36 +00:00
|
|
|
<b-form-group description="Keep background sync running while other bots are selected.">
|
|
|
|
<b-checkbox v-model="backgroundSyncLocal">Background sync</b-checkbox>
|
|
|
|
</b-form-group>
|
2021-06-12 15:19:24 +00:00
|
|
|
</div>
|
|
|
|
</b-card>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import { LayoutActions, LayoutGetters } from '@/store/modules/layout';
|
2021-06-12 17:47:02 +00:00
|
|
|
import { OpenTradeVizOptions, SettingsActions, SettingsGetters } from '@/store/modules/settings';
|
2021-06-12 15:19:24 +00:00
|
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
|
|
import { namespace } from 'vuex-class';
|
|
|
|
|
|
|
|
const layoutNs = namespace('layout');
|
|
|
|
const uiSettingsNs = namespace('uiSettings');
|
|
|
|
|
|
|
|
@Component({})
|
|
|
|
export default class Template extends Vue {
|
|
|
|
@layoutNs.Getter [LayoutGetters.getLayoutLocked]: boolean;
|
|
|
|
|
|
|
|
@layoutNs.Action [LayoutActions.setLayoutLocked];
|
|
|
|
|
|
|
|
@uiSettingsNs.Getter [SettingsGetters.openTradesInTitle]: string;
|
|
|
|
|
2021-07-01 05:15:11 +00:00
|
|
|
@uiSettingsNs.Getter [SettingsGetters.timezone]: string;
|
|
|
|
|
2021-09-01 04:47:36 +00:00
|
|
|
@uiSettingsNs.Getter [SettingsGetters.backgroundSync]: boolean;
|
|
|
|
|
2021-06-12 15:19:24 +00:00
|
|
|
@uiSettingsNs.Action [SettingsActions.setOpenTradesInTitle];
|
|
|
|
|
2021-07-01 05:15:11 +00:00
|
|
|
@uiSettingsNs.Action [SettingsActions.setTimeZone];
|
|
|
|
|
2021-09-01 04:47:36 +00:00
|
|
|
@uiSettingsNs.Action [SettingsActions.setBackgroundSync];
|
|
|
|
|
2021-06-12 15:19:24 +00:00
|
|
|
openTradesOptions = [
|
2021-06-12 17:47:02 +00:00
|
|
|
{ value: OpenTradeVizOptions.showPill, text: 'Show pill in icon' },
|
|
|
|
{ value: OpenTradeVizOptions.asTitle, text: 'Show in title' },
|
|
|
|
{ value: OpenTradeVizOptions.noOpenTrades, text: "Don't show open trades in header" },
|
2021-06-12 15:19:24 +00:00
|
|
|
];
|
|
|
|
|
2021-07-01 05:15:11 +00:00
|
|
|
// Careful when adding new timezones here - eCharts only supports UTC or user timezone
|
|
|
|
timezoneOptions = ['UTC', Intl.DateTimeFormat().resolvedOptions().timeZone];
|
|
|
|
|
|
|
|
get timezoneLoc() {
|
|
|
|
return this.timezone;
|
|
|
|
}
|
|
|
|
|
|
|
|
set timezoneLoc(value: string) {
|
|
|
|
this[SettingsActions.setTimeZone](value);
|
|
|
|
}
|
|
|
|
|
2021-06-12 15:19:24 +00:00
|
|
|
get openTradesVisualization() {
|
|
|
|
return this.openTradesInTitle;
|
|
|
|
}
|
|
|
|
|
|
|
|
set openTradesVisualization(value: string) {
|
|
|
|
this.setOpenTradesInTitle(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
get layoutLockedLocal() {
|
|
|
|
return this.getLayoutLocked;
|
|
|
|
}
|
|
|
|
|
|
|
|
set layoutLockedLocal(value: boolean) {
|
|
|
|
this.setLayoutLocked(value);
|
|
|
|
}
|
2021-09-01 04:47:36 +00:00
|
|
|
|
|
|
|
get backgroundSyncLocal(): boolean {
|
|
|
|
return this.backgroundSync;
|
|
|
|
}
|
|
|
|
|
|
|
|
set backgroundSyncLocal(value: boolean) {
|
|
|
|
this.setBackgroundSync(value);
|
|
|
|
}
|
2021-06-12 15:19:24 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped></style>
|