mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 21:38:13 +00:00
Poprawki interfejsu
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "stacjownik",
|
"name": "stacjownik",
|
||||||
"version": "0.1.0",
|
"version": "1.4.7",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
|
|||||||
@@ -80,10 +80,8 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="station_status">
|
<td class="station_status">
|
||||||
<span
|
<span class="status-badge" :class="station.statusID"
|
||||||
class="status-badge"
|
>{{ $t(`status.${station.statusID}`) }}
|
||||||
:class="station.statusID"
|
|
||||||
>{{ $t(`status.${station.statusID}`) }}
|
|
||||||
{{
|
{{
|
||||||
station.statusID == "online" ? station.statusTimeString : ""
|
station.statusID == "online" ? station.statusTimeString : ""
|
||||||
}}
|
}}
|
||||||
@@ -98,9 +96,10 @@
|
|||||||
<span
|
<span
|
||||||
v-if="station.online"
|
v-if="station.online"
|
||||||
:style="calculateExpStyle(station.dispatcherExp)"
|
:style="calculateExpStyle(station.dispatcherExp)"
|
||||||
>{{
|
>{{
|
||||||
2 > station.dispatcherExp ? "L" : station.dispatcherExp
|
2 > station.dispatcherExp ? "L" : station.dispatcherExp
|
||||||
}}</span>
|
}}</span
|
||||||
|
>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td class="station_tracks twoway">
|
<td class="station_tracks twoway">
|
||||||
@@ -183,10 +182,7 @@
|
|||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td
|
<td class="station_users" :class="{ inactive: !station.online }">
|
||||||
class="station_users"
|
|
||||||
:class="{ inactive: !station.online }"
|
|
||||||
>
|
|
||||||
<span>
|
<span>
|
||||||
<span class="highlight">{{ station.currentUsers }}</span>
|
<span class="highlight">{{ station.currentUsers }}</span>
|
||||||
/
|
/
|
||||||
@@ -194,10 +190,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td
|
<td class="station_spawns" :class="{ inactive: !station.online }">
|
||||||
class="station_spawns"
|
|
||||||
:class="{ inactive: !station.online }"
|
|
||||||
>
|
|
||||||
<span class="highlight">{{ station.spawns.length }}</span>
|
<span class="highlight">{{ station.spawns.length }}</span>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@@ -206,7 +199,7 @@
|
|||||||
:class="{ inactive: !station.online }"
|
:class="{ inactive: !station.online }"
|
||||||
>
|
>
|
||||||
<span class="highlight">
|
<span class="highlight">
|
||||||
{{ station.scheduledTrains.length }}
|
{{ station.scheduledTrains.length }}
|
||||||
</span>
|
</span>
|
||||||
/
|
/
|
||||||
<span style="color: #bbb">{{
|
<span style="color: #bbb">{{
|
||||||
@@ -220,17 +213,11 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="no-stations" v-if="stations.length == 0 && isDataLoaded">
|
||||||
class="no-stations"
|
|
||||||
v-if="stations.length == 0 && isDataLoaded"
|
|
||||||
>
|
|
||||||
{{ $t("sceneries.no-stations") }}
|
{{ $t("sceneries.no-stations") }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="no-stations" v-else-if="!isDataLoaded">
|
||||||
class="no-stations"
|
|
||||||
v-else-if="!isDataLoaded"
|
|
||||||
>
|
|
||||||
{{ $t("app.loading") }}
|
{{ $t("app.loading") }}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -45,19 +45,22 @@
|
|||||||
|
|
||||||
<div class="info_timetable" v-else>
|
<div class="info_timetable" v-else>
|
||||||
<div class="timetable_general">
|
<div class="timetable_general">
|
||||||
<span class="warning twr" v-if="train.timetableData.TWR">
|
<span class="timetable_hero">
|
||||||
TWR
|
<span class="timetable_warnings">
|
||||||
</span>
|
<span class="warning twr" v-if="train.timetableData.TWR">
|
||||||
|
TWR
|
||||||
|
</span>
|
||||||
|
<span class="warning skr" v-if="train.timetableData.SKR">
|
||||||
|
SKR
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
|
||||||
<span class="warning skr" v-if="train.timetableData.SKR">
|
<span>
|
||||||
SKR
|
<strong>{{ train.timetableData.category }}</strong>
|
||||||
</span>
|
{{ train.trainNo }} |
|
||||||
|
<span style="color: gold">
|
||||||
<span>
|
{{ train.timetableData.routeDistance }} km
|
||||||
<strong>{{ train.timetableData.category }}</strong>
|
</span>
|
||||||
{{ train.trainNo }} |
|
|
||||||
<span style="color: gold">
|
|
||||||
{{ train.timetableData.routeDistance }} km
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@@ -423,6 +426,10 @@ img.train-image {
|
|||||||
|
|
||||||
.info {
|
.info {
|
||||||
.timetable {
|
.timetable {
|
||||||
|
&_hero {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
&_general {
|
&_general {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@@ -441,6 +448,8 @@ img.train-image {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
margin: 5px 0;
|
margin: 5px 0;
|
||||||
|
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
@@ -450,6 +459,26 @@ img.train-image {
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-size: 0.7em;
|
font-size: 0.7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&_warnings {
|
||||||
|
display: flex;
|
||||||
|
color: black;
|
||||||
|
|
||||||
|
.warning {
|
||||||
|
padding: 0.1em 0.65em;
|
||||||
|
margin-right: 0.35em;
|
||||||
|
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
&.twr {
|
||||||
|
background: var(--clr-twr);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.skr {
|
||||||
|
background: var(--clr-skr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,25 +566,6 @@ img.train-image {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.warning {
|
|
||||||
padding: 0.1em 0.8em;
|
|
||||||
margin-right: 0.5em;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: black;
|
|
||||||
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
&.twr {
|
|
||||||
background: var(--clr-twr);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.skr {
|
|
||||||
background: var(--clr-skr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@include smallScreen() {
|
@include smallScreen() {
|
||||||
.info-bottom {
|
.info-bottom {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
import { createI18n, LocaleMessages, VueMessageType } from 'vue-i18n'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load locale messages
|
|
||||||
*
|
|
||||||
* The loaded `JSON` locale messages is pre-compiled by `@intlify/vue-i18n-loader`, which is integrated into `vue-cli-plugin-i18n`.
|
|
||||||
* See: https://github.com/intlify/vue-i18n-loader#rocket-i18n-resource-pre-compilation
|
|
||||||
*/
|
|
||||||
function loadLocaleMessages(): LocaleMessages<VueMessageType> {
|
|
||||||
const locales = require.context('./locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
|
|
||||||
const messages: LocaleMessages<VueMessageType> = {}
|
|
||||||
locales.keys().forEach(key => {
|
|
||||||
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
|
|
||||||
if (matched && matched.length > 1) {
|
|
||||||
const locale = matched[1]
|
|
||||||
messages[locale] = locales(key)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
return messages
|
|
||||||
}
|
|
||||||
|
|
||||||
export default createI18n({
|
|
||||||
legacy: false,
|
|
||||||
locale: process.env.VUE_APP_I18N_LOCALE || 'en',
|
|
||||||
fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',
|
|
||||||
messages: loadLocaleMessages()
|
|
||||||
})
|
|
||||||
+2
-2
@@ -113,8 +113,8 @@
|
|||||||
"cars": "Car count",
|
"cars": "Car count",
|
||||||
"EZT": "EMU",
|
"EZT": "EMU",
|
||||||
"SZT": "DMU",
|
"SZT": "DMU",
|
||||||
"loco-electric": "ELECTRIC LOCO",
|
"loco-electric": "Electric loco",
|
||||||
"loco-diesel": "DIESEL LOCO"
|
"loco-diesel": "Diesel loco"
|
||||||
},
|
},
|
||||||
"journal": {
|
"journal": {
|
||||||
"title": "SCENERY ACTIVITY JOURNAL",
|
"title": "SCENERY ACTIVITY JOURNAL",
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'
|
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
|
||||||
|
|
||||||
import StationsView from "@/views/StationsView.vue";
|
import StationsView from "@/views/StationsView.vue";
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHistory(),
|
||||||
routes,
|
routes,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -11,14 +11,8 @@
|
|||||||
</action-button>
|
</action-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class="scenery-wrapper" v-if="stationInfo">
|
||||||
class="scenery-wrapper"
|
<SceneryInfo :stationInfo="stationInfo" :timetableOnly="timetableOnly" />
|
||||||
v-if="stationInfo"
|
|
||||||
>
|
|
||||||
<SceneryInfo
|
|
||||||
:stationInfo="stationInfo"
|
|
||||||
:timetableOnly="timetableOnly"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SceneryTimetable
|
<SceneryTimetable
|
||||||
:stationInfo="stationInfo"
|
:stationInfo="stationInfo"
|
||||||
|
|||||||
Reference in New Issue
Block a user