Poprawki wyglądu

This commit is contained in:
2022-01-10 03:55:55 +01:00
parent 400b853eac
commit c7447d3655
4 changed files with 25 additions and 22 deletions
+10 -9
View File
@@ -1,14 +1,14 @@
<template>
<div class="scenery-history">
<h2>HISTORIA DYŻURÓW</h2>
<h2>{{ $t('journal.title') }}</h2>
<ul>
<li v-if="!isLoaded">
<h3>Ładowanie historii...</h3>
<h3>{{ $t('journal.loading') }}</h3>
</li>
<li v-if="isLoaded && dispatcherTimeline.length == 0">
<h3>Brak historii dla tej scenerii!</h3>
<h3>{{ $t('journal.no-history') }}</h3>
</li>
<li v-for="(timeline, i) in dispatcherTimeline" :key="i">
@@ -98,9 +98,9 @@ export default defineComponent({
async mounted() {
try {
const apiResult: HistoryResultAPI = (await axios.get(`${API_URL}?name=${this.name}`)).data;
this.isLoaded = true;
if(!apiResult || !apiResult.result) return;
if (!apiResult || !apiResult.result) return;
if (!apiResult.errorMessage) {
this.dispatcherHistory = apiResult.result.dispatcherHistory;
@@ -122,7 +122,6 @@ export default defineComponent({
return acc;
}, [] as DispatcherTimeline[])
.reverse();
}
} catch (error) {
console.error(error);
@@ -148,12 +147,14 @@ export default defineComponent({
<style lang="scss" scoped>
.scenery-history {
height: 600px;
overflow-y: scroll;
height: 600px;
overflow-y: hidden;
}
ul {
margin-top: 1em;
margin-top: 2em;
height: 600px;
overflow-y: scroll;
}
li {
+6 -5
View File
@@ -139,10 +139,9 @@
"table-limit": "For performance reasons there's a limit of 10 trains shown at the same time."
},
"journal": {
"title": "SCENERY ACTIVITY JOURNAL",
"subtitle": "Shows all recent dispatchers on a selected scenery",
"disclaimer": "<b>This functionality is unfinished!</b> \n Information shown here could be false or incorrect!",
"select": "Select a scenery"
"title": "DISPATCHER HISTORY",
"loading": "Loading dispatcher history data...",
"no-history": "No dispatcher history found!"
},
"scenery": {
"users": "PLAYERS ONLINE",
@@ -152,7 +151,9 @@
"no-users": "NO ACTIVE PLAYERS",
"no-spawns": "NO OPEN SPAWNS",
"no-scenery": "Oops! This scenery doesn't exist!",
"return-btn": "Return to main site"
"return-btn": "Return to main site",
"history-btn": "View the dispatcher history",
"info-btn": "Return to the scenery view"
},
"timetables": {
"timetable-only": "Switch to timetable-only view",
+6 -5
View File
@@ -139,10 +139,9 @@
"table-limit": "Dla płynności działania strony pokazanych jest tylko 10 pociągów zgodnie z wybranymi filtrami."
},
"journal": {
"title": "DZIENNIK AKTYWNOŚCI SCENERII",
"subtitle": "Pokazuje dyżurnych, którzy ostatnio byli aktywni na wybranej scenerii",
"disclaimer": "<b>Ta funkcjonalność jest w testach beta!</b> \n Informacje pokazywane na ekranie mogą znikać, a ich zawartość może być fałszywa!",
"select": "Wybierz scenerię"
"title": "HISTORIA DYŻURÓW",
"loading": "Ładowanie historii dyżurów...",
"no-history": "Brak historii dyżurów dla tej scenerii!"
},
"scenery": {
"users": "GRACZE ONLINE",
@@ -152,7 +151,9 @@
"no-users": "BRAK AKTYWNYCH GRACZY",
"no-spawns": "BRAK OTWARTYCH SPAWNÓW",
"no-scenery": "Ups! Ta sceneria nie istnieje!",
"return-btn": "Wróć na stronę główną"
"return-btn": "Wróć na stronę główną",
"history-btn": "Przejdź do widoku historii dyżurnych ruchu",
"info-btn": "Wróc do widoku scenerii"
},
"timetables": {
"timetable-only": "Wyodrębnij rozkłady jazdy",
+3 -3
View File
@@ -9,7 +9,7 @@
</div>
<div class="scenery-wrapper" v-if="stationInfo" ref="card-wrapper">
<button v-if="!timetableOnly" class="back-btn btn btn--image" title="Powrót do scenerii" @click="navigateTo('/')">
<button v-if="!timetableOnly" class="back-btn btn btn--image" :title="$t('scenery.return-btn')" @click="navigateTo('/')">
<img :src="icons.back" alt="Back to scenery" />
</button>
@@ -17,9 +17,9 @@
v-if="!timetableOnly"
class="history-btn btn btn--image"
@click="setCardViewMode(viewMode == 'history' ? 'info' : 'history')"
:title="viewMode == 'history' ? 'Powrót do widoku scenerii' : 'Widok historii dyżurnych ruchu'"
:title="viewMode == 'history' ? $t('scenery.info-btn') : $t('scenery.history-btn')"
>
<img :src="viewMode == 'history' ? icons.history : icons.user" alt="icon" />
<img :src="viewMode == 'history' ? icons.user : icons.history" alt="icon" />
</button>
<SceneryHeader :station="stationInfo" />