This commit is contained in:
Alexander Drozdov
2020-08-14 15:33:32 +03:00
parent 971292071e
commit 622e50594c
5 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -221,8 +221,8 @@ export const Prices = new PriceService()
export function displayRounding (value: number, fraction: boolean = false): string {
if (fraction && Math.abs(value) < 1) {
if (value === 0) return '0'
const r = `1/${displayRounding(1 / value)}`
return r === '1/1' ? '1' : r
const r = `1\u200A/\u200A${displayRounding(1 / value)}`
return r === '1\u200A/\u200A1' ? '1' : r
}
if (Math.abs(value) < 10) {
return Number(value.toFixed(1)).toString().replace('.', '\u200A.\u200A')
@@ -207,6 +207,7 @@ export default {
&:focus {
@apply border-gray-500;
cursor: none;
}
}
@@ -72,6 +72,8 @@ export default {
&:focus::placeholder {
color: transparent;
}
&:focus { cursor: none; }
}
</style>
@@ -25,8 +25,8 @@
</div>
<div class="text-center">
<div class="leading-tight">
<i v-if="price.confidence < 70" class="fas fa-exclamation-triangle pr-1 text-orange-400"></i>
<span>{{ price.confidence }}&nbsp;%</span>
<i v-if="price.confidence < 78" class="fas fa-exclamation-triangle pr-1 text-orange-400"></i>
<span>{{ price.confidence }}{{ '\u2009' }}%</span>
</div>
<div class="text-xs text-gray-500 leading-none">Confidence</div>
</div>
+1 -1
View File
@@ -18,7 +18,7 @@
<i v-if="trend.changeStr === 'down'" class="fas fa-angle-double-down pr-1 text-red-600"></i>
<i v-if="trend.changeStr === 'up'" class="fas fa-angle-double-up pr-1 text-green-500"></i>
<span v-if="trend.changeStr === 'const'" class="pr-1 text-gray-600 font-sans leading-none">±</span>
<span>{{ trend.changeVal * 2 | displayRounding }}&nbsp;%</span>
<span>{{ Math.round(trend.changeVal * 2) }}{{ '\u2009' }}%</span>
</div>
<div class="text-xs text-gray-500 leading-none">{{ $t('Last 7 days') }}</div>
</div>