Tłumaczenia i poprawki designu

This commit is contained in:
2022-07-10 22:42:07 +02:00
parent faed36c41c
commit 740ce9c815
12 changed files with 257 additions and 86 deletions
@@ -46,9 +46,9 @@
<span class="region-badge" :class="doc.region">PL1</span>
</span>
<span>
<span :data-status="doc.isOnline"
>{{ doc.isOnline ? $t('journal.online-since') : 'OFFLINE' }}&nbsp;</span
>
<span :data-status="doc.isOnline">
{{ doc.isOnline ? $t('journal.online-since') : 'OFFLINE' }}&nbsp;
</span>
<span>
{{ new Date(doc.timestampFrom).toLocaleTimeString('pl-PL', { timeStyle: 'short' }) }}
</span>
@@ -196,7 +196,7 @@ export default defineComponent({
computedHistoryList() {
return this.historyList.filter(
(doc) => doc.isOnline || (doc.currentDuration && doc.currentDuration > 10 * 60000)
); //.sort((a, b) => (b.isOnline ? 1 : 0) - (a.isOnline ? 1 : 0));
);
},
},
@@ -231,16 +231,6 @@ export default defineComponent({
this.$router.push(`/scenery?station=${name.trim().replace(/ /g, '_')}`);
},
calculateDuration(timestampMs: number) {
const minsTotal = Math.round(timestampMs / 60000);
const hoursTotal = Math.floor(minsTotal / 60);
const minsInHour = minsTotal % 60;
return minsTotal > 60
? this.$t('journal.hours', { hours: hoursTotal, minutes: minsInHour })
: this.$t('journal.minutes', { minutes: minsTotal });
},
isAnotherDay(prevIndex: number, currIndex: number) {
if (currIndex == 0) return true;
@@ -333,13 +323,6 @@ export default defineComponent({
return;
}
// if (responseData.errorMessage) {
// this.historyDataStatus.status = DataStatus.Error;
// this.historyDataStatus.error = responseData.errorMessage;
// return;
// }
if (!responseData) return;
// Response data exists
@@ -439,3 +422,4 @@ export default defineComponent({
}
}
</style>