Compare commits

...

11 Commits

Author SHA1 Message Date
Spythere da1be0e10a Wersja 1.14.2 2023-05-17 02:24:05 +02:00
Spythere f49bb12948 bump 1.14.2 2023-05-17 02:21:13 +02:00
Spythere 02673a3d70 poprawki filtrów scenerii 2023-05-16 14:27:31 +02:00
Spythere 4ddc7345df poprawki filtrów RJ 2023-05-16 02:40:08 +02:00
Spythere 5d822684c0 feature: rozszerzone filtry RJ 2023-05-14 15:05:51 +02:00
Spythere 69fa15c70a v1.14.1
v1.14.1
2023-04-13 19:25:30 +02:00
Spythere 9192067388 1.14.1 2023-04-13 19:21:36 +02:00
Spythere 2b41e5b857 hotfix 2023-04-13 19:21:24 +02:00
Spythere 674680ff14 1.14: hotfixy
1.14 hotfixy
2023-04-13 19:15:38 +02:00
Spythere 475bd2ff10 przeniesienie skrótów do widoku scenerii 2023-04-13 19:11:44 +02:00
Spythere 074d1eb155 Hotfix tłumaczeń 2023-04-13 18:50:00 +02:00
11 changed files with 111 additions and 70 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "stacjownik", "name": "stacjownik",
"version": "1.14.0", "version": "1.14.2",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+3
View File
@@ -0,0 +1,3 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.75 3.75H22.5V1.25H20V3.75H10V1.25H7.5V3.75H6.25C4.875 3.75 3.75 4.875 3.75 6.25V23.75C3.75 25.125 4.875 26.25 6.25 26.25H23.75C25.125 26.25 26.25 25.125 26.25 23.75V6.25C26.25 4.875 25.125 3.75 23.75 3.75ZM23.75 23.75H6.25V11.25H23.75V23.75ZM6.25 8.75V6.25H23.75V8.75H6.25ZM8.75 13.75H21.25V16.25H8.75V13.75ZM8.75 18.75H17.5V21.25H8.75V18.75Z" fill="#F2E147"/>
</svg>

After

Width:  |  Height:  |  Size: 477 B

+3
View File
@@ -0,0 +1,3 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.75 3.75H22.5V1.25H20V3.75H10V1.25H7.5V3.75H6.25C4.875 3.75 3.75 4.875 3.75 6.25V23.75C3.75 25.125 4.875 26.25 6.25 26.25H23.75C25.125 26.25 26.25 25.125 26.25 23.75V6.25C26.25 4.875 25.125 3.75 23.75 3.75ZM23.75 23.75H6.25V11.25H23.75V23.75ZM6.25 8.75V6.25H23.75V8.75H6.25ZM8.75 13.75H21.25V16.25H8.75V13.75ZM8.75 18.75H17.5V21.25H8.75V18.75Z" fill="#66FF6C"/>
</svg>

After

Width:  |  Height:  |  Size: 477 B

+3
View File
@@ -0,0 +1,3 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.75 3.75H22.5V1.25H20V3.75H10V1.25H7.5V3.75H6.25C4.875 3.75 3.75 4.875 3.75 6.25V23.75C3.75 25.125 4.875 26.25 6.25 26.25H23.75C25.125 26.25 26.25 25.125 26.25 23.75V6.25C26.25 4.875 25.125 3.75 23.75 3.75ZM23.75 23.75H6.25V11.25H23.75V23.75ZM6.25 8.75V6.25H23.75V8.75H6.25ZM8.75 13.75H21.25V16.25H8.75V13.75ZM8.75 18.75H17.5V21.25H8.75V18.75Z" fill="#898989"/>
</svg>

After

Width:  |  Height:  |  Size: 477 B

