From aefa6627b48dd113618ebe36e4f06a56d5aa5943 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sat, 23 Apr 2022 15:22:34 +0200 Subject: [PATCH] =?UTF-8?q?Zmiana=20wygl=C4=85du=20widok=C3=B3w=20i=20roz?= =?UTF-8?q?=C5=82o=C5=BCenia=20element=C3=B3w=20na=20stronie=20(1.6.0a)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.scss | 56 +++++++++++ src/App.vue | 18 +++- src/assets/icon-discord.png | Bin 0 -> 1656 bytes src/components/SceneryView/SceneryHistory.vue | 67 +++++++++----- src/components/SceneryView/SceneryInfo.vue | 17 ++-- .../SceneryInfo/SceneryInfoDispatcher.vue | 37 +++++--- .../SceneryInfo/SceneryInfoIcons.vue | 2 +- .../SceneryInfo/SceneryInfoRoutes.vue | 17 ++-- .../SceneryInfo/SceneryInfoSpawnList.vue | 3 +- .../SceneryInfo/SceneryInfoStats.vue | 2 +- .../SceneryInfo/SceneryInfoUserList.vue | 5 +- .../SceneryView/SceneryTimetable.vue | 35 +++++-- src/components/TrainsView/TrainSchedule.vue | 2 +- src/scripts/interfaces/ScheduledTrain.ts | 4 +- src/scripts/utils/storeUtils.ts | 27 +++++- src/store/index.ts | 87 +++--------------- src/store/types.ts | 62 +++++++++++++ src/styles/responsive.scss | 2 +- src/views/SceneryView.vue | 2 +- src/views/StationsView.vue | 25 ----- 20 files changed, 297 insertions(+), 173 deletions(-) create mode 100644 src/assets/icon-discord.png create mode 100644 src/store/types.ts diff --git a/src/App.scss b/src/App.scss index 7764edc..4379496 100644 --- a/src/App.scss +++ b/src/App.scss @@ -132,6 +132,62 @@ font-size: 1.25em; padding: 0.5em; } + + &_badges { + position: absolute; + top: 0; + right: 0; + + .badge { + display: flex; + align-items: center; + justify-content: center; + + font-weight: bold; + padding: 3px 10px; + margin: 0.5em 0; + + span { + margin-left: 0.5em; + } + } + + img { + width: 1.3em; + } + + + @media only screen and (max-width: 850px) { + // display: flex; + // top: 100%; + // right: 1em; + + left: 0; + right: auto; + bottom: 0; + top: auto; + + + .badge { + // margin: 0 0.25em; + + span { + display: none; + } + } + } + } +} + +.badge.paypal { + background-color: white; + color: black; +} + +.badge.discord { + background-color: black; + color: white; + font-size: 0.9em; } // COUNTER diff --git a/src/App.vue b/src/App.vue index 1328e8d..ae81425 100644 --- a/src/App.vue +++ b/src/App.vue @@ -47,7 +47,7 @@
{{ currentRegion.value }} - + icon dispatcher {{ dispatcherCount }} @@ -64,6 +64,20 @@ / {{ $t('app.journal') }} + + + + icon paypal + PAYPAL + + + + icon discord + STACJOWNIK + + +
@@ -151,6 +165,8 @@ export default defineComponent({ en: require('@/assets/icon-en.jpg'), pl: require('@/assets/icon-pl.svg'), error: require('@/assets/icon-error.svg'), + paypal: require('@/assets/icon-paypal.svg'), + discord: require('@/assets/icon-discord.png'), }, }), diff --git a/src/assets/icon-discord.png b/src/assets/icon-discord.png new file mode 100644 index 0000000000000000000000000000000000000000..0ec3dca691e4a6634b578122ed3ef82b0d9f1a3e GIT binary patch literal 1656 zcmV-;28a2HP)%Wfy6o(eNZ40B^8lkAr(1V6s3?>e$fYQlunq4(U)wCgqSsEC1SEH%OcC;(I4l& zee<64=H2&Zp1W@IgJpSl?wothnfrO}frNyFgoK2I|0|=aAynC33TOcOUB|iqFdtY1v;i{_rS}34L=?XRSPEQLw$}|D1-=9hyN)#wQFb&3 zDBHUQctk5$?|XCs*bf|vB46`4kOuAqTJ+x&K##J$y}%CFv3{sjctt}%+1_Gc1M=0g z^aCFO?*m5)yQ>}+6A?#^1I7Tg`tg8%zZbX&oDX=v23P>BLL5HY_xLFAlIvKV<=Rq~ z1C;Hx09%3Ee8oM$>%beXV_nqs>UEttzzkq2(1dx9O9N+tUx6;*JK$)6{I$T7K%MWs zZ-A#<$NI_CCL;$Z+ZzjP){UlgaR%59Y;+y#qO!di$audSF*+3_D*_qB8J__kyN=bR zY;Qd9EbtgP=VpLyzy{Z``br5c=>T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@ @keydown.space="toggleTimeline(i)" tabindex="0" > - {{ timeline.date }} arrow + {{ timeline.date }} + - -
    -
    - - - {{ timestampToString(dispatcher.dispatcherFrom, true) }} - - > - - {{ timestampToString(dispatcher.dispatcherTo, true) }} - - {{ dispatcher.dispatcherName }} -
    -
    -
    + + +
    + {{ dispatcher.dispatcherName }} + + + {{ timestampToString(dispatcher.dispatcherFrom, true) }} + + > + {{ timestampToString(dispatcher.dispatcherTo, true) }} + +
    + +
