From 6ceae3f161bb176987de781feebe661a641a3c7e Mon Sep 17 00:00:00 2001 From: Spythere Date: Fri, 23 Jun 2023 14:19:28 +0200 Subject: [PATCH] =?UTF-8?q?revamp=20tabeli=20historii=20dy=C5=BCur=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SceneryView/SceneryDispatchersHistory.vue | 102 +++++++++--------- .../SceneryView/SceneryTimetablesHistory.vue | 47 +------- src/styles/SceneryView/styles.scss | 11 -- src/styles/badge.scss | 1 - src/styles/sceneryViewTables.scss | 31 ++++++ src/views/SceneryView.vue | 8 +- 6 files changed, 94 insertions(+), 106 deletions(-) delete mode 100644 src/styles/SceneryView/styles.scss create mode 100644 src/styles/sceneryViewTables.scss diff --git a/src/components/SceneryView/SceneryDispatchersHistory.vue b/src/components/SceneryView/SceneryDispatchersHistory.vue index ca07009..fb2d058 100644 --- a/src/components/SceneryView/SceneryDispatchersHistory.vue +++ b/src/components/SceneryView/SceneryDispatchersHistory.vue @@ -2,37 +2,61 @@
-
{{ $t('scenery.history-list-empty') }}
+ + + -
    -
  • - - #{{ item.stationHash }}  - - {{ item.dispatcherLevel >= 2 ? item.dispatcherLevel : 'L' }} - +
+ + + + + - {{ item.dispatcherName }} - + + + + + + + + + +
HashDyżurnyPoziomOcenaData
#{{ historyItem.stationHash }} + + {{ historyItem.dispatcherName }} + + + + {{ historyItem.dispatcherLevel >= 2 ? historyItem.dispatcherLevel : 'L' }} + + + {{ historyItem.dispatcherRate }} + +
+ {{ $d(historyItem.timestampFrom) }} -
- {{ $d(item.timestampFrom) }} + {{ timestampToString(historyItem.timestampFrom) }} + - {{ timestampToString(historyItem.timestampTo) }} ({{ calculateDuration(historyItem.currentDuration) }}) +
- {{ timestampToString(item.timestampFrom) }} - - {{ timestampToString(item.timestampTo) }} ({{ calculateDuration(item.currentDuration) }}) -
+
+ {{ $t('journal.online-since') }} + {{ timestampToString(historyItem.timestampFrom) }} + ({{ calculateDuration(historyItem.currentDuration) }}) +
+
-
- {{ $t('journal.online-since') }} - {{ timestampToString(item.timestampFrom) }} - ({{ calculateDuration(item.currentDuration) }}) -
- - +
{{ $t('scenery.history-list-empty') }}
@@ -84,30 +108,10 @@ export default defineComponent({ diff --git a/src/styles/SceneryView/styles.scss b/src/styles/SceneryView/styles.scss deleted file mode 100644 index 379a32e..0000000 --- a/src/styles/SceneryView/styles.scss +++ /dev/null @@ -1,11 +0,0 @@ -.scenery-section { - position: relative; - height: 100%; - overflow-y: scroll; -} - -.list-warning { - padding: 1em 0.5em; - background-color: #444; - font-size: 1.2em; -} diff --git a/src/styles/badge.scss b/src/styles/badge.scss index 3148bbf..65b6598 100644 --- a/src/styles/badge.scss +++ b/src/styles/badge.scss @@ -30,7 +30,6 @@ display: flex; justify-content: center; align-items: center; - font-size: 0.9em; &.driver { border-radius: 50%; diff --git a/src/styles/sceneryViewTables.scss b/src/styles/sceneryViewTables.scss new file mode 100644 index 0000000..83d9d30 --- /dev/null +++ b/src/styles/sceneryViewTables.scss @@ -0,0 +1,31 @@ +table.scenery-history-table { + width: 100%; + border-collapse: collapse; + + thead { + position: sticky; + top: 0; + background-color: #222222; + } + + th { + padding: 0.5em; + } + + tr { + background-color: #353535; + border: none; + } + + td { + padding: 0.75em; + border-bottom: solid 5px #111; + } +} + +.no-history { + padding: 1em 0.5em; + background-color: #444; + font-size: 1.2em; + color: #ccc; +} diff --git a/src/views/SceneryView.vue b/src/views/SceneryView.vue index ea4833b..1656dfe 100644 --- a/src/views/SceneryView.vue +++ b/src/views/SceneryView.vue @@ -1,4 +1,4 @@ -