mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
Dodano filtr 'wycofana'
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="64" height="64" fill="#898989"/>
|
||||
<path d="M21 21L43 43M21 43L43 21" stroke="white" stroke-width="3.92857" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 271 B |
@@ -70,6 +70,10 @@
|
||||
{{ station.generalInfo.reqLevel >= 2 ? station.generalInfo.reqLevel : 'L' }}
|
||||
</span>
|
||||
|
||||
<span v-else-if="station.generalInfo.abandoned">
|
||||
<img :src="abandonedIcon" alt="non-public" :title="$t('desc.abandoned')" />
|
||||
</span>
|
||||
|
||||
<span v-else-if="station.generalInfo.nonPublic">
|
||||
<img :src="lockIcon" alt="non-public" :title="$t('desc.non-public')" />
|
||||
</span>
|
||||
@@ -87,7 +91,9 @@
|
||||
<td class="station_status">
|
||||
<span class="status-badge" :class="station.onlineInfo.statusID" v-if="station.onlineInfo">
|
||||
{{ $t(`status.${station.onlineInfo.statusID}`) }}
|
||||
{{ station.onlineInfo.statusID == 'online' ? timestampToString(station.onlineInfo.statusTimestamp) : '' }}
|
||||
{{
|
||||
station.onlineInfo.statusID == 'online' ? timestampToString(station.onlineInfo.statusTimestamp) : ''
|
||||
}}
|
||||
</span>
|
||||
|
||||
<span class="status-badge free" v-else>
|
||||
@@ -100,21 +106,20 @@
|
||||
</td>
|
||||
|
||||
<td class="station_dispatcher-exp">
|
||||
<span
|
||||
v-if="station.onlineInfo"
|
||||
:style="calculateExpStyle(station.onlineInfo.dispatcherExp)"
|
||||
>
|
||||
<span v-if="station.onlineInfo" :style="calculateExpStyle(station.onlineInfo.dispatcherExp)">
|
||||
{{ 2 > station.onlineInfo.dispatcherExp ? 'L' : station.onlineInfo.dispatcherExp }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="station_tracks twoway">
|
||||
<span
|
||||
v-if="station.generalInfo && station.generalInfo.routes.twoWayCatenaryRouteNames.length > 0"
|
||||
v-if="station.generalInfo && station.generalInfo.routes.twoWayCatenaryRouteNames.length > 0"
|
||||
class="track catenary"
|
||||
:title="`Liczba zelektryfikowanych szlaków dwutorowych: ${station.generalInfo.routes.twoWayCatenaryRouteNames.length }`"
|
||||
:title="
|
||||
`Liczba zelektryfikowanych szlaków dwutorowych: ${station.generalInfo.routes.twoWayCatenaryRouteNames.length}`
|
||||
"
|
||||
>
|
||||
{{ station.generalInfo.routes.twoWayCatenaryRouteNames.length }}
|
||||
{{ station.generalInfo.routes.twoWayCatenaryRouteNames.length }}
|
||||
</span>
|
||||
|
||||
<span
|
||||
@@ -263,6 +268,8 @@ export default defineComponent({
|
||||
lockIcon: require('@/assets/icon-lock.svg'),
|
||||
unavailableIcon: require('@/assets/icon-unavailable.svg'),
|
||||
unknownIcon: require('@/assets/icon-unknown.svg'),
|
||||
abandonedIcon: require('@/assets/icon-abandoned.svg'),
|
||||
|
||||
|
||||
ascIcon: require('@/assets/icon-arrow-asc.svg'),
|
||||
descIcon: require('@/assets/icon-arrow-desc.svg'),
|
||||
@@ -271,7 +278,7 @@ export default defineComponent({
|
||||
|
||||
headIconsIds: ['user', 'spawn', 'timetable'],
|
||||
|
||||
lastSelectedStationName: ""
|
||||
lastSelectedStationName: '',
|
||||
}),
|
||||
|
||||
setup() {
|
||||
@@ -342,7 +349,6 @@ section.station_table {
|
||||
|
||||
.table_wrapper {
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
|
||||
table {
|
||||
@@ -350,8 +356,6 @@ table {
|
||||
border-collapse: collapse;
|
||||
min-width: 1350px;
|
||||
|
||||
|
||||
|
||||
thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
|
||||
@@ -47,7 +47,14 @@
|
||||
"value": false,
|
||||
"defaultValue": false
|
||||
},
|
||||
|
||||
{
|
||||
"id": "abandoned",
|
||||
"name": "abandoned",
|
||||
"iconName": "user",
|
||||
"section": "access",
|
||||
"value": false,
|
||||
"defaultValue": false
|
||||
},
|
||||
{
|
||||
"id": "SPK",
|
||||
"name": "SPK",
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
"non-public": "This scenery is not public",
|
||||
"unknown": "This scenery isn't recognizable right now",
|
||||
"unavailable": "This scenery is unavailable",
|
||||
"abandoned": "This scenery is no longer supported by its creators",
|
||||
"real": "Scenery with real lines: "
|
||||
},
|
||||
"signals": {
|
||||
@@ -76,6 +77,7 @@
|
||||
"fictional": "FICTIONAL",
|
||||
"unavailable": "UNSUPPORTED",
|
||||
"non-public": "NON-PUBLIC",
|
||||
"abandoned": "ABANDONED",
|
||||
|
||||
"SPK": "SPK",
|
||||
"SCS": "SCS",
|
||||
|
||||
+3
-1
@@ -29,7 +29,8 @@
|
||||
"non-public": "Sceneria niepubliczna",
|
||||
"unavailable": "Sceneria niedostępna",
|
||||
"unknown": "Nieznana sceneria",
|
||||
"real": "Sceneria z realnymi liniami kolejowymi: "
|
||||
"real": "Sceneria z realnymi liniami kolejowymi: ",
|
||||
"abandoned": "Sceneria wycofana z rozgrywki"
|
||||
},
|
||||
"signals": {
|
||||
"współczesna": "współczesna",
|
||||
@@ -77,6 +78,7 @@
|
||||
"fictional": "FIKCYJNA",
|
||||
"unavailable": "NIEDOSTĘPNA",
|
||||
"non-public": "NIEPUBLICZNA",
|
||||
"abandoned": "WYCOFANA",
|
||||
|
||||
"SPK": "SPK",
|
||||
"SCS": "SCS",
|
||||
|
||||
@@ -28,6 +28,7 @@ export default interface Filter {
|
||||
occupied: boolean;
|
||||
nonPublic: boolean;
|
||||
unavailable: boolean;
|
||||
abandoned: boolean;
|
||||
|
||||
endingStatus: boolean;
|
||||
afkStatus: boolean;
|
||||
|
||||
@@ -22,6 +22,7 @@ export default interface Station {
|
||||
default: boolean;
|
||||
nonPublic: boolean;
|
||||
unavailable: boolean;
|
||||
abandoned?: boolean;
|
||||
|
||||
routes: StationRoutes;
|
||||
|
||||
|
||||
@@ -74,19 +74,22 @@ const filterStations = (station: Station, filters: Filter) => {
|
||||
|
||||
if (station.onlineInfo && filters['occupied']) return returnMode;
|
||||
if (!station.onlineInfo && filters['free']) return returnMode;
|
||||
if (station.generalInfo?.unavailable && filters['unavailable']) return returnMode;
|
||||
if (station.generalInfo?.unavailable && filters['unavailable'] && !station.onlineInfo) return returnMode;
|
||||
|
||||
if (station.generalInfo) {
|
||||
const routes = station.generalInfo.routes;
|
||||
|
||||
if (filters['abandoned'] && station.generalInfo.abandoned) return returnMode;
|
||||
|
||||
if (station.generalInfo.default && filters['default']) return returnMode;
|
||||
if (!station.generalInfo.default && filters['notDefault']) return returnMode;
|
||||
if (!station.generalInfo.default && filters['notDefault'] && (!station.generalInfo.abandoned && !station.generalInfo.unavailable)) return returnMode;
|
||||
|
||||
if (filters['real'] && station.generalInfo.lines != '') return returnMode;
|
||||
if (filters['fictional'] && station.generalInfo.lines == '') return returnMode;
|
||||
if (filters['fictional'] && station.generalInfo.lines == '' && (!station.generalInfo.abandoned && !station.generalInfo.unavailable)) return returnMode;
|
||||
|
||||
if (station.generalInfo.reqLevel + ((station.generalInfo.nonPublic || station.generalInfo.unavailable) ? 1 : 0) < filters['minLevel']) return returnMode;
|
||||
if (station.generalInfo.reqLevel + ((station.generalInfo.nonPublic || station.generalInfo.unavailable) ? 1 : 0) > filters['maxLevel']) return returnMode;
|
||||
|
||||
if (station.generalInfo.reqLevel + ((station.generalInfo.nonPublic || station.generalInfo.unavailable || station.generalInfo.abandoned) ? 1 : 0) < filters['minLevel']) return returnMode;
|
||||
if (station.generalInfo.reqLevel + ((station.generalInfo.nonPublic || station.generalInfo.unavailable || station.generalInfo.abandoned) ? 1 : 0) > filters['maxLevel']) return returnMode;
|
||||
|
||||
if (filters['no-1track'] && (routes.oneWayCatenaryRouteNames.length != 0 || routes.oneWayNoCatenaryRouteNames.length != 0)) return returnMode;
|
||||
if (filters['no-2track'] && (routes.twoWayCatenaryRouteNames.length != 0 || routes.twoWayNoCatenaryRouteNames.length != 0)) return returnMode;
|
||||
@@ -148,6 +151,7 @@ export default class StationFilterManager {
|
||||
ending: false,
|
||||
nonPublic: false,
|
||||
unavailable: true,
|
||||
abandoned: true,
|
||||
afkStatus: false,
|
||||
endingStatus: false,
|
||||
noSpaceStatus: false,
|
||||
|
||||
Reference in New Issue
Block a user