From 59bd3fa2efff68ca1a006ccf93a8277e9aa0ef8f Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 12 Feb 2023 12:58:23 +0100 Subject: [PATCH] =?UTF-8?q?design:=20badge=20poziom=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.scss | 2 +- .../JournalView/JournalDispatchersList.vue | 39 +++------ .../JournalView/JournalTimetablesList.vue | 53 ++++++++---- .../SceneryView/SceneryDispatchersHistory.vue | 41 ++++++--- src/components/SceneryView/SceneryInfo.vue | 8 +- src/components/TrainsView/TrainInfo.vue | 12 +-- src/styles/badge.scss | 86 +++++++++++++------ 7 files changed, 145 insertions(+), 96 deletions(-) diff --git a/src/App.scss b/src/App.scss index 267bc52..4fb119d 100644 --- a/src/App.scss +++ b/src/App.scss @@ -46,7 +46,7 @@ font-size: 1rem; @include smallScreen() { - font-size: calc(0.65rem + 1.1vw); + font-size: calc(0.5rem + 1.1vw); } @include screenLandscape() { diff --git a/src/components/JournalView/JournalDispatchersList.vue b/src/components/JournalView/JournalDispatchersList.vue index 68880ac..e72ce69 100644 --- a/src/components/JournalView/JournalDispatchersList.vue +++ b/src/components/JournalView/JournalDispatchersList.vue @@ -17,10 +17,10 @@ @keydown.enter="navigateToScenery(item.stationName, item.isOnline)" tabindex="0" > - + {{ item.dispatcherLevel >= 2 ? item.dispatcherLevel : 'L' }} @@ -31,7 +31,7 @@ PL1 - + {{ item.isOnline ? $t('journal.online-since') : 'OFFLINE' }}  {{ new Date(item.timestampFrom).toLocaleTimeString('pl-PL', { timeStyle: 'short' }) }} @@ -99,18 +99,9 @@ export default defineComponent({ diff --git a/src/components/JournalView/JournalTimetablesList.vue b/src/components/JournalView/JournalTimetablesList.vue index 36ad0bd..a14f89e 100644 --- a/src/components/JournalView/JournalTimetablesList.vue +++ b/src/components/JournalView/JournalTimetablesList.vue @@ -6,25 +6,35 @@ :key="timetable.id" >
-
+
- {{ timetable.trainCategoryCode }}  - {{ timetable.trainNo }} - | {{ timetable.driverName }} | #{{ timetable.id }} - - | - - {{ timetable.driverLevel < 2 ? 'L' : `${timetable.driverLevel} lvl` }} - + • + + + {{ timetable.trainCategoryCode }} + +  {{ timetable.trainNo }} + • + + {{ timetable.driverLevel < 2 ? 'L' : `${timetable.driverLevel}` }} + + + {{ timetable.driverName }} - + + {{ localeDay(timetable.beginDate, $i18n.locale) }} {{ $t('scenery.history-list-empty') }}
    -
  • -
    - - #{{ historyItem.stationHash }}  - {{ historyItem.dispatcherName }} - -
    +
  • + + #{{ item.stationHash }}  + + {{ item.dispatcherLevel >= 2 ? item.dispatcherLevel : 'L' }} + -
    - {{ $d(historyItem.timestampFrom) }} + {{ item.dispatcherName }} + - {{ timestampToString(historyItem.timestampFrom) }} - - {{ timestampToString(historyItem.timestampTo) }} ({{ calculateDuration(historyItem.currentDuration) }}) +
    + {{ $d(item.timestampFrom) }} + + {{ timestampToString(item.timestampFrom) }} + - {{ timestampToString(item.timestampTo) }} ({{ calculateDuration(item.currentDuration) }})
    {{ $t('journal.online-since') }} - {{ timestampToString(historyItem.timestampFrom) }} - ({{ calculateDuration(historyItem.currentDuration) }}) + {{ timestampToString(item.timestampFrom) }} + ({{ calculateDuration(item.currentDuration) }})
@@ -39,10 +45,11 @@ import { DispatcherHistory } from '../../scripts/interfaces/api/DispatchersAPIDa import Station from '../../scripts/interfaces/Station'; import { URLs } from '../../scripts/utils/apiURLs'; import Loading from '../Global/Loading.vue'; +import styleMixin from '../../mixins/styleMixin'; export default defineComponent({ name: 'SceneryDispatchersHistory', - mixins: [dateMixin], + mixins: [dateMixin, styleMixin], props: { station: { type: Object as PropType, @@ -96,6 +103,12 @@ export default defineComponent({ line-height: 1.5em; } +.item-general { + display: flex; + align-items: center; + gap: 0.25em; +} + .dispatcher-online { color: springgreen; } diff --git a/src/components/SceneryView/SceneryInfo.vue b/src/components/SceneryView/SceneryInfo.vue index 6bd23e1..82a9dc4 100644 --- a/src/components/SceneryView/SceneryInfo.vue +++ b/src/components/SceneryView/SceneryInfo.vue @@ -1,10 +1,10 @@