From 57bb48c030c50bf9a4aea3d50d63b2fd6dd5c610 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 6 Jul 2020 15:57:44 +0200 Subject: [PATCH] =?UTF-8?q?Zmieniono=20po=C5=82o=C5=BCenie=20filtr=C3=B3w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 6 + package.json | 3 +- src/App.vue | 15 +-- src/components/states/Error.vue | 2 + src/components/states/Loading.vue | 2 + src/components/ui/List.vue | 16 +-- src/components/ui/Options.vue | 51 ++++++-- src/components/utils/ListFilter.vue | 176 ++++++++++++++++------------ src/data/stations.json | 3 +- src/store/index.ts | 50 +++----- src/views/Home.vue | 5 +- 11 files changed, 195 insertions(+), 134 deletions(-) diff --git a/package-lock.json b/package-lock.json index 92851f4..253db63 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10157,6 +10157,12 @@ "resolved": "https://registry.npmjs.org/vuex/-/vuex-3.5.1.tgz", "integrity": "sha512-w7oJzmHQs0FM9LXodfskhw9wgKBiaB+totOdb8sNzbTB2KDCEEwEs29NzBZFh/lmEK1t5tDmM1vtsO7ubG1DFw==" }, + "vuex-module-decorators": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/vuex-module-decorators/-/vuex-module-decorators-0.17.0.tgz", + "integrity": "sha512-EFzrR3oyRMTHwpIgYzhW0BVKD71+FBs2U5Mn/ZQwlsaPyROZexDXTZTSYOYeuwg0kqQsK/YBkG4sQ8B4jmVMPg==", + "dev": true + }, "watchpack": { "version": "1.7.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz", diff --git a/package.json b/package.json index d7aab4c..649f437 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,8 @@ "sass": "^1.26.5", "sass-loader": "^8.0.2", "typescript": "~3.9.3", - "vue-template-compiler": "^2.6.11" + "vue-template-compiler": "^2.6.11", + "vuex-module-decorators": "^0.17.0" }, "browserslist": [ "> 1%", diff --git a/src/App.vue b/src/App.vue index 7cf11c2..d9f9ad2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,7 +10,7 @@
- Scenerie online: {{stations.length}} | Maszyniści online: {{ trainCount }} + Scenerie online: {{stationCount}} | Maszyniści online: {{ trainCount }}
@@ -38,7 +38,8 @@ export default Vue.extend({ components: { Error, Loading }, computed: mapGetters({ stations: "getStations", - trainCount: "getTrainCount" + trainCount: "getTrainCount", + stationCount: "getStationCount" }), methods: { @@ -81,6 +82,11 @@ body { min-height: 100vh; } +button, +input { + font-family: "Lato", sans-serif; +} + *, *::before, *::after { @@ -146,11 +152,6 @@ a { padding: 0.3rem; } - - &-main { - display: flex; - justify-content: center; - } } footer { diff --git a/src/components/states/Error.vue b/src/components/states/Error.vue index bca9473..dee8915 100644 --- a/src/components/states/Error.vue +++ b/src/components/states/Error.vue @@ -19,6 +19,8 @@ export default { justify-content: center; align-items: center; + min-height: 100vh; + flex-direction: column; font-size: calc(1rem + 1.5vw); diff --git a/src/components/states/Loading.vue b/src/components/states/Loading.vue index dae5552..922e010 100644 --- a/src/components/states/Loading.vue +++ b/src/components/states/Loading.vue @@ -13,6 +13,8 @@ export default Vue.extend({}); justify-content: center; align-items: center; + min-height: 100vh; + font-size: calc(0.75rem + 1vw); color: #fdc62f; diff --git a/src/components/ui/List.vue b/src/components/ui/List.vue index 1b57f81..c16469a 100644 --- a/src/components/ui/List.vue +++ b/src/components/ui/List.vue @@ -2,8 +2,6 @@
- -
@@ -115,13 +113,11 @@ import Vue from "vue"; import { mapGetters } from "vuex"; import Card from "@/components/ui/Card.vue"; -import Options from "@/components/ui/Options.vue"; export default Vue.extend({ name: "List", components: { - Card, - Options + Card }, data: () => ({ focusedStationName: "" @@ -238,7 +234,7 @@ ul { .list { display: flex; - flex-direction: column; + justify-content: center; } .default-station { @@ -246,8 +242,13 @@ ul { } .table { + &-wrapper { + overflow: auto; + } + display: block; - overflow-y: hidden; + + max-height: 100vh; white-space: nowrap; border-collapse: collapse; @@ -258,6 +259,7 @@ ul { thead th { padding: 0.8rem; background-color: #444; + min-width: 100px; } tr { diff --git a/src/components/ui/Options.vue b/src/components/ui/Options.vue index 7ac61e9..236e7e9 100644 --- a/src/components/ui/Options.vue +++ b/src/components/ui/Options.vue @@ -1,7 +1,11 @@