mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
filtry pociągów
This commit is contained in:
@@ -195,13 +195,17 @@ export default defineComponent({
|
|||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
gap: 0.25em;
|
gap: 0.5em;
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: $accentCol;
|
color: springgreen;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
|
&[data-inactive=true] {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ export const trainFilters: TrainFilter[] = [
|
|||||||
section: TrainFilterSection.TRAIN_TYPE,
|
section: TrainFilterSection.TRAIN_TYPE,
|
||||||
isActive: true,
|
isActive: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: TrainFilterType.common,
|
||||||
|
section: TrainFilterSection.TRAIN_TYPE,
|
||||||
|
isActive: true,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
id: TrainFilterType.passenger,
|
id: TrainFilterType.passenger,
|
||||||
|
|||||||
@@ -116,6 +116,7 @@
|
|||||||
"filter-withComments": "COMMENTS",
|
"filter-withComments": "COMMENTS",
|
||||||
"filter-twr": "HIGH RISK CARGO",
|
"filter-twr": "HIGH RISK CARGO",
|
||||||
"filter-skr": "EXCEEDED GAUGE",
|
"filter-skr": "EXCEEDED GAUGE",
|
||||||
|
"filter-common": "NO WARNINGS",
|
||||||
"filter-passenger": "PASSENGER",
|
"filter-passenger": "PASSENGER",
|
||||||
"filter-freight": "FREIGHT",
|
"filter-freight": "FREIGHT",
|
||||||
"filter-other": "OTHER",
|
"filter-other": "OTHER",
|
||||||
|
|||||||
+3
-2
@@ -117,8 +117,9 @@
|
|||||||
|
|
||||||
"filter-withComments": "UWAGI EKSPLOATACYJNE",
|
"filter-withComments": "UWAGI EKSPLOATACYJNE",
|
||||||
"filter-noComments": "BEZ UWAG",
|
"filter-noComments": "BEZ UWAG",
|
||||||
"filter-twr": "WYSOKIEGO RYZYKA",
|
"filter-twr": "WYS. RYZYKA",
|
||||||
"filter-skr": "PRZEKR. SKRAJNIA",
|
"filter-skr": "SKRAJNIA",
|
||||||
|
"filter-common": "ZWYKŁE",
|
||||||
"filter-passenger": "PASAŻERSKIE",
|
"filter-passenger": "PASAŻERSKIE",
|
||||||
"filter-freight": "TOWAROWE",
|
"filter-freight": "TOWAROWE",
|
||||||
"filter-other": "INNE",
|
"filter-other": "INNE",
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ export const enum TrainFilterType {
|
|||||||
|
|
||||||
twr = 'twr',
|
twr = 'twr',
|
||||||
skr = 'skr',
|
skr = 'skr',
|
||||||
|
common = 'common',
|
||||||
|
|
||||||
passenger = 'passenger',
|
passenger = 'passenger',
|
||||||
freight = 'freight',
|
freight = 'freight',
|
||||||
other = 'other',
|
other = 'other',
|
||||||
|
|||||||
@@ -31,17 +31,20 @@ function filterTrainList(trainList: Train[], searchedTrain: string, searchedDriv
|
|||||||
case TrainFilterType.withTimetable:
|
case TrainFilterType.withTimetable:
|
||||||
return !train.timetableData;
|
return !train.timetableData;
|
||||||
|
|
||||||
case TrainFilterType.noComments:
|
|
||||||
return train.timetableData?.followingStops.some((stop) => stop.comments) || false;
|
|
||||||
|
|
||||||
case TrainFilterType.withComments:
|
case TrainFilterType.withComments:
|
||||||
return train.timetableData?.followingStops.every((stop) => stop.comments) || true;
|
return !train.timetableData?.followingStops.some((stop) => stop.comments);
|
||||||
|
|
||||||
|
case TrainFilterType.noComments:
|
||||||
|
return train.timetableData?.followingStops.some((stop) => stop.comments);
|
||||||
|
|
||||||
case TrainFilterType.twr:
|
case TrainFilterType.twr:
|
||||||
return !train.timetableData?.TWR || true;
|
return !train.timetableData?.TWR;
|
||||||
|
|
||||||
case TrainFilterType.skr:
|
case TrainFilterType.skr:
|
||||||
return !train.timetableData?.SKR || true;
|
return !train.timetableData?.SKR;
|
||||||
|
|
||||||
|
case TrainFilterType.common:
|
||||||
|
return train.timetableData?.SKR || train.timetableData?.TWR;
|
||||||
|
|
||||||
case TrainFilterType.passenger:
|
case TrainFilterType.passenger:
|
||||||
return !/^[AMRE]\D{2}$/.test(train.timetableData?.category || '');
|
return !/^[AMRE]\D{2}$/.test(train.timetableData?.category || '');
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ h1.option-title {
|
|||||||
box-shadow: 0 5px 10px 2px #0f0f0f;
|
box-shadow: 0 5px 10px 2px #0f0f0f;
|
||||||
|
|
||||||
width: 97%;
|
width: 97%;
|
||||||
max-width: 500px;
|
max-width: 550px;
|
||||||
|
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|||||||
@@ -202,10 +202,6 @@ button {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
}
|
}
|
||||||
|
|
||||||
&[data-inactive='true'] {
|
|
||||||
opacity: 0.55;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
button.btn--filled {
|
button.btn--filled {
|
||||||
|
|||||||
Reference in New Issue
Block a user