mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 04:55:15 +00:00
parent
205928e517
commit
e97bfa8788
|
@ -10,9 +10,11 @@
|
|||
</p>
|
||||
<p v-if="profit.first_trade_timestamp">
|
||||
First trade opened:
|
||||
<strong>{{ formatTimestamp(profit.first_trade_timestamp) }}</strong> <br />
|
||||
|
||||
<strong><DateTimeTZ :date="profit.first_trade_timestamp" show-timezone /></strong>
|
||||
<br />
|
||||
Last trade opened:
|
||||
<strong>{{ formatTimestamp(profit.latest_trade_timestamp) }}</strong>
|
||||
<strong><DateTimeTZ :date="profit.latest_trade_timestamp" show-timezone /></strong>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -40,10 +42,11 @@ import { namespace } from 'vuex-class';
|
|||
import { BotState } from '@/types';
|
||||
|
||||
import { formatPercent } from '@/shared/formatters';
|
||||
import DateTimeTZ from '@/components/general/DateTimeTZ.vue';
|
||||
|
||||
const ftbot = namespace('ftbot');
|
||||
|
||||
@Component({})
|
||||
@Component({ components: { DateTimeTZ } })
|
||||
export default class BotStatus extends Vue {
|
||||
@ftbot.State version;
|
||||
|
||||
|
@ -52,9 +55,5 @@ export default class BotStatus extends Vue {
|
|||
@ftbot.State botState?: BotState;
|
||||
|
||||
formatPercent = formatPercent;
|
||||
|
||||
formatTimestamp(timestamp) {
|
||||
return new Date(timestamp).toUTCString();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<span :title="timezoneTooltip">{{ timestampms(date) }}</span>
|
||||
<span :title="timezoneTooltip">{{ formattedDate }}</span>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -10,8 +10,17 @@ import { Component, Prop, Vue } from 'vue-property-decorator';
|
|||
export default class DateTimeTZ extends Vue {
|
||||
@Prop({ required: true, type: Number }) date!: number;
|
||||
|
||||
@Prop({ required: false, type: Boolean, default: false }) showTimezone!: boolean;
|
||||
|
||||
timestampms = timestampms;
|
||||
|
||||
get formattedDate(): string {
|
||||
if (this.showTimezone) {
|
||||
return timestampmsWithTimezone(this.date);
|
||||
}
|
||||
return timestampms(this.date);
|
||||
}
|
||||
|
||||
get timezoneTooltip(): string {
|
||||
const time1 = timestampmsWithTimezone(this.date);
|
||||
const timeUTC = timestampmsWithTimezone(this.date, 'UTC');
|
||||
|
|
Loading…
Reference in New Issue
Block a user