@@ -60,10 +77,16 @@
-
+
{{ $t("filters.reset") }}
- {{
+ {{
$t("filters.close")
}}
@@ -301,23 +324,18 @@ $saveCol: #28a826;
.slider {
display: flex;
+ align-items: center;
+
margin: 1em 0;
&-value {
- display: flex;
- justify-content: center;
- align-items: center;
-
color: $accentCol;
- margin-right: 0.3em;
+ margin-right: 0.5em;
padding: 0.1em 0.2em;
-
- border-radius: 0.2em;
}
&-content {
- display: flex;
- align-items: center;
+ flex-grow: 2;
}
&-input {
diff --git a/src/data/options.json b/src/data/options.json
index ddafee2..e9b5d70 100644
--- a/src/data/options.json
+++ b/src/data/options.json
@@ -6,8 +6,7 @@
"iconName": "td2",
"section": "access",
"value": true,
- "defaultValue": true,
- "content": "W PACZCE"
+ "defaultValue": true
},
{
"id": "not-default",
@@ -15,8 +14,7 @@
"iconName": "",
"section": "access",
"value": true,
- "defaultValue": true,
- "content": "POZA PACZKĄ"
+ "defaultValue": true
},
{
"id": "real",
@@ -24,8 +22,7 @@
"iconName": "lock",
"section": "access",
"value": true,
- "defaultValue": true,
- "content": "REALNA"
+ "defaultValue": true
},
{
"id": "fictional",
@@ -33,8 +30,7 @@
"iconName": "user",
"section": "access",
"value": true,
- "defaultValue": true,
- "content": "FIKCYJNA"
+ "defaultValue": true
},
{
@@ -43,8 +39,7 @@
"iconName": "SPK",
"section": "control",
"value": true,
- "defaultValue": true,
- "content": "SPK"
+ "defaultValue": true
},
{
"id": "SCS",
@@ -52,8 +47,7 @@
"iconName": "SCS",
"section": "control",
"value": true,
- "defaultValue": true,
- "content": "SCS"
+ "defaultValue": true
},
{
"id": "SPE",
@@ -61,8 +55,7 @@
"iconName": "SPE",
"section": "control",
"value": true,
- "defaultValue": true,
- "content": "SPE"
+ "defaultValue": true
},
{
"id": "manual",
@@ -70,8 +63,7 @@
"iconName": "ręczne",
"section": "control",
"value": true,
- "defaultValue": true,
- "content": "RĘCZNE"
+ "defaultValue": true
},
{
"id": "mechanical",
@@ -79,8 +71,7 @@
"iconName": "mechaniczne",
"section": "control",
"value": true,
- "defaultValue": true,
- "content": "MECHANICZNE"
+ "defaultValue": true
},
{
@@ -89,8 +80,7 @@
"iconName": "współczesna",
"section": "signals",
"value": true,
- "defaultValue": true,
- "content": "WSPÓŁCZESNA"
+ "defaultValue": true
},
{
"id": "semaphores",
@@ -98,8 +88,7 @@
"iconName": "kształtowa",
"section": "signals",
"value": true,
- "defaultValue": true,
- "content": "KSZTAŁTOWA"
+ "defaultValue": true
},
{
"id": "mixed",
@@ -107,8 +96,7 @@
"iconName": "mieszana",
"section": "signals",
"value": true,
- "defaultValue": true,
- "content": "MIESZANA"
+ "defaultValue": true
},
{
"id": "historical",
@@ -116,8 +104,7 @@
"iconName": "historyczna",
"section": "signals",
"value": true,
- "defaultValue": true,
- "content": "HISTORYCZNA"
+ "defaultValue": true
},
{
@@ -127,8 +114,7 @@
"section": "status",
"value": false,
- "defaultValue": false,
- "content": "WOLNA"
+ "defaultValue": false
},
{
"id": "occupied",
@@ -137,8 +123,7 @@
"section": "status",
"value": true,
- "defaultValue": true,
- "content": "ZAJĘTA"
+ "defaultValue": true
}
],
"sliders": [
@@ -148,8 +133,15 @@
"minRange": 0,
"maxRange": 20,
"value": 0,
- "defaultValue": 0,
- "content": "MINIMALNY WYMAGANY POZIOM DYŻURNEGO"
+ "defaultValue": 0
+ },
+ {
+ "id": "max-lvl",
+ "name": "maxLevel",
+ "minRange": 0,
+ "maxRange": 20,
+ "value": 20,
+ "defaultValue": 20
},
{
"id": "routes-1t-cat",
@@ -157,8 +149,7 @@
"minRange": 0,
"maxRange": 5,
"value": 0,
- "defaultValue": 0,
- "content": "SZLAKI JEDNOTOROWE ZELEKTR. (MINIMUM)"
+ "defaultValue": 0
},
{
"id": "routes-1t-other",
@@ -166,8 +157,7 @@
"minRange": 0,
"maxRange": 5,
"value": 0,
- "defaultValue": 0,
- "content": "SZLAKI JEDNOTOROWE NIEZELEKTR. (MINIMUM)"
+ "defaultValue": 0
},
{
"id": "routes-2t-cat",
@@ -175,8 +165,7 @@
"minRange": 0,
"maxRange": 5,
"value": 0,
- "defaultValue": 0,
- "content": "SZLAKI DWUTOROWE ZELEKTR. (MINIMUM)"
+ "defaultValue": 0
},
{
"id": "routes-2t-other",
@@ -184,8 +173,7 @@
"minRange": 0,
"maxRange": 5,
"value": 0,
- "defaultValue": 0,
- "content": "SZLAKI DWUTOROWE NIEZELEKTR. (MINIMUM)"
+ "defaultValue": 0
}
]
}
diff --git a/src/lang/en.json b/src/lang/en.json
index 9009afa..f892bd7 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -65,11 +65,12 @@
"free": "FREE",
"occupied": "OCCUPIED",
"sliders": {
- "min-lvl": "MINIMUM REQUIRED DISPATCHER LEVEL",
- "routes-1t-cat": "MINIMUM CATENARY SINGLE TRACK ROUTES",
- "routes-1t-other": "MINIMUM OTHER SINGLE TRACK ROUTES",
- "routes-2t-cat": "MINIMUM CATENARY DOUBLE TRACK ROUTES",
- "routes-2t-other": "MINIMUM OTHER DOUBLE TRACK ROUTES"
+ "min-lvl": "MIN. REQUIRED DISPATCHER LEVEL",
+ "max-lvl": "MAX. REQUIRED DISPATCHER LEVEL",
+ "routes-1t-cat": "MIN. CATENARY SINGLE TRACK ROUTES",
+ "routes-1t-other": "MIN. OTHER SINGLE TRACK ROUTES",
+ "routes-2t-cat": "MIN. CATENARY DOUBLE TRACK ROUTES",
+ "routes-2t-other": "MIN. OTHER DOUBLE TRACK ROUTES"
},
"save": "SAVE FILTERS",
"reset": "RESET FILTERS",
diff --git a/src/lang/pl.json b/src/lang/pl.json
index 9a2bf58..90d17e5 100644
--- a/src/lang/pl.json
+++ b/src/lang/pl.json
@@ -65,7 +65,8 @@
"free": "WOLNA",
"occupied": "ZAJĘTA",
"sliders": {
- "min-lvl": "MINIMALNY WYMAGANY POZIOM DYŻURNEGO",
+ "min-lvl": "MIN. WYMAGANY POZIOM DYŻURNEGO",
+ "max-lvl": "MAKS. WYMAGANY POZIOM DYŻURNEGO",
"routes-1t-cat": "SZLAKI JEDNOTOROWE ZELEKTR. (MINIMUM)",
"routes-1t-other": "SZLAKI JEDNOTOROWE NIEZELEKTR. (MINIMUM)",
"routes-2t-cat": "SZLAKI DWUTOROWE ZELEKTR. (MINIMUM)",
diff --git a/src/scripts/interfaces/Filter.ts b/src/scripts/interfaces/Filter.ts
index c50f92e..366eff9 100644
--- a/src/scripts/interfaces/Filter.ts
+++ b/src/scripts/interfaces/Filter.ts
@@ -13,6 +13,7 @@ export default interface Filter {
historyczna: boolean;
mieszana: boolean;
minLevel: number;
+ maxLevel: number;
minOneWayCatenary: number;
minOneWay: number;
minTwoWayCatenary: number;
diff --git a/src/scripts/managers/stationFilterManager.ts b/src/scripts/managers/stationFilterManager.ts
index d531dd8..1b69b7c 100644
--- a/src/scripts/managers/stationFilterManager.ts
+++ b/src/scripts/managers/stationFilterManager.ts
@@ -2,7 +2,6 @@ import Station from '@/scripts/interfaces/Station';
import Filter from '@/scripts/interfaces/Filter';
const sortStations = (a: Station, b: Station, sorter: { index: number; dir: number }) => {
-
switch (sorter.index) {
case 1:
const aLevel = a.reqLevel == "" ? -1 : parseInt(a.reqLevel);
@@ -70,6 +69,7 @@ const filterStations = (station: Station, filters: Filter) => {
if (station.reqLevel == '-1') return true;
if (parseInt(station.reqLevel) < filters['minLevel']) return false;
+ if (parseInt(station.reqLevel) >= filters['maxLevel']) return false;
if (filters['no-1track'] && (station.routes.oneWay.catenary != 0 || station.routes.oneWay.noCatenary != 0)) return false;
if (filters['no-2track'] && (station.routes.twoWay.catenary != 0 || station.routes.twoWay.noCatenary != 0)) return false;
@@ -112,6 +112,7 @@ export default class StationFilterManager {
historyczna: false,
mieszana: false,
minLevel: 0,
+ maxLevel: 20,
minOneWayCatenary: 0,
minOneWay: 0,
minTwoWayCatenary: 0,