+9 -3
View File
@@ -4,6 +4,8 @@
{{ station.name }} {{ station.name }}
</a> </a>
<div class="scenery-abbrev">{{ $t('scenery.abbrev') }} <b>{{ station.generalInfo?.abbr }}</b></div>
<div class="scenery-hash" v-if="station.onlineInfo?.hash">#{{ station.onlineInfo.hash }}</div> <div class="scenery-hash" v-if="station.onlineInfo?.hash">#{{ station.onlineInfo.hash }}</div>
</section> </section>
</template> </template>
@@ -28,16 +30,20 @@ export default defineComponent({
.scenery-name { .scenery-name {
font-weight: bold; font-weight: bold;
position: relative;
font-size: 3em; font-size: 3em;
text-transform: uppercase; text-transform: uppercase;
} }
.scenery-abbrev {
font-size: 1.3em;
color: #aaa;
}
.scenery-hash { .scenery-hash {
margin-top: 0.5em;
color: #aaa; color: #aaa;
font-size: 1.2em; font-size: 1.2em;
} }
</style> </style>
+2 -1
View File
@@ -30,8 +30,9 @@
style="color: salmon; text-decoration: underline; font-weight: bold" style="color: salmon; text-decoration: underline; font-weight: bold"
:href="station.generalInfo.projectUrl" :href="station.generalInfo.projectUrl"
target="_blank" target="_blank"
>{{ station.generalInfo.project }}</a
> >
{{ station.generalInfo.project }}
</a>
</span> </span>
</div> </div>
+36 -18
View File
@@ -8,7 +8,12 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th v-for="(headerName, i) in headIds" :key="headerName" @click="changeSorter(headerName)"> <th
v-for="(headerName, i) in headIds"
:key="headerName"
@click="changeSorter(headerName)"
class="header-text"
>
<span class="header_wrapper"> <span class="header_wrapper">
<div v-html="$t(`sceneries.${headerName}`)"></div> <div v-html="$t(`sceneries.${headerName}`)"></div>
@@ -21,9 +26,14 @@
</span> </span>
</th> </th>
<th v-for="(headerName, i) in headIconsIds" :key="headerName" @click="changeSorter(headerName)"> <th
v-for="(headerName, i) in headIconsIds"
:key="headerName"
@click="changeSorter(headerName)"
class="header-image"
>
<span class="header_wrapper"> <span class="header_wrapper">
<img :src="getIcon(headerName)" :alt="headerName" :title="$t(`sceneries.${headerName}s`)" /> <img :src="getIcon(headerName)" :alt="headerName" :title="$t(`sceneries.${headerName}`)" />
<img <img
class="sort-icon" class="sort-icon"
@@ -53,10 +63,6 @@
{{ station.name }} {{ station.name }}
</td> </td>
<td>
{{ station.generalInfo?.abbr }}
</td>
<td class="station_level"> <td class="station_level">
<span v-if="station.generalInfo"> <span v-if="station.generalInfo">
<span <span
@@ -194,25 +200,31 @@
<td class="station_users" :class="{ inactive: !station.onlineInfo }"> <td class="station_users" :class="{ inactive: !station.onlineInfo }">
<span> <span>
<span class="highlight">{{ station.onlineInfo?.currentUsers || '0' }}</span> <span class="highlight">{{ station.onlineInfo?.currentUsers || 0 }}</span>
/ /
<span>{{ station.onlineInfo?.maxUsers || '0' }}</span> <span class="highlight">{{ station.onlineInfo?.maxUsers || 0 }}</span>
</span> </span>
</td> </td>
<td class="station_spawns" :class="{ inactive: !station.onlineInfo }"> <td class="station_spawns" :class="{ inactive: !station.onlineInfo }">
<span class="highlight">{{ station.onlineInfo?.spawns.length || '0' }}</span> <span>{{ station.onlineInfo?.spawns.length || 0 }}</span>
</td> </td>
<td class="station_schedules" :class="{ inactive: !station.onlineInfo }"> <td class="station_schedules" style="width: 30px" :class="{ inactive: !station.onlineInfo }">
<span>
<span class="highlight"> <span class="highlight">
{{ station.onlineInfo?.scheduledTrains?.length || '0' }} {{ station.onlineInfo?.scheduledTrains?.length || 0 }}
</span> </span>
/ </td>
<span style="color: #bbb">
{{ station.onlineInfo?.scheduledTrains?.filter((train) => train.stopInfo.confirmed).length || '0' }} <td class="station_schedules" style="width: 30px" :class="{ inactive: !station.onlineInfo }">
<span style="color: #ccc">
{{ station.onlineInfo?.scheduledTrains?.filter((train) => !train.stopInfo.confirmed).length || 0 }}
</span> </span>
</td>
<td class="station_schedules" style="width: 30px" :class="{ inactive: !station.onlineInfo }">
<span style="color: #66ff6c">
{{ station.onlineInfo?.scheduledTrains?.filter((train) => train.stopInfo.confirmed).length || 0 }}
</span> </span>
</td> </td>
</tr> </tr>
@@ -356,9 +368,15 @@ table {
position: sticky; position: sticky;
top: 0; top: 0;
min-width: 80px; &.header-text {
min-width: 140px;
}
padding: 0.5em; &.header-image {
min-width: 60px;
}
padding: 0.5em 0.25em;
background-color: $bgCol; background-color: $bgCol;
white-space: pre-wrap; white-space: pre-wrap;
+8 -5
View File
@@ -205,16 +205,17 @@
}, },
"sceneries": { "sceneries": {
"station": "Station", "station": "Station",
"abbr": "Station\nabbrev.",
"min-lvl": "Min. dispatcher\nlevel", "min-lvl": "Min. dispatcher\nlevel",
"status": "Status", "status": "Status",
"dispatcher": "Dispatcher", "dispatcher": "Dispatcher",
"dispatcher-lvl": "Dispatcher\nlevel", "dispatcher-lvl": "Dispatcher\nlevel",
"routes": "Routes\ndouble / single", "routes": "Routes\ndouble / single",
"general": "General info", "general": "General info",
"users": "Drivers online", "user": "Drivers online",
"spawns": "Spawns online", "spawn": "Spawns online",
"timetables": "Active timetables", "timetableAll": "Active timetables",
"timetableConfirmed": "Confirmed timetables",
"timetableUnconfirmed": "Unconfirmed timetables",
"no-stations": "No stations to show here!", "no-stations": "No stations to show here!",
"scenery-search": "Search for scenery..." "scenery-search": "Search for scenery..."
}, },
@@ -332,6 +333,7 @@
"history-btn": "View the dispatcher history", "history-btn": "View the dispatcher history",
"info-btn": "Return to the scenery view", "info-btn": "Return to the scenery view",
"authors-title": "Scenery author | Scenery authors", "authors-title": "Scenery author | Scenery authors",
"abbrev": "Station symbol:",
"lines-title": "Real lines", "lines-title": "Real lines",
"project-title": "Project name", "project-title": "Project name",
"one-way-routes": "One way routes", "one-way-routes": "One way routes",
@@ -383,7 +385,8 @@
"desc-next-arrival": "Leaves towards: {nextStationName} (szlak {nextArrivalLine})", "desc-next-arrival": "Leaves towards: {nextStationName} (szlak {nextArrivalLine})",
"desc-departed": "The train is at the station and it's been departed. Leaves towards: {nextStationName} (szlak {nextArrivalLine})", "desc-departed": "The train is at the station and it's been departed. Leaves towards: {nextStationName} (szlak {nextArrivalLine})",
"desc-departed-away": "The train has been departed to: {nextStationName} (szlak {nextArrivalLine})", "desc-departed-away": "The train has been departed to: {nextStationName} (szlak {nextArrivalLine})",
"desc-end": "The train terminates here" "desc-end": "The train terminates here",
"desc-terminated": "The train has been terminated"
}, },
"history": { "history": {
"title": "TIMETABLE JOURNAL", "title": "TIMETABLE JOURNAL",
+8 -4
View File
@@ -215,9 +215,11 @@
"dispatcher-lvl": "Poziom\ndyżurnego", "dispatcher-lvl": "Poziom\ndyżurnego",
"routes": "Szlaki\n2tor / 1tor", "routes": "Szlaki\n2tor / 1tor",
"general": "Informacje\nogólne", "general": "Informacje\nogólne",
"users": "Maszyniści online", "user": "Maszyniści online",
"spawns": "Otwarte spawny", "spawn": "Otwarte spawny",
"timetables": "Aktywne rozkłady jazdy", "timetableAll": "Aktywne rozkłady jazdy",
"timetableConfirmed": "Zatwierdzone rozkłady jazdy",
"timetableUnconfirmed": "Niezatwierdzone rozkłady jazdy",
"no-stations": "Brak stacji do wyświetlenia!", "no-stations": "Brak stacji do wyświetlenia!",
"scenery-search": "Wyszukaj scenerię..." "scenery-search": "Wyszukaj scenerię..."
}, },
@@ -336,6 +338,7 @@
"history-btn": "Przejdź do widoku historii dyżurnych ruchu", "history-btn": "Przejdź do widoku historii dyżurnych ruchu",
"info-btn": "Wróć do widoku scenerii", "info-btn": "Wróć do widoku scenerii",
"authors-title": "Autor scenerii | Autorzy scenerii", "authors-title": "Autor scenerii | Autorzy scenerii",
"abbrev": "Skrót posterunku:",
"lines-title": "Rzeczywiste linie", "lines-title": "Rzeczywiste linie",
"project-title": "Projekt", "project-title": "Projekt",
"one-way-routes": "Szlaki jednotorowe", "one-way-routes": "Szlaki jednotorowe",
@@ -387,7 +390,8 @@
"desc-next-arrival": "Odjeżdża do: {nextStationName} (szlak {nextArrivalLine})", "desc-next-arrival": "Odjeżdża do: {nextStationName} (szlak {nextArrivalLine})",
"desc-departed": "Pociąg jest na tej scenerii i został odprawiony. Odjeżdża do: {nextStationName} (szlak {nextArrivalLine})", "desc-departed": "Pociąg jest na tej scenerii i został odprawiony. Odjeżdża do: {nextStationName} (szlak {nextArrivalLine})",
"desc-departed-away": "Pociąg został odprawiony i odjechał do: {nextStationName} (szlak {nextArrivalLine})", "desc-departed-away": "Pociąg został odprawiony i odjechał do: {nextStationName} (szlak {nextArrivalLine})",
"desc-end": "Pociąg kończy bieg" "desc-end": "Pociąg kończy bieg",
"desc-terminated": "Pociąg skończył bieg"
}, },
"history": { "history": {
"title": "DZIENNIK ROZKŁADÓW JAZDY" "title": "DZIENNIK ROZKŁADÓW JAZDY"
+2 -11
View File
@@ -1,14 +1,5 @@
export const headIds = [ export const headIds = ['station', 'min-lvl', 'status', 'dispatcher', 'dispatcher-lvl', 'routes', 'general'] as const;
'station',
'abbr',
'min-lvl',
'status',
'dispatcher',
'dispatcher-lvl',
'routes',
'general',
] as const;
export const headIconsIds = ['user', 'spawn', 'timetable'] as const; export const headIconsIds = ['user', 'spawn', 'timetableAll', 'timetableUnconfirmed', 'timetableConfirmed'] as const;
export type HeadIdsTypes = typeof headIds[number] | typeof headIconsIds[number]; export type HeadIdsTypes = typeof headIds[number] | typeof headIconsIds[number];
+33 -24
View File
@@ -3,23 +3,18 @@ import Filter from '../../scripts/interfaces/Filter';
import Station from '../../scripts/interfaces/Station'; import Station from '../../scripts/interfaces/Station';
export const sortStations = (a: Station, b: Station, sorter: { headerName: HeadIdsTypes; dir: number }) => { export const sortStations = (a: Station, b: Station, sorter: { headerName: HeadIdsTypes; dir: number }) => {
let diff = 0;
switch (sorter.headerName) { switch (sorter.headerName) {
case 'station': case 'station':
return sorter.dir == 1 ? a.name.localeCompare(b.name) : b.name.localeCompare(a.name); return sorter.dir == 1 ? a.name.localeCompare(b.name) : b.name.localeCompare(a.name);
case 'abbr':
if ((a.generalInfo?.abbr || '') > (b.generalInfo?.abbr || '')) return sorter.dir;
if ((a.generalInfo?.abbr || '') < (b.generalInfo?.abbr || '')) return -sorter.dir;
break;
case 'min-lvl': case 'min-lvl':
if ((a.generalInfo?.reqLevel || 0) > (b.generalInfo?.reqLevel || 0)) return sorter.dir; diff = (a.generalInfo?.reqLevel || 0) - (b.generalInfo?.reqLevel || 0);
if ((a.generalInfo?.reqLevel || 0) < (b.generalInfo?.reqLevel || 0)) return -sorter.dir;
break; break;
case 'status': case 'status':
if ((a.onlineInfo?.statusTimestamp || 0) > (b.onlineInfo?.statusTimestamp || 0)) return sorter.dir; diff = (a.onlineInfo?.statusTimestamp || 0) - (b.onlineInfo?.statusTimestamp || 0);
if ((a.onlineInfo?.statusTimestamp || 0) < (b.onlineInfo?.statusTimestamp || 0)) return -sorter.dir;
break; break;
case 'dispatcher': case 'dispatcher':
@@ -30,34 +25,48 @@ export const sortStations = (a: Station, b: Station, sorter: { headerName: HeadI
break; break;
case 'dispatcher-lvl': case 'dispatcher-lvl':
if ((a.onlineInfo?.dispatcherExp || 0) > (b.onlineInfo?.dispatcherExp || 0)) return sorter.dir; diff = (a.onlineInfo?.dispatcherExp || 0) - (b.onlineInfo?.dispatcherExp || 0);
if ((a.onlineInfo?.dispatcherExp || 0) < (b.onlineInfo?.dispatcherExp || 0)) return -sorter.dir;
break; break;
case 'user': case 'user':
if ((a.onlineInfo?.currentUsers || 0) > (b.onlineInfo?.currentUsers || 0)) return sorter.dir; diff = (b.onlineInfo ? b.onlineInfo.currentUsers : -1) - (a.onlineInfo ? a.onlineInfo.currentUsers : -1);
if ((a.onlineInfo?.currentUsers || 0) < (b.onlineInfo?.currentUsers || 0)) return -sorter.dir;
if ((a.onlineInfo?.maxUsers || 0) > (b.onlineInfo?.maxUsers || 0)) return sorter.dir;
if ((a.onlineInfo?.maxUsers || 0) < (b.onlineInfo?.maxUsers || 0)) return -sorter.dir;
break; break;
case 'spawn': case 'spawn':
if ((a.onlineInfo?.spawns.length || 0) > (b.onlineInfo?.spawns.length || 0)) return sorter.dir; diff = (a.onlineInfo ? a.onlineInfo.spawns.length : -1) - (b.onlineInfo ? b.onlineInfo.spawns.length : -1);
if ((a.onlineInfo?.spawns.length || 0) < (b.onlineInfo?.spawns.length || 0)) return -sorter.dir;
break; break;
case 'timetable': case 'timetableConfirmed':
if ((a.onlineInfo?.scheduledTrains?.length || 0) > (b.onlineInfo?.scheduledTrains?.length || 0)) diff =
return sorter.dir; (a.onlineInfo?.scheduledTrains
if ((a.onlineInfo?.scheduledTrains?.length || 0) < (b.onlineInfo?.scheduledTrains?.length || 0)) ? a.onlineInfo.scheduledTrains.filter((train) => train.stopInfo.confirmed).length
return -sorter.dir; : -1) -
(b.onlineInfo?.scheduledTrains
? b.onlineInfo.scheduledTrains.filter((train) => train.stopInfo.confirmed).length
: -1);
break;
case 'timetableUnconfirmed':
diff =
(a.onlineInfo?.scheduledTrains
? a.onlineInfo.scheduledTrains.filter((train) => !train.stopInfo.confirmed).length
: -1) -
(b.onlineInfo?.scheduledTrains
? b.onlineInfo.scheduledTrains.filter((train) => !train.stopInfo.confirmed).length
: -1);
break;
case 'timetableAll':
diff =
(a.onlineInfo?.scheduledTrains ? a.onlineInfo.scheduledTrains.length : -1) -
(b.onlineInfo?.scheduledTrains ? b.onlineInfo.scheduledTrains.length : -1);
break;
default: default:
break; break;
} }
if (diff != 0) return Math.sign(diff) * sorter.dir;
return a.name.localeCompare(b.name); return a.name.localeCompare(b.name);
}; };