-
-
+
+
+
+
+
+
+
+ {{stationInfo.stationName}}
+ {{stationInfo.stationName}}
-
-
+
+
+ {{stationInfo.stationHash}}
+
+
+
+
+
+
+
- {{stationInfo.dispatcherExp}}
+
{{stationInfo.stationName}}
- {{stationInfo.stationName}}
+ >{{stationInfo.dispatcherName}}
-
- {{stationInfo.stationHash}}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/components/ui/List.vue b/src/components/ui/List.vue
index 3e6db06..f7dd4fa 100644
--- a/src/components/ui/List.vue
+++ b/src/components/ui/List.vue
@@ -1,12 +1,13 @@
{{stationInfo.dispatcherExp}}
-
+
+
+
-
+
+
+
+ SCENERIA ZAJĘTA DO
+ {{stationInfo.occupiedTo}}
+
+
+
+ OTWARTE SPAWNY
+
+ {{spawn}}
+
+ BRAK
+
+
+
GRACZE NA STACJI
+
-
-
-
-
-
-
- SCENERIA ZAJĘTA DO
- {{stationInfo.occupiedTo}}
-
-
-
- OTWARTE SPAWNY
-
- {{spawn}}
-
- BRAK
-
-
-
GRACZE NA STACJI
-
-
-
- BRAK
+ {{train.trainNo}}
+ |
+ {{train.driverName}}
+
+
+ BRAK
-
-
+
+
+
-
+
| changeSorter(i)">
@@ -15,16 +16,18 @@
{{head[1]}}
- |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{station.stationName}} {{ station.reqLevel ? "| " + (parseInt(station.reqLevel) >= 2 ? station.reqLevel : "L") : "" }} | -+ >{{station.stationName}} | + +{{ station.reqLevel ? (parseInt(station.reqLevel) >= 2 ? station.reqLevel : "L") : "" }} + | + ++ {{station.occupiedTo}} | -{{station.online ? station.dispatcherName : ""}} | -+ | {{station.online ? station.dispatcherName : ""}} | +{{station.dispatcherExp < 2 ? 'L' : station.dispatcherExp}} | {{station.online ? (station.currentUsers + "/" + station.maxUsers) : ""}} | -+ |
|
- + | {{station.routes.twoWay.noCatenary}} | -+ |
({
focusedStationName: "",
+ icons: {
+ ascSVG,
+ descSVG
+ },
sorterActive: { index: 0, type: 1 },
headTitles: [
["Stacja"],
+ ["Wymagany poz.", "dyżurnego"],
["Status"],
["Dyżurny"],
- ["Poziom"],
+ ["Poziom", "dyżurnego"],
["Maszyniści"],
["Informacje", "ogólne"],
["Szlaki", "dwutorowe"],
@@ -157,7 +177,7 @@ export default Vue.extend({
const type: number = this.sorterActive.type;
const sortByName = (a, b) => {
- if (a.stationName > b.stationName) return type;
+ if (a.stationName >= b.stationName) return type;
if (a.stationName < b.stationName) return -type;
};
@@ -169,59 +189,56 @@ export default Vue.extend({
case 1:
sortFun = (a, b) => {
- if (a.occupiedTo > b.occupiedTo) return type;
- if (a.occupiedTo < b.occupiedTo) return -type;
+ if (parseInt(a.reqLevel) > parseInt(b.reqLevel)) return type;
+ if (parseInt(a.reqLevel) < parseInt(b.reqLevel)) return -type;
- sortByName(a, b);
-
- return 0;
+ return sortByName(a, b);
};
break;
case 2:
sortFun = (a, b) => {
- if (a.dispatcherName > b.dispatcherName) return type;
- if (a.dispatcherName < b.dispatcherName) return -type;
+ if (a.statusTimestamp > b.statusTimestamp) return type;
+ if (a.statusTimestamp < b.statusTimestamp) return -type;
- sortByName(a, b);
-
- return 0;
+ return sortByName(a, b);
};
break;
case 3:
sortFun = (a, b) => {
- if (a.dispatcherExp > b.dispatcherExp) return type;
- if (a.dispatcherExp < b.dispatcherExp) return -type;
+ if (a.dispatcherName > b.dispatcherName) return type;
+ if (a.dispatcherName < b.dispatcherName) return -type;
- // TO DO: naprawić bugujące się sortowanie
-
- // sortByName(a, b);
-
- return 0;
+ return sortByName(a, b);
};
break;
case 4:
sortFun = (a, b) => {
- if (a.currentUsers > b.currentUsers) return type;
- if (a.currentUsers < b.currentUsers) return -type;
+ if (a.dispatcherExp > b.dispatcherExp) return type;
+ if (a.dispatcherExp < b.dispatcherExp) return -type;
- sortByName(a, b);
-
- return 0;
+ return sortByName(a, b);
};
break;
case 5:
+ sortFun = (a, b) => {
+ if (a.currentUsers > b.currentUsers) return type;
+ if (a.currentUsers < b.currentUsers) return -type;
+
+ return sortByName(a, b);
+ };
+ break;
+
+ case 6:
sortFun = (a, b) => {
if (a.currentUsers > b.currentUsers) return type;
if (a.currentUsers < b.currentUsers) return -type;
if (a.maxUsers > b.maxUsers) return type;
if (a.maxUsers < b.maxUsers) return -type;
-
- return 0;
};
break;
}
@@ -236,7 +253,7 @@ export default Vue.extend({
},
methods: {
changeSorter(index: number) {
- if (index >= 5) return;
+ if (index > 5) return;
if (index == this.sorterActive.index)
this.sorterActive.type = this.sorterActive.type == 1 ? -1 : 1;
@@ -284,7 +301,8 @@ export default Vue.extend({
},
setFocusedStation(name: string) {
- this.focusedStationName = name;
+ if (this.focusedStationName == name) this.focusedStationName = "";
+ else this.focusedStationName = name;
},
closeCard() {
@@ -298,7 +316,20 @@ export default Vue.extend({
@import "../../styles/variables.scss";
@import "../../styles/responsive.scss";
-.hour {
+.card-anim {
+ &-enter-active,
+ &-leave-active {
+ transition: all 0.25s ease-in-out;
+ }
+
+ &-enter,
+ &-leave-to {
+ transform: translate(-45%, -50%);
+ opacity: 0;
+ }
+}
+
+.status {
padding: 0.4em;
border-radius: 1rem;
font-weight: bold;
@@ -358,16 +389,16 @@ export default Vue.extend({
white-space: nowrap;
border-collapse: collapse;
- font-size: calc(0.6rem + 0.35vw);
+ font-size: calc(0.55rem + 0.35vw);
@include smallScreen() {
font-size: 0.75rem;
}
- th {
+ &-head th {
padding: 0.3rem;
background-color: #444;
- min-width: 150px;
+ min-width: 140px;
cursor: pointer;
user-select: none;
@@ -385,7 +416,7 @@ export default Vue.extend({
}
}
- tr {
+ &-item {
background-color: #5c5b5b;
&:nth-child(even) {
@@ -398,7 +429,7 @@ export default Vue.extend({
background-color: #818181;
}
- td {
+ & > td {
padding: 0.3rem 1rem;
margin: 0 3rem;
text-align: center;
@@ -411,10 +442,14 @@ export default Vue.extend({
padding: 0.1rem 0.5rem;
}
}
+ }
- .dispatcher-exp {
- & > span {
+ .item {
+ &-station-level,
+ &-dispatcher-exp {
+ span {
display: block;
+
width: 2em;
height: 2em;
line-height: 2em;
@@ -422,8 +457,15 @@ export default Vue.extend({
}
}
- .info,
- .tracks {
+ &-station-level {
+ span {
+ background-color: #888;
+ border-radius: 50%;
+ }
+ }
+
+ &-info,
+ &-tracks {
img {
width: 2.2em;
margin: 0 0.2em;
@@ -431,17 +473,19 @@ export default Vue.extend({
}
}
- .no-catenary {
- background-color: #939393;
- }
+ &-tracks {
+ .no-catenary {
+ background-color: #939393;
+ }
- .catenary {
- background-color: #009dce;
- }
+ .catenary {
+ background-color: #009dce;
+ }
- .track {
- margin: 0 0.3rem;
- padding: 0.5em;
+ .track {
+ margin: 0 0.3rem;
+ padding: 0.5em;
+ }
}
}
}
diff --git a/src/components/ui/OptionCard.vue b/src/components/ui/OptionCard.vue
index a68e18e..191ee63 100644
--- a/src/components/ui/OptionCard.vue
+++ b/src/components/ui/OptionCard.vue
@@ -1,57 +1,55 @@
-
-
+
+
- FILTRUJ STACJE
+ FILTRUJ STACJE
-
-
-
-
-
-
- |