From a224b58d1707f980c2760e3e4a5e0a89e63f4576 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 26 Nov 2023 19:49:32 +0100 Subject: [PATCH 1/7] 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({ diff --git a/src/components/Global/Donation.vue b/src/components/Global/Donation.vue index 175b5fc..dfd5918 100644 --- a/src/components/Global/Donation.vue +++ b/src/components/Global/Donation.vue @@ -141,7 +141,7 @@ export default defineComponent({ display: grid; grid-template-rows: 1fr auto; gap: 1em; - max-height: 95vh; + font-size: 1.1em; & > div { @@ -172,8 +172,12 @@ export default defineComponent({ } .modal_actions { - display: flex; - justify-content: flex-end; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(13em, 1fr)); gap: 0.5em; + + form button { + width: 100%; + } } diff --git a/src/components/StationsView/StationTable.vue b/src/components/StationsView/StationTable.vue index 8fd5fb4..8f8bc8e 100644 --- a/src/components/StationsView/StationTable.vue +++ b/src/components/StationsView/StationTable.vue @@ -389,18 +389,16 @@ $rowCol: #424242; } } -section.station_table { - overflow: auto; - overflow-y: hidden; - font-weight: 500; -} - table { white-space: nowrap; border-collapse: collapse; // min-width: 1350px; width: 100%; + overflow: auto; + overflow-y: hidden; + font-weight: 500; + @include smallScreen() { min-width: auto; } From 647055d2f09bc35ac3564a8f8f3bbd450c3adf67 Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 28 Nov 2023 18:33:40 +0100 Subject: [PATCH 4/7] =?UTF-8?q?ikona=20donatora=20w=20zak=C5=82adce=20Poci?= =?UTF-8?q?=C4=85gi;=20poprawki=20t=C5=82umacze=C5=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Global/Donation.vue | 5 ++-- src/components/StationsView/StationTable.vue | 5 ++-- src/components/TrainsView/TrainInfo.vue | 24 +++++++++++++++++++- src/locales/en.json | 2 +- src/locales/pl.json | 2 +- src/store/mainStore.ts | 2 +- 6 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/components/Global/Donation.vue b/src/components/Global/Donation.vue index dfd5918..90d3317 100644 --- a/src/components/Global/Donation.vue +++ b/src/components/Global/Donation.vue @@ -38,7 +38,7 @@

@@ -164,6 +164,7 @@ export default defineComponent({ .modal_main { overflow: auto; + img { max-height: 20px; margin-right: 5px; diff --git a/src/components/StationsView/StationTable.vue b/src/components/StationsView/StationTable.vue index 8f8bc8e..34e9b93 100644 --- a/src/components/StationsView/StationTable.vue +++ b/src/components/StationsView/StationTable.vue @@ -110,15 +110,14 @@ -
{{ station.onlineInfo.dispatcherName }} -
+
{{ station.onlineInfo.dispatcherName }} diff --git a/src/components/TrainsView/TrainInfo.vue b/src/components/TrainsView/TrainInfo.vue index 8e3c7f2..8b3a575 100644 --- a/src/components/TrainsView/TrainInfo.vue +++ b/src/components/TrainsView/TrainInfo.vue @@ -32,7 +32,17 @@ > {{ train.driverLevel < 2 ? 'L' : `${train.driverLevel}` }} - {{ train.driverName }} + +
+ + {{ train.driverName }} + donator diamond icon + + {{ train.driverName }} +
@@ -114,6 +124,7 @@ import trainInfoMixin from '../../mixins/trainInfoMixin'; import Train from '../../scripts/interfaces/Train'; import ProgressBar from '../Global/ProgressBar.vue'; import TrainThumbnail from '../Global/TrainThumbnail.vue'; +import { useStore } from '../../store/mainStore'; export default defineComponent({ mixins: [trainInfoMixin, styleMixin], @@ -128,6 +139,12 @@ export default defineComponent({ type: Boolean, default: true } + }, + + data() { + return { + store: useStore() + }; } }); @@ -171,6 +188,11 @@ export default defineComponent({ gap: 0.5em; } +.train-driver img { + max-height: 20px; + vertical-align: text-bottom; +} + .timetable-id { color: #d2d2d2; } diff --git a/src/locales/en.json b/src/locales/en.json index c685b53..0d739be 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -12,7 +12,7 @@ "p4": "Every person who decides to contribute at least {b1} for the development of Stacjownik, will recieve (upon a personal request) {img}{b2} of username in the \"Sceneries\" and \"Trains\" tabs of the application, as well as on my Discord server (after verifying the payment author, preferably by providing the username directly with the payment).", "p4-b1": "5 PLN", "p4-b2": "a symbolic highlight", - "p5": "Thank you and enjoy further using my tools!
~Spythere", + "p5": "Thank you and enjoy the app!
~ Spythere", "action-exit": "Maybe next time...", "action-confirm": "DONATE!" }, diff --git a/src/locales/pl.json b/src/locales/pl.json index 26edf6f..98523b1 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -12,7 +12,7 @@ "p4": "Każda osoba, która postanowi przelać co najmniej {b1} na rozwój Stacjownika, otrzyma na życzenie symboliczne {img}{b2} nicku użytkownika w zakładkach \"Scenerie\" i \"Pociągi\" aplikacji i moim serwerze Discord (po zweryfikowaniu autora płatności, najlepiej poprzez podanie nicku bezpośrednio przy niej).", "p4-b1": "5 złotych", "p4-b2": "wyróżnienie", - "p5": "Dzięki i miłego dalszego korzystania z moich narzędzi!
~Spythere", + "p5": "Dzięki i miłego korzystania z aplikacji!
~ Spythere", "action-exit": "Może kiedy indziej...", "action-confirm": "WSPOMÓŻ!" }, diff --git a/src/store/mainStore.ts b/src/store/mainStore.ts index 7b99ed1..cb6a688 100644 --- a/src/store/mainStore.ts +++ b/src/store/mainStore.ts @@ -314,7 +314,7 @@ export const useStore = defineStore('store', { 'https://raw.githubusercontent.com/Spythere/api/main/td2/data/donators.json' ); - if (response.data) this.donatorsData = ['Kryszakos']; + if (response.data) this.donatorsData = response.data; } catch (error) { console.error('Ups! Wystąpił błąd podczas pobierania informacji o donatorach:', error); } From 5d5ad44508e9150906d3a4cc926349e96c51e9fc Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 28 Nov 2023 18:35:41 +0100 Subject: [PATCH 5/7] =?UTF-8?q?wielko=C5=9B=C4=87=20czcionki?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/JournalView/JournalDispatchersList.vue | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/components/JournalView/JournalDispatchersList.vue b/src/components/JournalView/JournalDispatchersList.vue index 894d7ae..2051229 100644 --- a/src/components/JournalView/JournalDispatchersList.vue +++ b/src/components/JournalView/JournalDispatchersList.vue @@ -235,10 +235,6 @@ table.scenery-history-table { margin: 0 auto; } } - - @media screen and (max-width: 550px) { - font-size: 0.9em; - } } .text { From de8facfb054b4fc4b1d208d8fbd05baadff1f395 Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 28 Nov 2023 18:36:37 +0100 Subject: [PATCH 6/7] bump: 1.18.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a1b275d..6a7262f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stacjownik", - "version": "1.18.4", + "version": "1.18.5", "private": true, "scripts": { "dev": "vite", From 916f19df72beb60fa65ebba5d01e9fa21dde3e49 Mon Sep 17 00:00:00 2001 From: Spythere Date: Tue, 28 Nov 2023 18:38:42 +0100 Subject: [PATCH 7/7] =?UTF-8?q?poprawki=20t=C5=82umaczenia=20en?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index 0d739be..9e43412 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -9,7 +9,7 @@ "p2-b3": "Stacjobot (Stacjownik bot)", "p2-a1": "Discord server", "p3": "If you have the means and would like to support my work, I would be grateful for any financial assistance that could help cover at least some of the server costs and further enhance the capabilities of the application!", - "p4": "Every person who decides to contribute at least {b1} for the development of Stacjownik, will recieve (upon a personal request) {img}{b2} of username in the \"Sceneries\" and \"Trains\" tabs of the application, as well as on my Discord server (after verifying the payment author, preferably by providing the username directly with the payment).", + "p4": "Every person who decides to contribute at least {b1} for the development of Stacjownik, will receive (upon a personal request) {img}{b2} of username in the \"Sceneries\" and \"Trains\" tabs of the application, as well as on my Discord server (after verifying the payment author, preferably by providing the username directly with the payment).", "p4-b1": "5 PLN", "p4-b2": "a symbolic highlight", "p5": "Thank you and enjoy the app!
~ Spythere",