From 2c4a727c56a50884c457a10c5f832172a83a9660 Mon Sep 17 00:00:00 2001 From: Spythere Date: Mon, 10 Aug 2020 11:42:23 +0200 Subject: [PATCH] =?UTF-8?q?Ekran=20=C5=82adowania=20dla=20ka=C5=BCdego=20w?= =?UTF-8?q?idoku,=20poprawki=20w=20UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 26 +- src/components/StationsView/Table.vue | 370 +++++++++++++++++++++++ src/components/states/Error.vue | 12 +- src/components/states/Loading.vue | 16 +- src/components/ui/List.vue | 418 -------------------------- src/styles/variables.scss | 2 +- src/views/StationsView.vue | 95 +++++- src/views/TrainsView.vue | 36 ++- 8 files changed, 514 insertions(+), 461 deletions(-) create mode 100644 src/components/StationsView/Table.vue delete mode 100644 src/components/ui/List.vue diff --git a/src/App.vue b/src/App.vue index cce4d64..fc9be59 100644 --- a/src/App.vue +++ b/src/App.vue @@ -28,9 +28,7 @@
- - - + @@ -39,7 +37,6 @@
© Spythere 2020 - Sprawdź, co nowego w Stacjowniku!
@@ -56,12 +53,6 @@ import Loading from "@/components/states/Loading.vue"; import Clock from "@/components/ui/Clock.vue"; import Options from "@/components/ui/Options.vue"; -enum ConnState { - Loading = 0, - Error = 1, - Connected = 2, -} - @Component({ components: { Error, Loading, Clock, Options }, }) @@ -73,15 +64,9 @@ export default class App extends Vue { @Action("initStations") initStations; errorMessage: string = ""; - connectionState: ConnState = ConnState.Loading; mounted() { this.initStations(); - - this.$store.watch( - (state, getters) => getters.getConnectionState, - (state: ConnState) => (this.connectionState = state) - ); } } @@ -93,18 +78,19 @@ export default class App extends Vue { .view-anim { &-enter { - transform: translateX(-10%); - opacity: 0; + // transform: translateX(-5%); + opacity: 0.02; } &-leave-to { - transform: translateX(10%); - opacity: 0; + // transform: translateX(5%); + opacity: 0.02; } &-enter-active, &-leave-active { transition: all $animDuration $animType; + min-height: 100%; } } diff --git a/src/components/StationsView/Table.vue b/src/components/StationsView/Table.vue new file mode 100644 index 0000000..1b54ad3 --- /dev/null +++ b/src/components/StationsView/Table.vue @@ -0,0 +1,370 @@ + + + + + \ No newline at end of file diff --git a/src/components/states/Error.vue b/src/components/states/Error.vue index 764fb22..1276d15 100644 --- a/src/components/states/Error.vue +++ b/src/components/states/Error.vue @@ -9,7 +9,7 @@ @@ -19,10 +19,16 @@ export default { justify-content: center; align-items: center; - min-height: 100%; - flex-direction: column; + position: absolute; + top: 50%; + left: 50%; + + transform: translate(-50%, -50%); + + text-align: center; + font-size: calc(1rem + 1.5vw); font-weight: 550; diff --git a/src/components/states/Loading.vue b/src/components/states/Loading.vue index d30014e..09c1e5d 100644 --- a/src/components/states/Loading.vue +++ b/src/components/states/Loading.vue @@ -1,10 +1,14 @@ \ No newline at end of file diff --git a/src/styles/variables.scss b/src/styles/variables.scss index 49ff8b4..e32458f 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -9,5 +9,5 @@ $warningCol: #ff975b; $accentCol: #ffc014; $accent2Col: #ff3d5d; -$animDuration: 200ms; +$animDuration: 100ms; $animType: ease-out; diff --git a/src/views/StationsView.vue b/src/views/StationsView.vue index 6b4e18e..06355df 100644 --- a/src/views/StationsView.vue +++ b/src/views/StationsView.vue @@ -1,27 +1,108 @@ diff --git a/src/views/TrainsView.vue b/src/views/TrainsView.vue index 6545051..244b311 100644 --- a/src/views/TrainsView.vue +++ b/src/views/TrainsView.vue @@ -1,6 +1,8 @@