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