Compare commits

..

18 Commits

Author SHA1 Message Date
Spythere d7a609a4f2 Merge pull request #67 from Spythere/development
poprawki tłumaczeń; scrolling
2023-11-28 19:12:57 +01:00
Spythere 763506d5a9 bump: 1.18.6 2023-11-28 19:10:08 +01:00
Spythere 8dbb32b821 dodatkowe tłumaczenia 2023-11-28 19:09:14 +01:00
Spythere b8a21e0f70 Merge pull request #66 from Spythere/development
hotfix: scrollowanie tabelki scenerii
2023-11-28 18:58:27 +01:00
Spythere 7c2b5fbd50 hotfix scrollowania 2023-11-28 18:56:02 +01:00
Spythere ac740c2743 Merge pull request #65 from Spythere/development
feature: darowizny + poprawki (wersja 1.18.5)
2023-11-28 18:44:44 +01:00
Spythere 916f19df72 poprawki tłumaczenia en 2023-11-28 18:38:42 +01:00
Spythere de8facfb05 bump: 1.18.5 2023-11-28 18:36:37 +01:00
Spythere 5d5ad44508 wielkość czcionki 2023-11-28 18:35:41 +01:00
Spythere 647055d2f0 ikona donatora w zakładce Pociągi; poprawki tłumaczeń 2023-11-28 18:33:40 +01:00
Spythere 1947555724 poprawki responsywności 2023-11-28 17:56:08 +01:00
Spythere 86417f3422 lock sync 2023-11-26 19:50:04 +01:00
Spythere a224b58d17 feature: modal darowizn 2023-11-26 19:49:32 +01:00
Spythere 69be01fb1e Merge pull request #64 - 1.18.4 fix
poprawki do 1.18.4
2023-11-17 16:55:09 +01:00
Spythere 6ef04f0dbd fix sortowania statusów dr; linting 2023-11-17 16:52:53 +01:00
Spythere 451d90f854 bump: 1.18.4 2023-11-15 21:09:30 +01:00
Spythere b01d3e894b Merge pull request #63 from Spythere/development
hotfix: statusy dr
2023-11-15 21:07:28 +01:00
Spythere 13dc6a0e32 hotfix: statusy dr 2023-11-15 21:06:16 +01:00
32 changed files with 3773 additions and 3306 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "stacjownik", "name": "stacjownik",
"version": "1.17.1", "version": "1.18.4",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "stacjownik", "name": "stacjownik",
"version": "1.17.1", "version": "1.18.4",
"dependencies": { "dependencies": {
"core-js": "^3.32.2", "core-js": "^3.32.2",
"dotenv": "^16.3.1", "dotenv": "^16.3.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "stacjownik", "name": "stacjownik",
"version": "1.18.3", "version": "1.18.6",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+18
View File
@@ -0,0 +1,18 @@
<svg width="256" height="213" viewBox="0 0 256 213" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_d_1571_41)">
<path d="M217.048 55.9333L238 80.4039L128 194.6L18 80.4039L38.9524 55.9333L71.6905 18.6H128H184.31L217.048 55.9333Z" fill="#F47FFF"/>
<path d="M238 80.4039L217.048 55.9333L184.31 18.6M238 80.4039L128 194.6M238 80.4039H164.536M128 194.6L18 80.4039M128 194.6L91.4641 80.4039M128 194.6L164.536 80.4039M184.31 18.6H128M184.31 18.6L164.536 80.4039M18 80.4039L38.9524 55.9333L71.6905 18.6M18 80.4039H91.4641M71.6905 18.6L91.4641 80.4039M71.6905 18.6H128M91.4641 80.4039H128H164.536M91.4641 80.4039L128 18.6M128 18.6L164.536 80.4039" stroke="#ECECEC" stroke-width="7.45763" stroke-linejoin="round"/>
</g>
<defs>
<filter id="filter0_d_1571_41" x="0.367179" y="0.967155" width="255.266" height="211.266" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="6.952"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0.956863 0 0 0 0 0.498039 0 0 0 0 1 0 0 0 1 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1571_41"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1571_41" result="shape"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18px" height="18px"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z"/></svg>

Before

Width:  |  Height:  |  Size: 582 B

+1 -3
View File
@@ -1,3 +1 @@
<svg width="144" height="144" viewBox="0 0 144 144" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="18px" height="18px"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1.41 16.09V20h-2.67v-1.93c-1.71-.36-3.16-1.46-3.27-3.4h1.96c.1 1.05.82 1.87 2.65 1.87 1.96 0 2.4-.98 2.4-1.59 0-.83-.44-1.61-2.67-2.14-2.48-.6-4.18-1.62-4.18-3.67 0-1.72 1.39-2.84 3.11-3.21V4h2.67v1.95c1.86.45 2.79 1.86 2.85 3.39H14.3c-.05-1.11-.64-1.87-2.22-1.87-1.5 0-2.4.68-2.4 1.64 0 .84.65 1.39 2.67 1.91s4.18 1.39 4.18 3.91c-.01 1.83-1.38 2.83-3.12 3.16z"/></svg>
<path d="M67.4283 9.79351L67.8252 31.2232H79.5983L79.8628 9.79351H67.4283ZM67.8252 110.989L67.4283 132.816H79.8628L79.466 110.989H67.8252ZM91.6359 51.33L103.938 43.7899C102.439 40.527 100.322 37.3963 97.5886 34.3979C94.9429 31.3995 91.5918 28.9303 87.5352 26.9901C83.5667 25.05 78.8046 24.0799 73.2487 24.0799C67.6929 24.0799 62.7103 25.1382 58.3009 27.2547C53.8915 29.3712 50.4081 32.1932 47.8506 35.7207C45.3814 39.2483 44.1467 43.1726 44.1467 47.4938C44.1467 51.9032 44.9404 55.6512 46.5278 58.7378C48.1152 61.8243 50.1435 64.47 52.6128 66.6747C55.082 68.7912 57.6836 70.5549 60.4174 71.9659C63.2394 73.2888 65.7969 74.347 68.0897 75.1407C71.6173 76.4635 74.9243 77.8745 78.0109 79.3737C81.1856 80.8729 83.7431 82.7249 85.6832 84.9296C87.7115 87.0461 88.7257 89.824 88.7257 93.2633C88.7257 95.9089 88.1966 98.2018 87.1383 100.142C86.1683 101.994 84.625 103.405 82.5085 104.375C80.4801 105.345 77.8786 105.83 74.7038 105.83C71.0881 105.83 67.8693 105.08 65.0473 103.581C62.3134 102.082 59.8001 99.9215 57.5072 97.0995C55.2143 94.2775 53.0978 90.8381 51.1577 86.7815L39.12 94.5861C41.0602 99.3483 43.7499 103.581 47.1892 107.285C50.6286 110.989 54.6411 113.943 59.2269 116.148C63.8126 118.265 68.7512 119.323 74.0424 119.323C80.6565 119.323 86.2564 118.265 90.8422 116.148C95.428 113.943 98.9555 110.813 101.425 106.756C103.894 102.699 105.129 97.9814 105.129 92.6019C105.129 88.4571 104.423 84.8414 103.012 81.7548C101.601 78.6682 99.7492 76.0667 97.4563 73.9502C95.1634 71.7455 92.606 69.8935 89.784 68.3943C87.0501 66.8951 84.3604 65.6605 81.7148 64.6904C78.0109 63.2794 74.5275 61.8684 71.2645 60.4574C68.0016 59.0464 65.3559 57.3709 63.3276 55.4307C61.2993 53.4906 60.2851 51.0213 60.2851 48.0229C60.2851 45.7301 60.7261 43.7899 61.6079 42.2025C62.578 40.527 64.0331 39.2483 65.9732 38.3664C68.0016 37.4845 70.559 37.0436 73.6456 37.0436C76.644 37.0436 79.2455 37.705 81.4502 39.0278C83.6549 40.3506 85.5509 42.1144 87.1383 44.319C88.8139 46.4356 90.3131 48.7725 91.6359 51.33Z" fill="white"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 582 B

+48
View File
@@ -0,0 +1,48 @@
<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="512" height="512" rx="256" fill="#121212"/>
<rect x="325.818" y="405.665" width="7.11086" height="143.867" rx="3.55543" transform="rotate(90 325.818 405.665)" fill="white"/>
<rect x="361.785" y="430.553" width="10.6663" height="208.608" rx="5.33314" transform="rotate(90 361.785 430.553)" fill="white"/>
<g filter="url(#filter0_d_272_208)">
<rect width="25.0328" height="117.468" rx="12.5164" transform="matrix(0.711174 0.703016 -0.711174 0.703016 211.54 363)" fill="white"/>
</g>
<g filter="url(#filter1_d_272_208)">
<rect width="25.0328" height="117.468" rx="12.5164" transform="matrix(-0.711174 0.703016 0.711174 0.703016 300.46 363)" fill="white"/>
</g>
<g filter="url(#filter2_d_272_208)">
<rect x="139.352" y="65.4912" width="232.66" height="325.893" rx="41.5866" stroke="#7A7A7A" stroke-width="8.31733"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M135.193 107.078C135.193 81.8134 155.674 61.3325 180.938 61.3325H330.425C355.69 61.3325 376.171 81.8134 376.171 107.078V349.797C376.171 375.062 355.69 395.543 330.426 395.543H180.938C155.674 395.543 135.193 375.062 135.193 349.797V107.078ZM208.217 338.656C208.217 352.401 196.774 363.544 182.659 363.544C168.543 363.544 157.1 352.401 157.1 338.656C157.1 324.91 168.543 313.768 182.659 313.768C196.774 313.768 208.217 324.91 208.217 338.656ZM328.706 363.544C342.821 363.544 354.264 352.401 354.264 338.656C354.264 324.91 342.821 313.768 328.706 313.768C314.591 313.768 303.148 324.91 303.148 338.656C303.148 352.401 314.591 363.544 328.706 363.544ZM248.38 136.323C248.38 132.07 244.932 128.622 240.679 128.622H164.802C160.549 128.622 157.101 132.07 157.101 136.323V203.223C157.101 207.476 160.549 210.924 164.802 210.924H240.679C244.932 210.924 248.38 207.476 248.38 203.223V136.323ZM346.563 128.622C350.817 128.622 354.265 132.07 354.265 136.323V203.223C354.265 207.476 350.817 210.924 346.563 210.924H270.686C266.433 210.924 262.985 207.476 262.985 203.223V136.323C262.985 132.07 266.433 128.622 270.686 128.622H346.563Z" fill="white"/>
<ellipse cx="255.682" cy="64.888" rx="25.5582" ry="24.888" fill="#F3F1F1"/>
</g>
<defs>
<filter id="filter0_d_272_208" x="106.676" y="341.617" width="143.99" height="142.947" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="13.269"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_272_208"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_272_208" result="shape"/>
</filter>
<filter id="filter1_d_272_208" x="261.334" y="341.617" width="143.99" height="142.947" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="13.269"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_272_208"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_272_208" result="shape"/>
</filter>
<filter id="filter2_d_272_208" x="110.241" y="15.048" width="290.882" height="405.446" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset/>
<feGaussianBlur stdDeviation="12.476"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_272_208"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_272_208" result="shape"/>
</filter>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

+1 -29
View File
@@ -1,33 +1,7 @@
@import './styles/responsive.scss'; @import './styles/responsive.scss';
@import './styles/variables.scss'; @import './styles/variables.scss';
@import './styles/global.scss'; @import './styles/global.scss';
@import './styles/animations.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;
}
}
.route { .route {
margin: 0 0.2em; margin: 0 0.2em;
@@ -56,8 +30,6 @@
// CONTAINER // CONTAINER
.app_container { .app_container {
// display: flex;
// flex-flow: column;
display: grid; display: grid;
grid-template-rows: auto 1fr auto; grid-template-rows: auto 1fr auto;
grid-template-columns: 100%; grid-template-columns: 100%;
+101
View File
@@ -0,0 +1,101 @@
<template>
<transition name="modal-anim" tag="div" class="modal">
<div class="body" v-if="isOpen">
<div class="background" @click="toggleModal(false)"></div>
<div class="wrapper" ref="wrapper" tabindex="0">
<slot></slot>
</div>
<div class="tab-exit" ref="exit" tabindex="0" @focus="toggleModal(false)"></div>
</div>
</transition>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { useStore } from '../../store/mainStore';
export default defineComponent({
emits: ['toggleModal'],
props: {
isOpen: Boolean
},
data() {
return {
store: useStore()
};
},
watch: {
isOpen(v) {
this.$nextTick(() => {
if (v) (this.$refs['wrapper'] as HTMLElement).focus();
else (this.store.modalLastClickedTarget as HTMLElement)?.focus();
});
}
},
methods: {
toggleModal(value: boolean) {
this.$emit('toggleModal', value);
}
}
});
</script>
<style lang="scss" scoped>
@import '../../styles/responsive.scss';
.body {
position: fixed;
top: 0;
left: 0;
z-index: 200;
width: 100vw;
height: 100vh;
}
.background {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
cursor: pointer;
background-color: rgba(0, 0, 0, 0.55);
}
.wrapper {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #1a1a1a;
box-shadow: 0 0 15px 10px #333333;
width: 95%;
max-width: 800px;
max-height: 95vh;
& > :slotted(div) {
max-height: 95vh;
}
}
@include smallScreen {
.wrapper {
top: 0;
transform: translate(-50%, 1em);
max-height: 90vh;
& > :slotted(div) {
max-height: 90vh;
}
}
}
</style>
+184
View File
@@ -0,0 +1,184 @@
<template>
<div class="donation-modal" @keydown.esc="toggleModal(false)">
<button
class="modal_button action btn--image"
ref="btn"
@click="toggleModal(true)"
@focus="toggleModal(false)"
>
<img src="/images/icon-dollar.svg" alt="dollar donation icon" />
<span>{{ $t('donations.button-title') }}</span>
</button>
<AnimatedModal :isOpen="isModalOpen" @toggleModal="toggleModal">
<div class="modal_content">
<div class="modal_main">
<h1 v-html="$t('donations.header')"></h1>
<br />
<p v-html="$t('donations.p1')"></p>
<br />
<i18n-t keypath="donations.p2" tag="p">
<template v-slot:b1>
<b>{{ $t('donations.p2-b1') }}</b>
</template>
<template v-slot:b2>
<b>{{ $t('donations.p2-b2') }}</b>
</template>
<template v-slot:b3>
<b>{{ $t('donations.p2-b3') }}</b>
</template>
<template v-slot:link>
<a href="https://discord.gg/x2mpNN3svk" target="_blank">
{{ $t('donations.p2-a1') }}
</a>
</template>
</i18n-t>
<br />
<p v-html="$t('donations.p3')"></p>
<br />
<i18n-t keypath="donations.p4" tag="p">
<template v-slot:img>
<img src="/images/icon-diamond.svg" alt="donator diamond icon" />
</template>
<template v-slot:b1>
<b>{{ $t('donations.p4-b1') }}</b>
</template>
<template v-slot:b2>
<b>{{ $t('donations.p4-b2') }}</b>
</template>
</i18n-t>
<br />
<i
v-html="$t('donations.p5')"
style="display: flex; justify-content: flex-end; text-align: right"
>
</i>
</div>
<div class="modal_actions">
<button class="modal_button exit btn--image" @click="toggleModal(false)">
<img src="/images/icon-exit.svg" alt="dollar donation icon" />
{{ $t('donations.action-exit') }}
</button>
<form action="https://www.paypal.com/donate" method="post">
<input type="hidden" name="hosted_button_id" value="EDB3SKFAHXFTW" />
<button class="modal_button action btn--image" @click="toggleModal(false)">
<img src="/images/icon-dollar.svg" alt="dollar donation icon" />
{{ $t('donations.action-confirm') }}
</button>
</form>
</div>
</div>
</AnimatedModal>
</div>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import AnimatedModal from './AnimatedModal.vue';
export default defineComponent({
props: {
isModalOpen: Boolean
},
emits: ['toggleModal'],
methods: {
toggleModal(value: boolean) {
this.$emit('toggleModal', value);
}
},
components: { AnimatedModal }
});
</script>
<style lang="scss" scoped>
@import '../../styles/responsive.scss';
.modal_button {
&.action {
$btnColor: #254069;
background-color: $btnColor;
&:hover {
background-color: lighten($btnColor, 10%);
}
}
&.exit {
$btnColor: crimson;
background-color: $btnColor;
&:hover {
background-color: lighten($btnColor, 10%);
}
}
@include smallScreen {
span {
display: none;
}
}
}
.modal-logo {
position: absolute;
top: 0;
left: 50%;
width: 6em;
transform: translate(-50%, -50%);
}
.modal_content {
display: grid;
grid-template-rows: 1fr auto;
gap: 1em;
font-size: 1.1em;
& > div {
padding: 1em;
}
h1 {
font-size: 1.95em;
text-align: center;
}
p {
text-align: justify;
}
a {
text-decoration: underline;
}
}
.modal_main {
overflow: auto;
img {
max-height: 20px;
margin-right: 5px;
vertical-align: text-bottom;
}
}
.modal_actions {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(13em, 1fr));
gap: 0.5em;
form button {
width: 100%;
}
}
</style>
+10 -2
View File
@@ -23,6 +23,9 @@ export default defineComponent({
dispatcherStatus: { dispatcherStatus: {
type: Number as PropType<Status.ActiveDispatcher | number> type: Number as PropType<Status.ActiveDispatcher | number>
}, },
dispatcherTimestamp: {
type: Number as PropType<number | null>
},
isOnline: { isOnline: {
type: Boolean type: Boolean
} }
@@ -31,12 +34,15 @@ export default defineComponent({
computed: { computed: {
statusName() { statusName() {
if (!this.dispatcherStatus) return 'free'; if (this.dispatcherStatus === undefined) return 'free';
switch (this.dispatcherStatus) { switch (this.dispatcherStatus) {
case Status.ActiveDispatcher.AFK: case Status.ActiveDispatcher.AFK:
return 'afk'; return 'afk';
case Status.ActiveDispatcher.NO_LIMIT:
return 'no-limit';
case Status.ActiveDispatcher.ENDING: case Status.ActiveDispatcher.ENDING:
return 'ending'; return 'ending';
@@ -56,7 +62,9 @@ export default defineComponent({
return 'unknown'; return 'unknown';
default: default:
if (this.dispatcherStatus >= Date.now() + 25500000) return 'no-limit'; if (this.dispatcherTimestamp != null && this.dispatcherStatus >= Date.now() + 25500000)
return 'no-limit';
return 'online'; return 'online';
} }
} }
-11
View File
@@ -35,17 +35,6 @@ export default defineComponent({
this.$nextTick(() => { this.$nextTick(() => {
contentEl.focus(); 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;
}
} }
}); });
</script> </script>
@@ -235,10 +235,6 @@ table.scenery-history-table {
margin: 0 auto; margin: 0 auto;
} }
} }
@media screen and (max-width: 550px) {
font-size: 0.9em;
}
} }
.text { .text {
@@ -24,6 +24,7 @@
<StationStatusBadge <StationStatusBadge
:isOnline="onlineScenery ? true : false" :isOnline="onlineScenery ? true : false"
:dispatcherStatus="onlineScenery?.dispatcherStatus" :dispatcherStatus="onlineScenery?.dispatcherStatus"
:dispatcherTimestamp="onlineScenery?.dispatcherTimestamp"
/> />
</section> </section>
</template> </template>
@@ -85,9 +85,11 @@
<strong>{{ scheduledTrain.category }}</strong> <strong>{{ scheduledTrain.category }}</strong>
{{ scheduledTrain.trainNo }} {{ scheduledTrain.trainNo }}
<span class="g-tooltip" v-if="scheduledTrain.stopInfo.comments"> <span
v-if="scheduledTrain.stopInfo.comments"
:title="scheduledTrain.stopInfo.comments"
>
<img src="/images/icon-warning.svg" /> <img src="/images/icon-warning.svg" />
<span class="content" v-html="scheduledTrain.stopInfo.comments"> </span>
</span> </span>
</span> </span>
&nbsp;|&nbsp; &nbsp;|&nbsp;
@@ -295,19 +295,7 @@ export default defineComponent({
<style lang="scss" scoped> <style lang="scss" scoped>
@import '../../styles/responsive.scss'; @import '../../styles/responsive.scss';
@import '../../styles/card.scss'; @import '../../styles/card.scss';
@import '../../styles/animations.scss';
.card-anim {
&-enter-active,
&-leave-active {
transition: all $animDuration $animType;
}
&-enter-from,
&-leave-to {
opacity: 0;
transform: translate(-50%, -50%) scale(0.45);
}
}
.card { .card {
display: grid; display: grid;
+33 -9
View File
@@ -114,7 +114,20 @@
</td> </td>
<td class="station_dispatcher-name"> <td class="station_dispatcher-name">
{{ station.onlineInfo ? station.onlineInfo.dispatcherName : '' }} <span v-if="station.onlineInfo?.dispatcherName">
<b
v-if="store.donatorsData.includes(station.onlineInfo.dispatcherName)"
:title="$t('donations.dispatcher-message')"
@click.stop="openDonationModal"
>
<img src="/images/icon-diamond.svg" alt="" />
{{ station.onlineInfo.dispatcherName }}
</b>
<div v-else>
{{ station.onlineInfo.dispatcherName }}
</div>
</span>
</td> </td>
<td class="station_dispatcher-exp"> <td class="station_dispatcher-exp">
@@ -127,7 +140,7 @@
) )
" "
> >
{{ 2 > station.onlineInfo.dispatcherExp ? 'L' : station.onlineInfo.dispatcherExp }} {{ station.onlineInfo.dispatcherExp < 2 ? 'L' : station.onlineInfo.dispatcherExp }}
</span> </span>
</td> </td>
@@ -295,6 +308,7 @@ export default defineComponent({
} }
}, },
emits: ['toggleDonationModal'],
components: { Loading, StationStatusBadge }, components: { Loading, StationStatusBadge },
mixins: [styleMixin, dateMixin, stationInfoMixin], mixins: [styleMixin, dateMixin, stationInfoMixin],
@@ -320,7 +334,8 @@ export default defineComponent({
return { return {
isDataLoaded, isDataLoaded,
stationFiltersStore stationFiltersStore,
store
}; };
}, },
@@ -340,6 +355,11 @@ export default defineComponent({
}); });
}, },
openDonationModal(e: Event) {
this.$emit('toggleDonationModal', true);
this.store.modalLastClickedTarget = e.target;
},
openForumSite(e: Event, url: string | undefined) { openForumSite(e: Event, url: string | undefined) {
if (!url) return; if (!url) return;
e.preventDefault(); e.preventDefault();
@@ -374,15 +394,10 @@ $rowCol: #424242;
} }
} }
section.station_table {
overflow: auto;
overflow-y: hidden;
font-weight: 500;
}
.table_wrapper { .table_wrapper {
overflow: auto; overflow: auto;
overflow-y: hidden; overflow-y: hidden;
font-weight: 500;
} }
table { table {
@@ -495,6 +510,15 @@ td.station {
} }
} }
// &_dispatcher-name {
// position: relative;
// }
&_dispatcher-name img {
max-width: 1.35em;
vertical-align: text-bottom;
}
&_level { &_level {
span { span {
background-color: #888; background-color: #888;
+23 -1
View File
@@ -32,7 +32,17 @@
> >
{{ train.driverLevel < 2 ? 'L' : `${train.driverLevel}` }} {{ train.driverLevel < 2 ? 'L' : `${train.driverLevel}` }}
</b> </b>
<span>{{ train.driverName }}</span>
<div class="train-driver">
<b
v-if="store.donatorsData.includes(train.driverName)"
:title="$t('donations.driver-message')"
>
{{ train.driverName }}
<img src="/images/icon-diamond.svg" alt="donator diamond icon" />
</b>
<span v-else>{{ train.driverName }}</span>
</div>
</div> </div>
<div class="general-timetable" v-if="train.timetableData"> <div class="general-timetable" v-if="train.timetableData">
@@ -114,6 +124,7 @@ import trainInfoMixin from '../../mixins/trainInfoMixin';
import Train from '../../scripts/interfaces/Train'; import Train from '../../scripts/interfaces/Train';
import ProgressBar from '../Global/ProgressBar.vue'; import ProgressBar from '../Global/ProgressBar.vue';
import TrainThumbnail from '../Global/TrainThumbnail.vue'; import TrainThumbnail from '../Global/TrainThumbnail.vue';
import { useStore } from '../../store/mainStore';
export default defineComponent({ export default defineComponent({
mixins: [trainInfoMixin, styleMixin], mixins: [trainInfoMixin, styleMixin],
@@ -128,6 +139,12 @@ export default defineComponent({
type: Boolean, type: Boolean,
default: true default: true
} }
},
data() {
return {
store: useStore()
};
} }
}); });
</script> </script>
@@ -171,6 +188,11 @@ export default defineComponent({
gap: 0.5em; gap: 0.5em;
} }
.train-driver img {
max-height: 20px;
vertical-align: text-bottom;
}
.timetable-id { .timetable-id {
color: #d2d2d2; color: #d2d2d2;
} }
+1 -1
View File
@@ -52,7 +52,7 @@ export default defineComponent({
mixins: [modalTrainMixin], mixins: [modalTrainMixin],
setup(props) { setup() {
const store = useStore(); const store = useStore();
const searchedTrain = inject('searchedTrain') as Ref<string>; const searchedTrain = inject('searchedTrain') as Ref<string>;
const searchedDriver = inject('searchedDriver') as Ref<string>; const searchedDriver = inject('searchedDriver') as Ref<string>;
+19
View File
@@ -1,4 +1,23 @@
{ {
"donations": {
"button-title": "TOSS A COIN",
"header": "Toss a coin to Stacjownik!",
"p1": "<b>Hello o7!</b> This is Spythere, the creator of Stacjownik, Pojazdownik and several other applications that enhance the gameplay of Train Driver 2!",
"p2": "{b1} is a completely free tool, created and continuously developed for the Train Driver 2 simulator community since 2020. However, a part of the project is sustained solely through my private financial contribution. Features such as {b2} or {b3} (operating on my {link} - to which you are warmly invited) must function on a dedicated server where they can collect and process data, and then display it on the website.",
"p2-b1": "Stacjownik",
"p2-b2": "Journal",
"p2-b3": "Stacjobot (Stacjownik bot)",
"p2-a1": "Discord server",
"p3": "<b>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!</b>",
"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!<br />~ Spythere",
"action-exit": "Maybe next time...",
"action-confirm": "DONATE!",
"dispatcher-message": "Dispatcher supporting the Stacjownik project!",
"driver-message": "Driver supporting the Stacjownik project!"
},
"general": { "general": {
"and": " and ", "and": " and ",
"refresh": "REFRESH", "refresh": "REFRESH",
+19
View File
@@ -1,4 +1,23 @@
{ {
"donations": {
"button-title": "GROSZA DAJ",
"header": "Grosza daj Stacjownikowi!",
"p1": "<b>Hej o7!</b> Z tej strony Spythere, twórca Stacjownika, Pojazdownika oraz kilku innych aplikacji wspomagających rozgrywkę symulatora Train Driver 2!",
"p2": "{b1} to narzędzie całkowicie darmowe, tworzone i rozwijane dla społeczności symulatora TD2 nieprzerwanie od 2020 roku. Jednakże, część projektu jest podtrzymywana wyłącznie dzięki mojemu prywatnemu wkładowi finansowemu. Funkcje takie jak {b2} czy też {b3} działający na moim {link} (na który serdeczne zapraszam) muszą działać na wydzielonym serwerze, gdzie będą mogły zbierać i przetwarzać dane, aby następnie pokazać je na stronie.",
"p2-b1": "Stacjownik",
"p2-b2": "Dziennik",
"p2-b3": "Stacjobot",
"p2-a1": "serwerze Discord",
"p3": "<b>Jeśli masz możliwość i chcesz wspomóc moją twórczość dla symulatora, będę wdzięczny za wszelkie pomoce finansowe, które pozwolą na choćby częściowe pokrycie kosztów serwera oraz dalsze rozwijanie możliwości aplikacji!</b>",
"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 korzystania z aplikacji! <br />~ Spythere",
"action-exit": "Może kiedy indziej...",
"action-confirm": "WSPOMÓŻ!",
"dispatcher-message": "Dyżurny wspierający projekt Stacjownika!",
"driver-message": "Maszynista wspierający projekt Stacjownika!"
},
"general": { "general": {
"and": " oraz ", "and": " oraz ",
"refresh": "ODŚWIEŻ", "refresh": "ODŚWIEŻ",
+1 -1
View File
@@ -2,6 +2,6 @@ export const URLs = {
stacjownikAPI: stacjownikAPI:
import.meta.env.VITE_APP_API_DEV === '1' && !import.meta.env.PROD import.meta.env.VITE_APP_API_DEV === '1' && !import.meta.env.PROD
? 'http://localhost:3001' ? 'http://localhost:3001'
: 'https://stacjownik.spythere.pl', : 'https://stacjownik.spythere.eu',
stacjownikAPIDev: 'localhost:3000' stacjownikAPIDev: 'localhost:3000'
}; };
+16 -1
View File
@@ -3,6 +3,17 @@ import { Status } from '../../typings/common';
import { HeadIdsTypes } from '../data/stationHeaderNames'; import { HeadIdsTypes } from '../data/stationHeaderNames';
import Station from '../interfaces/Station'; import Station from '../interfaces/Station';
const dispatcherStatusPriority = [
Status.ActiveDispatcher.UNKNOWN,
Status.ActiveDispatcher.INVALID,
Status.ActiveDispatcher.NOT_LOGGED_IN,
Status.ActiveDispatcher.UNAVAILABLE,
Status.ActiveDispatcher.AFK,
Status.ActiveDispatcher.ENDING,
Status.ActiveDispatcher.NO_SPACE,
undefined
];
export const sortStations = ( export const sortStations = (
a: Station, a: Station,
b: Station, b: Station,
@@ -19,7 +30,11 @@ export const sortStations = (
break; break;
case 'status': case 'status':
diff = (a.onlineInfo?.dispatcherStatus || 0) - (b.onlineInfo?.dispatcherStatus || 0); diff =
(a.onlineInfo?.dispatcherTimestamp ??
dispatcherStatusPriority.indexOf(a.onlineInfo?.dispatcherStatus)) -
(b.onlineInfo?.dispatcherTimestamp ??
dispatcherStatusPriority.indexOf(b.onlineInfo?.dispatcherStatus));
break; break;
case 'dispatcher': case 'dispatcher':
+31 -4
View File
@@ -9,7 +9,7 @@ import { parseSpawns, getScheduledTrains, getStationTrains } from './utils';
import { OnlineScenery, ScheduledTrain, StationJSONData, StoreState } from './typings'; import { OnlineScenery, ScheduledTrain, StationJSONData, StoreState } from './typings';
import packageInfo from '../../package.json'; import packageInfo from '../../package.json';
import { Websocket, API } from '../typings/api'; import { Websocket, API, GithubAPI } from '../typings/api';
import { Status } from '../typings/common'; import { Status } from '../typings/common';
export const useStore = defineStore('store', { export const useStore = defineStore('store', {
@@ -17,6 +17,7 @@ export const useStore = defineStore('store', {
({ ({
activeData: {} as unknown, activeData: {} as unknown,
rollingStockData: undefined, rollingStockData: undefined,
donatorsData: [],
stationList: [], stationList: [],
regionOnlineCounters: [], regionOnlineCounters: [],
@@ -55,7 +56,14 @@ export const useStore = defineStore('store', {
blockScroll: false, blockScroll: false,
listenerLaunched: false, listenerLaunched: false,
modalLastClickedTarget: null modalLastClickedTarget: null,
tooltip: {
content: '',
visible: false,
x: 0,
y: 0
}
}) as StoreState, }) as StoreState,
getters: { getters: {
@@ -138,6 +146,13 @@ export const useStore = defineStore('store', {
[] as ScheduledTrain[] [] as ScheduledTrain[]
); );
const dispatcherTimestamp =
scenery.dispatcherStatus == Status.ActiveDispatcher.NO_LIMIT
? Date.now() + 25500000
: scenery.dispatcherStatus > 5
? scenery.dispatcherStatus
: null;
list.push({ list.push({
name: scenery.stationName, name: scenery.stationName,
hash: scenery.stationHash, hash: scenery.stationHash,
@@ -153,6 +168,7 @@ export const useStore = defineStore('store', {
scheduledTrains: scheduledTrains, scheduledTrains: scheduledTrains,
stationTrains: stationTrains, stationTrains: stationTrains,
dispatcherStatus: scenery.dispatcherStatus, dispatcherStatus: scenery.dispatcherStatus,
dispatcherTimestamp: dispatcherTimestamp,
isOnline: scenery.isOnline == 1, isOnline: scenery.isOnline == 1,
@@ -272,6 +288,7 @@ export const useStore = defineStore('store', {
async connectToAPI() { async connectToAPI() {
this.connectToWebsocket(); this.connectToWebsocket();
this.fetchStockInfoData(); this.fetchStockInfoData();
this.fetchDonatorsData();
this.fetchStationsGeneralInfo(); this.fetchStationsGeneralInfo();
}, },
@@ -291,6 +308,18 @@ export const useStore = defineStore('store', {
} }
}, },
async fetchDonatorsData() {
try {
const response = await axios.get<GithubAPI.Donators.Response>(
'https://raw.githubusercontent.com/Spythere/api/main/td2/data/donators.json'
);
if (response.data) this.donatorsData = response.data;
} catch (error) {
console.error('Ups! Wystąpił błąd podczas pobierania informacji o donatorach:', error);
}
},
async setStatuses() { async setStatuses() {
if (!this.activeData.activeSceneries) { if (!this.activeData.activeSceneries) {
this.dataStatuses.sceneries = Status.Data.Error; this.dataStatuses.sceneries = Status.Data.Error;
@@ -303,8 +332,6 @@ export const useStore = defineStore('store', {
this.dataStatuses.sceneries = Status.Data.Loaded; this.dataStatuses.sceneries = Status.Data.Loaded;
this.dataStatuses.trains = !this.activeData.trains ? Status.Data.Warning : Status.Data.Loaded; this.dataStatuses.trains = !this.activeData.trains ? Status.Data.Warning : Status.Data.Loaded;
this.dataStatuses.dispatchers = Status.Data.Loaded; this.dataStatuses.dispatchers = Status.Data.Loaded;
// if (this.apiData.dispatchers != null) this.lastDispatcherStatuses = prevDispatcherStatuses;
} }
} }
}); });
+11 -2
View File
@@ -1,6 +1,6 @@
import { Socket } from 'socket.io-client'; import { Socket } from 'socket.io-client';
import Station from '../scripts/interfaces/Station'; import Station from '../scripts/interfaces/Station';
import { API, Websocket } from '../typings/api'; import { API, GithubAPI, Websocket } from '../typings/api';
import { Status } from '../typings/common'; import { Status } from '../typings/common';
export type Availability = 'default' | 'unavailable' | 'nonPublic' | 'abandoned' | 'nonDefault'; export type Availability = 'default' | 'unavailable' | 'nonPublic' | 'abandoned' | 'nonDefault';
@@ -15,6 +15,7 @@ export interface StoreState {
stationList: Station[]; stationList: Station[];
activeData: Websocket.ActiveData; activeData: Websocket.ActiveData;
rollingStockData?: API.RollingStock.Response; rollingStockData?: API.RollingStock.Response;
donatorsData: GithubAPI.Donators.Response;
regionOnlineCounters: RegionCounters[]; regionOnlineCounters: RegionCounters[];
@@ -55,6 +56,13 @@ export interface StoreState {
listenerLaunched: boolean; listenerLaunched: boolean;
blockScroll: boolean; blockScroll: boolean;
modalLastClickedTarget: EventTarget | null; modalLastClickedTarget: EventTarget | null;
tooltip: {
visible: boolean;
x: number;
y: number;
content: string;
};
} }
export interface StationRoutesInfo { export interface StationRoutesInfo {
@@ -105,6 +113,7 @@ export interface OnlineScenery {
dispatcherIsSupporter: boolean; dispatcherIsSupporter: boolean;
dispatcherStatus: Status.ActiveDispatcher | number; dispatcherStatus: Status.ActiveDispatcher | number;
dispatcherTimestamp: number | null;
isOnline: boolean; isOnline: boolean;
@@ -186,7 +195,7 @@ export interface TrainStop {
departureDelay: number; departureDelay: number;
pointId: number; pointId: number;
comments?: any; comments?: string;
beginsHere: boolean; beginsHere: boolean;
terminatesHere: boolean; terminatesHere: boolean;
+50 -3
View File
@@ -1,7 +1,11 @@
$animDuration: 150ms;
$animType: ease-in-out;
// List animation
.list-anim-move, .list-anim-move,
.list-anim-enter-active, .list-anim-enter-active,
.list-anim-leave-active { .list-anim-leave-active {
transition: all 250ms ease; transition: all $animDuration ease;
} }
.list-anim-enter-from, .list-anim-enter-from,
@@ -15,6 +19,21 @@
width: 100%; width: 100%;
} }
// View animation
.view-anim {
&-enter-from,
&-leave-to {
opacity: 0.02;
}
&-enter-active,
&-leave-active {
transition: all $animDuration $animType;
min-height: 100%;
}
}
// Data status list animation
.status-anim { .status-anim {
&-enter-from, &-enter-from,
&-leave-to { &-leave-to {
@@ -22,10 +41,38 @@
} }
&-enter-active { &-enter-active {
transition: all 100ms ease-out; transition: all $animDuration ease-out;
} }
&-leave-active { &-leave-active {
transition: all 100ms ease-out; transition: all $animDuration ease-out;
}
}
// Card animation
.card-anim {
&-enter-active,
&-leave-active {
transition: all $animDuration $animType;
}
&-enter-from,
&-leave-to {
opacity: 0;
transform: translate(-50%, -50%) scale(0.45);
}
}
// Modal animation
.modal-anim {
&-enter-active,
&-leave-active {
transition: all $animDuration $animType;
}
&-enter-from,
&-leave-to {
transform: translateY(-25%);
opacity: 0;
} }
} }
+9 -34
View File
@@ -14,6 +14,8 @@
--clr-error: #df3e3e; --clr-error: #df3e3e;
--clr-warning: #c59429; --clr-warning: #c59429;
--clr-honorable: #f47fff;
font-size: 16px; font-size: 16px;
} }
@@ -54,38 +56,6 @@ body {
} }
} }
.g-tooltip {
position: relative;
display: inline-block;
vertical-align: middle;
.content {
position: absolute;
left: 0;
z-index: 100;
visibility: hidden;
opacity: 0;
min-width: 250px;
background-color: #202020;
text-align: center;
border-radius: 0.5em;
transition: opacity 0.3s;
padding: 0.25em;
}
&:hover > .content {
visibility: visible;
opacity: 1;
}
}
button, button,
input, input,
select { select {
@@ -187,16 +157,23 @@ ul {
&--grayed { &--grayed {
color: #ccc; color: #ccc;
} }
&--honorable {
color: var(--clr-honorable);
text-shadow: var(--clr-honorable) 0 0 10px;
}
} }
button { button {
cursor: pointer; cursor: pointer;
color: white; color: white;
background: none; background: none;
border-radius: 0.25em;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 0.5em;
padding: 0.25em 0.5em; padding: 0.25em 0.5em;
@@ -211,7 +188,6 @@ button {
button.btn--filled { button.btn--filled {
background-color: #1a1a1a; background-color: #1a1a1a;
border-radius: 0.25em;
&:hover { &:hover {
background-color: #2a2a2a; background-color: #2a2a2a;
@@ -245,7 +221,6 @@ button.btn--image {
img { img {
width: 1.5em; width: 1.5em;
margin-right: 0.5em;
vertical-align: middle; vertical-align: middle;
} }
} }
-3
View File
@@ -12,6 +12,3 @@ $accent2Col: #ff3d5d;
$skr: #ff5100; $skr: #ff5100;
$twr: #ffbb00; $twr: #ffbb00;
$animDuration: 150ms;
$animType: ease-in-out;
+4
View File
@@ -328,4 +328,8 @@ export namespace GithubAPI {
body: string; body: string;
} }
} }
export namespace Donators {
export type Response = string[];
}
} }
+1
View File
@@ -2,6 +2,7 @@ export namespace Status {
export enum ActiveDispatcher { export enum ActiveDispatcher {
INVALID = -2, INVALID = -2,
UNKNOWN = -1, UNKNOWN = -1,
NO_LIMIT = 0,
AFK = 1, AFK = 1,
ENDING = 2, ENDING = 2,
NO_SPACE = 3, NO_SPACE = 3,
+28 -20
View File
@@ -1,17 +1,17 @@
<template> <template>
<section class="stations-view"> <section class="stations-view">
<div class="wrapper"> <div class="wrapper">
<div class="body"> <div class="stations-options">
<div class="options-bar"> <StationFilterCard
<StationFilterCard :showCard="filterCardOpen"
:showCard="filterCardOpen" :exit="(filterCardOpen = false)"
:exit="(filterCardOpen = false)" ref="filterCardRef"
ref="filterCardRef" />
/>
</div>
<StationTable :stations="computedStationList" /> <Donation :isModalOpen="isDonationModalOpen" @toggleModal="toggleDonationModal" />
</div> </div>
<StationTable :stations="computedStationList" @toggleDonationModal="toggleDonationModal" />
</div> </div>
</section> </section>
</template> </template>
@@ -22,11 +22,13 @@ import StationTable from '../components/StationsView/StationTable.vue';
import StationFilterCard from '../components/StationsView/StationFilterCard.vue'; import StationFilterCard from '../components/StationsView/StationFilterCard.vue';
import { useStationFiltersStore } from '../store/stationFiltersStore'; import { useStationFiltersStore } from '../store/stationFiltersStore';
import { useStore } from '../store/mainStore'; import { useStore } from '../store/mainStore';
import Donation from '../components/Global/Donation.vue';
export default defineComponent({ export default defineComponent({
components: { components: {
StationTable, StationTable,
StationFilterCard StationFilterCard,
Donation
}, },
data: () => ({ data: () => ({
@@ -35,17 +37,25 @@ export default defineComponent({
STORAGE_KEY: 'options_saved', STORAGE_KEY: 'options_saved',
focusedStationName: '', focusedStationName: '',
filterStore: useStationFiltersStore(), filterStore: useStationFiltersStore(),
store: useStore() store: useStore(),
isDonationModalOpen: false
}), }),
mounted() {
this.filterStore.setupFilters();
},
computed: { computed: {
computedStationList() { computedStationList() {
return this.filterStore.filteredStationList; return this.filterStore.filteredStationList;
} }
}, },
mounted() { methods: {
this.filterStore.setupFilters(); toggleDonationModal(value: boolean) {
this.isDonationModalOpen = value;
}
} }
}); });
</script> </script>
@@ -80,23 +90,21 @@ export default defineComponent({
.stations-view { .stations-view {
position: relative; position: relative;
display: flex;
justify-content: center;
padding: 1em 0; padding: 1em 0;
min-height: 100%; min-height: 100%;
} }
.wrapper { .wrapper {
display: flex;
justify-content: center;
}
.body {
max-width: 100%; max-width: 100%;
} }
.options-bar { .stations-options {
display: flex; display: flex;
align-items: center; justify-content: space-between;
gap: 0.5em;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
+2 -6
View File
@@ -19,9 +19,7 @@ export default defineConfig({
handler: 'NetworkFirst', handler: 'NetworkFirst',
options: { options: {
cacheName: 'sceneries-cache', cacheName: 'sceneries-cache',
expiration: {
maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
},
cacheableResponse: { cacheableResponse: {
statuses: [0, 200] statuses: [0, 200]
} }
@@ -32,9 +30,7 @@ export default defineConfig({
handler: 'NetworkFirst', handler: 'NetworkFirst',
options: { options: {
cacheName: 'github-api-cache', cacheName: 'github-api-cache',
expiration: {
maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
},
cacheableResponse: { cacheableResponse: {
statuses: [0, 200] statuses: [0, 200]
} }
+3153 -3153
View File
File diff suppressed because it is too large Load Diff