From 0ee90357aa6b3e0e120d846eec3bcc6c6598e157 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sat, 3 Aug 2024 01:53:36 +0200 Subject: [PATCH] chore: code structure --- .../JournalDispatcherEntry.vue | 217 ++++++++++++++++++ .../JournalDispatchersList.vue | 210 ++--------------- .../_TimetableHistoryList.vue | 101 -------- .../SceneryView/SceneryDispatchersHistory.vue | 8 +- .../SceneryView/SceneryTimetablesHistory.vue | 8 +- 5 files changed, 243 insertions(+), 301 deletions(-) create mode 100644 src/components/JournalView/JournalDispatchers/JournalDispatcherEntry.vue delete mode 100644 src/components/JournalView/JournalTimetables/_TimetableHistoryList.vue diff --git a/src/components/JournalView/JournalDispatchers/JournalDispatcherEntry.vue b/src/components/JournalView/JournalDispatchers/JournalDispatcherEntry.vue new file mode 100644 index 0000000..70d7efd --- /dev/null +++ b/src/components/JournalView/JournalDispatchers/JournalDispatcherEntry.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/src/components/JournalView/JournalDispatchers/JournalDispatchersList.vue b/src/components/JournalView/JournalDispatchers/JournalDispatchersList.vue index 9685dad..db9aefe 100644 --- a/src/components/JournalView/JournalDispatchers/JournalDispatchersList.vue +++ b/src/components/JournalView/JournalDispatchers/JournalDispatchersList.vue @@ -15,118 +15,16 @@ {{ $t('app.no-result') }} -
-
-
- - - - {{ historyItem.stationName }} - - - #{{ historyItem.stationHash }} - - • - - {{ historyItem.dispatcherLevel >= 2 ? historyItem.dispatcherLevel : 'L' }} - - - - - {{ historyItem.dispatcherName }} - - - - - {{ historyItem.dispatcherName }} - - - -
- - {{ $d(historyItem.timestampFrom) }} - {{ timestampToString(historyItem.timestampFrom) }} - - - - {{ $d(historyItem.timestampTo) }} - - {{ timestampToString(historyItem.timestampTo) }} ({{ - calculateDuration(historyItem.currentDuration) - }}) - - - - {{ $t('journal.online-since') }} - - {{ - new Date().getDate() != new Date(historyItem.timestampFrom).getDate() - ? $d(historyItem.timestampFrom) - : '' - }} - {{ timestampToString(historyItem.timestampFrom) }} - - ({{ calculateDuration(historyItem.currentDuration) }}) - -
-
- - -
- - {{ $t('scenery.dispatcher-rate') }} - {{ historyItem.dispatcherRate }} - - -
- - - REGION: {{ regions.find((r) => r.id == historyItem.region)?.name }} - -
-
- -
-
-
- {{ - timestampToString(parseInt(statusItem.split('@')[0])) - }} - -
-
-
-
+
+
{{ $t('journal.no-further-data') }} @@ -149,21 +47,15 @@ diff --git a/src/components/JournalView/JournalTimetables/_TimetableHistoryList.vue b/src/components/JournalView/JournalTimetables/_TimetableHistoryList.vue deleted file mode 100644 index c55e5eb..0000000 --- a/src/components/JournalView/JournalTimetables/_TimetableHistoryList.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - diff --git a/src/components/SceneryView/SceneryDispatchersHistory.vue b/src/components/SceneryView/SceneryDispatchersHistory.vue index 0bbc38d..9d43e02 100644 --- a/src/components/SceneryView/SceneryDispatchersHistory.vue +++ b/src/components/SceneryView/SceneryDispatchersHistory.vue @@ -7,7 +7,7 @@ {{ $t('scenery.history-list-empty') }}
-
+
@@ -165,14 +165,14 @@ export default defineComponent({ overflow: auto; } -.history-list { +.journal-list { display: flex; flex-direction: column; gap: 0.5em; text-align: left; } -.history-list > div { +.journal-list > div { display: flex; justify-content: space-between; align-items: center; @@ -195,7 +195,7 @@ export default defineComponent({ } @include smallScreen { - .history-list > div { + .journal-list > div { flex-direction: column; justify-content: center; text-align: center; diff --git a/src/components/SceneryView/SceneryTimetablesHistory.vue b/src/components/SceneryView/SceneryTimetablesHistory.vue index 35c2489..8e146b8 100644 --- a/src/components/SceneryView/SceneryTimetablesHistory.vue +++ b/src/components/SceneryView/SceneryTimetablesHistory.vue @@ -19,7 +19,7 @@ {{ $t('scenery.history-list-empty') }}
-
+
@@ -219,14 +219,14 @@ export default defineComponent({ } } -.history-list { +.journal-list { display: flex; flex-direction: column; gap: 0.5em; text-align: left; } -.history-list > div { +.journal-list > div { display: flex; justify-content: space-between; align-items: center; @@ -235,7 +235,7 @@ export default defineComponent({ line-height: 1.5em; } -.history-list > div > button > img { +.journal-list > div > button > img { width: 2em; transform: rotate(180deg); }