mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-26 21:15:15 +00:00
Show correct tooltip
This commit is contained in:
parent
72083b2449
commit
24146fed40
|
@ -32,14 +32,6 @@ const modeDescs: { [key in modes]: string } = {
|
|||
realized: 'Realized profit',
|
||||
};
|
||||
|
||||
const profitDesc = computed((): string => {
|
||||
let profit = `${modeDescs[props.mode]}: ${formatPercent(props.trade.profit_ratio)} (${
|
||||
props.trade.profit_abs
|
||||
})`;
|
||||
profit += `\nOpen since: ${timestampms(props.trade.open_timestamp)}`;
|
||||
return profit;
|
||||
});
|
||||
|
||||
const profitRatio = computed<number | undefined>(() => {
|
||||
switch (props.mode) {
|
||||
case 'default':
|
||||
|
@ -64,6 +56,13 @@ const profitAbs = computed<number | undefined>(() => {
|
|||
return undefined;
|
||||
}
|
||||
});
|
||||
const profitDesc = computed((): string => {
|
||||
let profit = `${modeDescs[props.mode]}: ${
|
||||
profitRatio.value ? formatPercent(profitRatio.value) : ''
|
||||
} (${profitAbs.value})`;
|
||||
profit += `\nOpen since: ${timestampms(props.trade.open_timestamp)}`;
|
||||
return profit;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
|
|
Loading…
Reference in New Issue
Block a user