@@ -87,8 +89,7 @@ export default defineComponent({ isLoaded: false, icons: { - ascArrow: require('@/assets/icon-arrow-asc.svg'), - descArrow: require('@/assets/icon-arrow-desc.svg'), + history: require('@/assets/icon-history.svg'), }, }), props: { @@ -100,7 +101,7 @@ export default defineComponent({ async mounted() { try { - const apiResult: HistoryResultAPI = (await axios.get(`${API_URL}?name=${this.name}&historyCount=100`)).data; + const apiResult: HistoryResultAPI = (await axios.get(`${API_URL}?name=${this.name}&historyCount=100`)).data; if (!apiResult || !apiResult.response) return; this.isLoaded = true; @@ -118,7 +119,7 @@ export default defineComponent({ showTimeline: false, }; - timelineDay.dispatchers.push(dispatcher); + timelineDay.dispatchers.unshift(dispatcher); if (!acc.find((timeline) => timeline.date == dateStr)) acc.push(timelineDay); @@ -202,6 +203,20 @@ export default defineComponent({ padding-top: 1em; } +.history-title { + display: flex; + justify-content: center; + + margin-bottom: 0.5em; + font-size: 1.2em; + + img { + margin-right: 0.5em; + width: 1.3em; + } +} + + ul { height: 600px; overflow-y: scroll; @@ -218,12 +233,15 @@ li { justify-content: center; align-items: center; - background: #444; + background: #2a2a2a; padding: 0.5em; margin: 0 auto 0.5em auto; max-width: 700px; + position: sticky; + top: 0; + img { width: 1.3em; vertical-align: middle; @@ -246,13 +264,12 @@ li { margin: 0.5em auto; background-color: #444; - border-radius: 0.5em; display: grid; grid-template-columns: repeat(2, 1fr); width: 90%; - max-width: 400px; + max-width: 600px; } } diff --git a/src/components/SceneryView/SceneryInfo.vue b/src/components/SceneryView/SceneryInfo.vue index c4b2b5e..c614d50 100644 --- a/src/components/SceneryView/SceneryInfo.vue +++ b/src/components/SceneryView/SceneryInfo.vue @@ -2,7 +2,7 @@
- + @@ -32,7 +32,7 @@ import SceneryInfoIcons from './SceneryInfo/SceneryInfoIcons.vue'; import SceneryInfoStats from './SceneryInfo/SceneryInfoStats.vue'; import SceneryInfoUserList from './SceneryInfo/SceneryInfoUserList.vue'; import SceneryInfoSpawnList from './SceneryInfo/SceneryInfoSpawnList.vue'; -import SceneryInfoRoutes from "./SceneryInfo/SceneryInfoRoutes.vue"; +import SceneryInfoRoutes from './SceneryInfo/SceneryInfoRoutes.vue'; import Station from '@/scripts/interfaces/Station'; @@ -43,7 +43,7 @@ export default defineComponent({ SceneryInfoStats, SceneryInfoUserList, SceneryInfoSpawnList, - SceneryInfoRoutes + SceneryInfoRoutes, }, props: { station: { @@ -51,11 +51,11 @@ export default defineComponent({ default: {}, }, - timetableOnly: Boolean + timetableOnly: Boolean, }, data: () => ({ - onlineFrom: -1 + onlineFrom: -1, }), }); @@ -80,10 +80,9 @@ h3.section-header { } .info-lists { - display: flex; - - align-items: center; - flex-direction: column; + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 550px)); + justify-content: center; } .badge { diff --git a/src/components/SceneryView/SceneryInfo/SceneryInfoDispatcher.vue b/src/components/SceneryView/SceneryInfo/SceneryInfoDispatcher.vue index a8aeaaf..90aca72 100644 --- a/src/components/SceneryView/SceneryInfo/SceneryInfoDispatcher.vue +++ b/src/components/SceneryView/SceneryInfo/SceneryInfoDispatcher.vue @@ -1,23 +1,25 @@