@@ -190,8 +192,11 @@ export default Vue.extend({
position: absolute;
top: 0;
right: 0;
- padding: 1rem;
- font-size: calc(1rem + 0.7vw);
+ margin: 0.8em;
+
+ img {
+ width: 1.3em;
+ }
cursor: pointer;
}
diff --git a/src/components/ui/Clock.vue b/src/components/ui/Clock.vue
new file mode 100644
index 0000000..c61213b
--- /dev/null
+++ b/src/components/ui/Clock.vue
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/ui/Options.vue b/src/components/ui/Options.vue
index 86f97e9..a7edf9c 100644
--- a/src/components/ui/Options.vue
+++ b/src/components/ui/Options.vue
@@ -37,7 +37,7 @@ export default Vue.extend({
}
.button {
- font-size: 0.9em;
+ font-size: 0.75em;
img {
width: 1.3em;
diff --git a/src/components/utils/ListFilter.vue b/src/components/utils/ListFilter.vue
index 6bcd02f..b155917 100644
--- a/src/components/utils/ListFilter.vue
+++ b/src/components/utils/ListFilter.vue
@@ -14,6 +14,7 @@
class="option-input"
type="checkbox"
:name="option.name"
+ :defaultValue="option.defaultValue"
:id="option.id"
v-model="option.value"
@change="handleChange"
@@ -150,8 +151,8 @@ export default Vue.extend({
id: "free",
name: "free",
section: "status",
- value: true,
- defaultValue: true,
+ value: false,
+ defaultValue: false,
content: "WOLNA"
},
{
@@ -189,7 +190,7 @@ export default Vue.extend({
maxRange: 5,
value: 0,
defaultValue: 0,
- content: "MINIMALNA LICZBA SZLAKÓW JEDNOTOROWYCH ZELEKTRYFIKOWANYCH"
+ content: "SZLAKI JEDNOTOROWE ZELEKTR. (MINIMUM)"
},
{
id: "min-oneway-ne",
@@ -198,7 +199,7 @@ export default Vue.extend({
maxRange: 5,
value: 0,
defaultValue: 0,
- content: "MINIMALNA LICZBA SZLAKÓW JEDNOTOROWYCH NIEZELEKTRYFIKOWANYCH"
+ content: "SZLAKI JEDNOTOROWE NIEZELEKTR. (MINIMUM)"
},
{
id: "min-twoway-e",
@@ -207,7 +208,7 @@ export default Vue.extend({
maxRange: 5,
value: 0,
defaultValue: 0,
- content: "MINIMALNA LICZBA SZLAKÓW DWUTOROWYCH ZELEKTRYFIKOWANYCH"
+ content: "SZLAKI DWUTOROWE ZELEKTR. (MINIMUM)"
},
{
id: "min-twoway-ne",
@@ -216,7 +217,7 @@ export default Vue.extend({
maxRange: 5,
value: 0,
defaultValue: 0,
- content: "MINIMALNA LICZBA SZLAKÓW DWUTOROWYCH NIEZELEKTRYFIKOWANYCH"
+ content: "SZLAKI DWUTOROWE NIEELEKTR. (MINIMUM)"
}
]
}),
@@ -224,7 +225,10 @@ export default Vue.extend({
methods: {
...mapActions(["setFilter", "resetFilters"]),
handleChange(e: any) {
- this.setFilter({ filterName: e.target.name, value: !e.target.checked });
+ this.setFilter({
+ filterName: e.target.name,
+ value: !e.target.checked
+ });
},
handleInput(e: any) {
this.setFilter({
@@ -429,7 +433,7 @@ export default Vue.extend({
display: flex;
align-items: center;
- font-size: 0.6em;
+ font-size: 0.75em;
}
&-input {
diff --git a/src/data/stations.json b/src/data/stations.json
index 5282d0a..77f4a63 100644
--- a/src/data/stations.json
+++ b/src/data/stations.json
@@ -1647,5 +1647,28 @@
},
"default": false,
"nonPublic": false
+ },
+ {
+ "stationName": "Sulechów",
+ "stationURL": "https://td2.info.pl/scenerie/sulechow/",
+ "stationLines": "358,379",
+ "reqLevel": "0",
+ "supportersOnly": "NIE",
+ "signalType": "mieszana",
+ "controlType": "SPK",
+ "SBL": "",
+ "twoWayBlock": "",
+ "routes": {
+ "oneWay": {
+ "catenary": 2,
+ "noCatenary": 1
+ },
+ "twoWay": {
+ "catenary": 0,
+ "noCatenary": 0
+ }
+ },
+ "default": false,
+ "nonPublic": false
}
]
\ No newline at end of file
diff --git a/src/store/modules/store.ts b/src/store/modules/store.ts
index a0b10d2..83ce063 100644
--- a/src/store/modules/store.ts
+++ b/src/store/modules/store.ts
@@ -50,7 +50,7 @@ class Store extends VuexModule {
"minTwoWay": 0,
"no-1track": false,
"no-2track": false,
- "free": false,
+ "free": true,
"occupied": false,
"ending": false
} as const;
@@ -182,7 +182,7 @@ class Store extends VuexModule {
})
this.context.commit('updateStations', mappedStations);
- this.context.commit('setStationCount');
+ this.context.commit('setStationCount', mappedStations.length);
this.context.commit('filterStations');
}
@@ -192,9 +192,9 @@ class Store extends VuexModule {
if ((station.nonPublic || !station.reqLevel) && this.filters['nonPublic']) return false;
if (!station.reqLevel) return true;
+ if (station.online && station.occupiedTo == "KOŃCZY" && this.filters['ending']) return false;
if (station.online && this.filters['occupied']) return false;
if (!station.online && this.filters['free']) return false;
- if (station.online && station.occupiedTo == "KOŃCZY" && this.filters['ending']) return false;
if (station.default && this.filters['default']) return false;
if (!station.default && this.filters['notDefault']) return false;
@@ -249,7 +249,7 @@ class Store extends VuexModule {
}
@Mutation
- private updateStations(updatedStations: []) {
+ private updateStations(updatedStations: any) {
for (let i = 0; i < this.stations.length; i++) {
const toUpdate: any = updatedStations.find((updated: any) => updated.stationName === this.stations[i].stationName);
@@ -261,7 +261,19 @@ class Store extends VuexModule {
this.stations[i] = { ...this.stations[i], ...toUpdate }
this.stations[i].online = true;
+
+ updatedStations = updatedStations.filter((updated: any) => updated.stationName !== this.stations[i].stationName);
+
}
+
+ // Dodawanie do listy online potencjalnych scenerii niewpisanych do bazy
+ updatedStations.forEach((updated: any) => {
+ const toUpdate: any = this.stations.find(station => station.stationName === updated.stationName);
+
+ if (!toUpdate) {
+ this.stations.push({ ...updated, online: true });
+ }
+ })
}
@Mutation
@@ -270,8 +282,8 @@ class Store extends VuexModule {
}
@Mutation
- private setStationCount() {
- this.stationCount = this.stations.filter(station => station.online).length;
+ private setStationCount(count: number) {
+ this.stationCount = count;
}
@Mutation
diff --git a/src/views/Home.vue b/src/views/Home.vue
index 2024f2f..3c7a6b5 100644
--- a/src/views/Home.vue
+++ b/src/views/Home.vue
@@ -21,5 +21,7 @@ export default class Home extends Vue {