From 3febe562bfe750fb8a639abd792d97390811d43e Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 1 Sep 2020 20:49:15 +0200 Subject: [PATCH] =?UTF-8?q?Zmiana=20w=20funkcjonowaniu=20filtr=C3=B3w,=20z?= =?UTF-8?q?miany=20estetyczne?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 61 +++- src/components/App/Error.vue | 46 --- .../{OptionCard.vue => FilterCard.vue} | 142 +++++---- src/components/StationsView/LegendCard.vue | 115 -------- src/components/StationsView/Options.vue | 14 +- src/components/StationsView/StationTable.vue | 269 ++++++++--------- src/data/options.json | 8 +- src/store/modules/stationsModule.ts | 246 +++++----------- src/views/StationsView.vue | 270 ++++++++++++++---- src/views/TrainsView.vue | 11 +- 10 files changed, 562 insertions(+), 620 deletions(-) delete mode 100644 src/components/App/Error.vue rename src/components/StationsView/{OptionCard.vue => FilterCard.vue} (81%) delete mode 100644 src/components/StationsView/LegendCard.vue diff --git a/src/App.vue b/src/App.vue index d3b49f8..8b72651 100644 --- a/src/App.vue +++ b/src/App.vue @@ -38,6 +38,17 @@ + + + +
Pobieranie danych...
+ +
+ Error + Brak odpowiedzi ze strony serwera! +
+
+
@@ -48,16 +59,16 @@ import { Action, Getter } from "vuex-class"; import { mapGetters, mapActions } from "vuex"; -import Error from "@/components/App/Error.vue"; -import Loading from "@/components/App/Loading.vue"; - import Clock from "@/components/App/Clock.vue"; @Component({ - components: { Error, Loading, Clock }, + components: { Clock }, }) export default class App extends Vue { + ErrorIcon = require("@/assets/icon-error.svg"); + @Getter("getOnlineInfo") onlineInfo; + @Getter("getConnectionState") connState; @Action("initStations") initStations; @@ -95,6 +106,48 @@ export default class App extends Vue { } } +.message { + &-anim { + &-enter-active, + &-leave-active { + transition: all $animDuration $animType; + } + + &-enter { + transform: translateY(100%); + } + + &-leave-to { + transform: translateY(0); + } + } + + display: flex; + justify-content: center; + align-items: center; + + position: fixed; + bottom: 0; + + width: 100%; + + font-size: calc(0.5rem + 0.5vw); + padding: 0.5rem; + + img { + width: 1.5em; + margin: 0 0.5em; + } + + &.loading { + background: #cc8b21; + } + + &.error { + background: firebrick; + } +} + .route { margin: 0 0.2em; diff --git a/src/components/App/Error.vue b/src/components/App/Error.vue deleted file mode 100644 index 1276d15..0000000 --- a/src/components/App/Error.vue +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/components/StationsView/OptionCard.vue b/src/components/StationsView/FilterCard.vue similarity index 81% rename from src/components/StationsView/OptionCard.vue rename to src/components/StationsView/FilterCard.vue index 82b1af4..93a1753 100644 --- a/src/components/StationsView/OptionCard.vue +++ b/src/components/StationsView/FilterCard.vue @@ -1,5 +1,5 @@