diff --git a/src/App.scss b/src/App.scss
index 49e4daf..8ceb3e8 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -1,7 +1,6 @@
@import './styles/responsive.scss';
@import './styles/variables.scss';
@import './styles/global.scss';
-@import './styles/scenery_status.scss';
// VUE ROUTE CHANGE ANIMATION
.view-anim {
diff --git a/src/components/Global/StationStatusBadge.vue b/src/components/Global/StationStatusBadge.vue
new file mode 100644
index 0000000..eb54033
--- /dev/null
+++ b/src/components/Global/StationStatusBadge.vue
@@ -0,0 +1,90 @@
+
+
+ {{ $t(`status.${statusID}`) }}
+ {{ statusID == 'online' ? timestampToString(statusTimestamp!) : '' }}
+
+
+
+ {{ $t('status.free') }}
+
+
+
+
+
+
diff --git a/src/components/JournalView/JournalDispatchersList.vue b/src/components/JournalView/JournalDispatchersList.vue
index 852393c..b21cf65 100644
--- a/src/components/JournalView/JournalDispatchersList.vue
+++ b/src/components/JournalView/JournalDispatchersList.vue
@@ -19,12 +19,12 @@
- | Sceneria |
- {{ $t('scenery.dispatchers-history-hash') }} |
- {{ $t('scenery.dispatchers-history-dispatcher') }} |
- {{ $t('scenery.dispatchers-history-level') }} |
- {{ $t('scenery.dispatchers-history-rate') }} |
- {{ $t('scenery.dispatchers-history-date') }} |
+ {{ $t('journal.history-name') }} |
+ {{ $t('journal.history-hash') }} |
+ {{ $t('journal.history-dispatcher') }} |
+ {{ $t('journal.history-level') }} |
+ {{ $t('journal.history-rate') }} |
+ {{ $t('journal.history-date') }} |
@@ -54,7 +54,7 @@
{{ historyItem.dispatcherRate }}
-
+ |
{{ $d(historyItem.timestampFrom) }}
@@ -66,7 +66,10 @@
- {{ $t('journal.online-since') }} {{ timestampToString(historyItem.timestampFrom) }}
+ {{
+ $t('journal.online-since')
+ }}
+ {{ timestampToString(historyItem.timestampFrom) }}
({{ calculateDuration(historyItem.currentDuration) }})
@@ -74,63 +77,6 @@
|
-
-
- OD {{ new Date(onlineFrom).toLocaleTimeString('pl-PL', { hour: '2-digit', minute: '2-digit' }) }}
-
-
-
- {{ $t(`status.${station.onlineInfo.statusID}`) }}
- {{ station.onlineInfo.statusID == 'online' ? timestampToString(station.onlineInfo.statusTimestamp) : '' }}
-
-
-
- {{ $t('status.free') }}
-
+
@@ -43,20 +36,21 @@ import imageMixin from '../../../mixins/imageMixin';
import routerMixin from '../../../mixins/routerMixin';
import styleMixin from '../../../mixins/styleMixin';
import Station from '../../../scripts/interfaces/Station';
+import StationStatusBadge from '../../Global/StationStatusBadge.vue';
export default defineComponent({
- mixins: [styleMixin, dateMixin, routerMixin, imageMixin],
- props: {
- station: {
- type: Object as () => Station,
- default: {},
+ mixins: [styleMixin, dateMixin, routerMixin, imageMixin],
+ props: {
+ station: {
+ type: Object as () => Station,
+ default: {},
+ },
+ onlineFrom: {
+ type: Number,
+ default: -1,
+ },
},
-
- onlineFrom: {
- type: Number,
- default: -1,
- },
- },
+ components: { StationStatusBadge }
});
@@ -104,3 +98,4 @@ export default defineComponent({
}
}
+
diff --git a/src/components/StationsView/StationTable.vue b/src/components/StationsView/StationTable.vue
index 5f7fbd7..480066a 100644
--- a/src/components/StationsView/StationTable.vue
+++ b/src/components/StationsView/StationTable.vue
@@ -93,16 +93,11 @@
-
- {{ $t(`status.${station.onlineInfo.statusID}`) }}
- {{
- station.onlineInfo.statusID == 'online' ? timestampToString(station.onlineInfo.statusTimestamp) : ''
- }}
-
-
-
- {{ $t('status.free') }}
-
+
|
@@ -253,6 +248,7 @@ import { useStationFiltersStore } from '../../store/stationFiltersStore';
import { useStore } from '../../store/store';
import Loading from '../Global/Loading.vue';
import { HeadIdsTypes, headIconsIds, headIds } from '../../scripts/data/stationHeaderNames';
+import StationStatusBadge from '../Global/StationStatusBadge.vue';
export default defineComponent({
props: {
@@ -262,7 +258,7 @@ export default defineComponent({
},
},
- components: { Loading },
+ components: { Loading, StationStatusBadge },
mixins: [styleMixin, dateMixin, stationInfoMixin, returnBtnMixin, imageMixin],
data: () => ({
diff --git a/src/locales/en.json b/src/locales/en.json
index 43b9a30..803c783 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -335,7 +335,14 @@
"stats-error": "Oops! An unexpected error occurred while trying to fetch statistics! :/",
"timetable-location-signal": "signal:",
- "timetable-location-route": "route:"
+ "timetable-location-route": "route:",
+
+ "history-name": "Scenery name",
+ "history-hash": "Hash",
+ "history-dispatcher": "Dispatcher",
+ "history-level": "Level",
+ "history-rate": "Rate",
+ "history-date": "Service date"
},
"scenery": {
"users": "PLAYERS ONLINE",
diff --git a/src/locales/pl.json b/src/locales/pl.json
index 37c8f18..b053f57 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -338,7 +338,14 @@
"stats-error": "Ups! Wystąpił błąd podczas próby pobrania statystyk! :/",
"timetable-location-signal": "semafor:",
- "timetable-location-route": "szlak:"
+ "timetable-location-route": "szlak:",
+
+ "history-name": "Sceneria",
+ "history-hash": "Hash",
+ "history-dispatcher": "Dyżurny",
+ "history-level": "Poziom",
+ "history-rate": "Ocena",
+ "history-date": "Data służby"
},
"scenery": {
"users": "GRACZE ONLINE",
diff --git a/src/scripts/interfaces/api/DispatchersAPIData.ts b/src/scripts/interfaces/api/DispatchersAPIData.ts
index 26e39ca..5961188 100644
--- a/src/scripts/interfaces/api/DispatchersAPIData.ts
+++ b/src/scripts/interfaces/api/DispatchersAPIData.ts
@@ -7,6 +7,7 @@ export interface DispatcherHistory {
dispatcherLevel: number | null;
dispatcherRate: number;
dispatcherIsSupporter: boolean;
+ dispatcherStatus?: number;
isOnline: boolean;
lastOnlineTimestamp: number;
region: string;
diff --git a/src/styles/scenery_status.scss b/src/styles/scenery_status.scss
deleted file mode 100644
index c3f8dc8..0000000
--- a/src/styles/scenery_status.scss
+++ /dev/null
@@ -1,56 +0,0 @@
-$free: #8a8a8a;
-$ending: #e6c300;
-$no-limit: #117fc9;
-$unav: #ff3d5d;
-$brb: #e6a100;
-$no-space: #222;
-$taken: #09a116;
-$unknown: rgb(185, 60, 60);
-
-.status-badge {
- border-radius: 1rem;
- font-weight: 500;
-
- padding: 0.2em .55em;
-
- background-color: $taken;
-
- &.free {
- background-color: $free;
- font-size: 0.95em;
- }
-
- &.ending {
- background-color: $ending;
- color: black;
- font-size: 0.9em;
- }
-
- &.no-limit {
- background-color: $no-limit;
- font-size: 0.85em;
- }
-
- &.not-signed,
- &.unavailable {
- background-color: $unav;
- font-size: 0.85em;
- }
-
- &.brb {
- background-color: $brb;
- color: black;
- font-size: 0.95em;
- }
-
- &.no-space {
- background-color: $no-space;
- color: white;
- font-size: 0.85em;
- }
-
- &.unknown {
- background-color: $unknown;
- font-size: 0.95em;
- }
-}
\ No newline at end of file
diff --git a/src/views/JournalDispatchers.vue b/src/views/JournalDispatchers.vue
index 2074a76..a5e3daa 100644
--- a/src/views/JournalDispatchers.vue
+++ b/src/views/JournalDispatchers.vue
@@ -6,7 +6,7 @@
|