From a224b58d1707f980c2760e3e4a5e0a89e63f4576 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 26 Nov 2023 19:49:32 +0100 Subject: [PATCH] feature: modal darowizn --- public/images/icon-diamond.svg | 18 + public/images/icon-dolar.svg | 1 - public/images/icon-dollar.svg | 4 +- public/images/main-logo.svg | 48 ++ src/App.scss | 30 +- src/components/Global/AnimatedModal.vue | 83 +++ src/components/Global/Donation.vue | 179 +++++++ src/components/Global/TrainModal.vue | 11 - .../SceneryView/SceneryTimetable.vue | 6 +- .../StationsView/StationFilterCard.vue | 14 +- src/components/StationsView/StationTable.vue | 501 +++++++++--------- src/locales/en.json | 17 + src/locales/pl.json | 17 + src/scripts/utils/apiURLs.ts | 2 +- src/store/mainStore.ts | 27 +- src/store/typings.ts | 12 +- src/styles/animations.scss | 53 +- src/styles/global.scss | 43 +- src/styles/variables.scss | 3 - src/typings/api.ts | 4 + src/views/StationsView.vue | 48 +- vite.config.ts | 8 +- 22 files changed, 756 insertions(+), 373 deletions(-) create mode 100644 public/images/icon-diamond.svg delete mode 100644 public/images/icon-dolar.svg create mode 100644 public/images/main-logo.svg create mode 100644 src/components/Global/AnimatedModal.vue create mode 100644 src/components/Global/Donation.vue diff --git a/public/images/icon-diamond.svg b/public/images/icon-diamond.svg new file mode 100644 index 0000000..6d11898 --- /dev/null +++ b/public/images/icon-diamond.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/public/images/icon-dolar.svg b/public/images/icon-dolar.svg deleted file mode 100644 index 6a3c591..0000000 --- a/public/images/icon-dolar.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/images/icon-dollar.svg b/public/images/icon-dollar.svg index cdce7d6..6a3c591 100644 --- a/public/images/icon-dollar.svg +++ b/public/images/icon-dollar.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file diff --git a/public/images/main-logo.svg b/public/images/main-logo.svg new file mode 100644 index 0000000..17377a7 --- /dev/null +++ b/public/images/main-logo.svg @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/App.scss b/src/App.scss index f97f853..8acd474 100644 --- a/src/App.scss +++ b/src/App.scss @@ -1,33 +1,7 @@ @import './styles/responsive.scss'; @import './styles/variables.scss'; @import './styles/global.scss'; - -// VUE ROUTE CHANGE ANIMATION -.view-anim { - &-enter-from, - &-leave-to { - opacity: 0.02; - } - - &-enter-active, - &-leave-active { - transition: all $animDuration $animType; - min-height: 100%; - } -} - -.modal-anim { - &-enter-active, - &-leave-active { - transition: all $animDuration $animType; - } - - &-enter-from, - &-leave-to { - transform: translateY(-25%); - opacity: 0; - } -} +@import './styles/animations.scss'; .route { margin: 0 0.2em; @@ -56,8 +30,6 @@ // CONTAINER .app_container { - // display: flex; - // flex-flow: column; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: 100%; diff --git a/src/components/Global/AnimatedModal.vue b/src/components/Global/AnimatedModal.vue new file mode 100644 index 0000000..f59c426 --- /dev/null +++ b/src/components/Global/AnimatedModal.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/src/components/Global/Donation.vue b/src/components/Global/Donation.vue new file mode 100644 index 0000000..175b5fc --- /dev/null +++ b/src/components/Global/Donation.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/src/components/Global/TrainModal.vue b/src/components/Global/TrainModal.vue index 3ae2871..d05857a 100644 --- a/src/components/Global/TrainModal.vue +++ b/src/components/Global/TrainModal.vue @@ -35,17 +35,6 @@ export default defineComponent({ this.$nextTick(() => { contentEl.focus(); }); - }, - - methods: { - handleContentScroll(e: Event) { - const trainInfoCompHeight: number = ( - this.$refs['trainInfo'] as any - ).$el.getBoundingClientRect().height; - - const posTop = (e.target as HTMLElement).scrollTop; - this.isTopBarVisible = posTop > trainInfoCompHeight; - } } }); diff --git a/src/components/SceneryView/SceneryTimetable.vue b/src/components/SceneryView/SceneryTimetable.vue index b6d97d5..1c05dd1 100644 --- a/src/components/SceneryView/SceneryTimetable.vue +++ b/src/components/SceneryView/SceneryTimetable.vue @@ -85,9 +85,11 @@ {{ scheduledTrain.category }} {{ scheduledTrain.trainNo }} - + -  |  diff --git a/src/components/StationsView/StationFilterCard.vue b/src/components/StationsView/StationFilterCard.vue index 50dc1ef..260119a 100644 --- a/src/components/StationsView/StationFilterCard.vue +++ b/src/components/StationsView/StationFilterCard.vue @@ -295,19 +295,7 @@ export default defineComponent({