mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3be964ec99 | |||
| caf6137ca3 | |||
| 0f2e5e084b | |||
| fc7a9be9dd | |||
| c0b892da97 | |||
| 907b75f12b | |||
| 3c3a114a38 | |||
| 47f824bef0 | |||
| 2d3e830cf9 | |||
| c888b3d386 | |||
| 645a70ef9c | |||
| 1cd93f09c4 | |||
| 6b4231496e | |||
| b72ee13bdb | |||
| ce053a5a82 | |||
| b08e39ae1a | |||
| dc27500237 | |||
| fe6972c1f8 | |||
| 47193181e5 | |||
| 08b9b72dcd | |||
| 7bbabdd7bf | |||
| c90be042e7 | |||
| 200318def7 |
@@ -1,17 +0,0 @@
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
github-releases-to-discord:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Github Releases To Discord
|
||||
uses: SethCohen/github-releases-to-discord@v1.13.1
|
||||
with:
|
||||
webhook_url: ${{ secrets.WEBHOOK_URL }}
|
||||
color: "15844367"
|
||||
footer_title: "Changelog - Stacjownik"
|
||||
footer_timestamp: true
|
||||
@@ -0,0 +1,15 @@
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
>
|
||||
<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" />
|
||||
<path d="M12 9v4" />
|
||||
<path d="M12 17h.01" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 345 B |
Executable
+60
@@ -0,0 +1,60 @@
|
||||
<svg width="79" height="127" viewBox="0 0 79 127" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="icon-loading">
|
||||
<g id="Rectangle 37">
|
||||
<rect id="Rectangle 38" x="36.9999" y="79" width="6" height="16" fill="#FF0000"/>
|
||||
<rect id="Rectangle 40" x="36.9999" y="111" width="6" height="16" fill="#FF0000"/>
|
||||
<rect id="Rectangle 39" x="36.9999" y="95" width="6" height="16" fill="white"/>
|
||||
</g>
|
||||
<g id="Group 8">
|
||||
<path id="Vector 15" d="M59.5018 41.0003H23.0018C-1.49817 41.0003 -0.498171 79.5003 23.0018 79.5003H59.5018C83.0018 79.5003 84.0018 41.0003 59.5018 41.0003Z" fill="#3F3E3E"/>
|
||||
<g id="Group 51">
|
||||
<circle id="light-left" cx="22.9999" cy="60" r="9" fill="#FF1313" fill-opacity="1"/>
|
||||
|
||||
<animate
|
||||
attributeType="XML"
|
||||
attributeName="opacity"
|
||||
values="0.25;1;1;0.25;0.25"
|
||||
dur="1s"
|
||||
repeatCount="indefinite"
|
||||
/>
|
||||
</g>
|
||||
|
||||
<g id="Group 51">
|
||||
<circle id="light-right" cx="57.9999" cy="60" r="9" fill="#FF1313" fill-opacity="1"/>
|
||||
|
||||
<animate
|
||||
attributeType="XML"
|
||||
attributeName="opacity"
|
||||
values="1;0.25;0.25;1;1"
|
||||
dur="1s"
|
||||
repeatCount="indefinite"
|
||||
/>
|
||||
</g>
|
||||
|
||||
|
||||
</g>
|
||||
<g id="Group 52">
|
||||
<rect id="Rectangle 36" x="37.9999" y="10" width="4" height="31" fill="#525252"/>
|
||||
<g id="Vector 23">
|
||||
<path id="Rectangle 28" d="M4.09756 32.3241L10.9579 29.2933L14.1908 36.611L7.33047 39.6418L3.42724 36.9932L4.09756 32.3241Z" fill="#FF0000"/>
|
||||
<path id="Rectangle 30" d="M10.9579 29.2933L20.105 25.2522L23.3379 32.5698L14.1908 36.611L12.5743 32.9521L10.9579 29.2933Z" fill="white"/>
|
||||
<path id="Rectangle 34" d="M20.105 25.2522L29.2521 21.211L32.485 28.5287L23.3379 32.5698L21.7214 28.911L20.105 25.2522Z" fill="#FF0000"/>
|
||||
<path id="Rectangle 35" d="M47.5463 13.1288L56.6934 9.08762L59.9263 16.4053L50.7792 20.4464L49.1627 16.7876L47.5463 13.1288Z" fill="#FF0000"/>
|
||||
<path id="Rectangle 31" d="M29.2521 21.211L38.3992 17.1699L41.6321 24.4876L32.485 28.5287L30.8685 24.8699L29.2521 21.211Z" fill="white"/>
|
||||
<path id="Rectangle 32" d="M38.3992 17.1699L47.5463 13.1288L50.7792 20.4464L41.6321 24.4876L40.0156 20.8287L38.3992 17.1699Z" fill="white"/>
|
||||
<path id="Rectangle 33" d="M56.6934 9.08762L65.8404 5.04649L69.0734 12.3642L59.9263 16.4053L58.3098 12.7465L56.6934 9.08762Z" fill="white"/>
|
||||
<path id="Rectangle 29" d="M73.1581 1.81359L65.8405 5.04649L69.0734 12.3642L76.391 9.13126L76.604 4.6642L73.1581 1.81359Z" fill="#FF0000"/>
|
||||
</g>
|
||||
<g id="Vector 24">
|
||||
<path id="Rectangle 28_2" d="M6.36567 3.47438L13.3598 6.18222L10.4714 13.6426L3.47731 10.9348L2.59012 6.30195L6.36567 3.47438Z" fill="#FF0000"/>
|
||||
<path id="Rectangle 30_2" d="M13.3597 6.18222L22.6852 9.79268L19.7969 17.2531L10.4714 13.6426L11.9156 9.91241L13.3597 6.18222Z" fill="white"/>
|
||||
<path id="Rectangle 34_2" d="M22.6853 9.79268L32.0108 13.4031L29.1224 20.8635L19.7969 17.2531L21.2411 13.5229L22.6853 9.79268Z" fill="#FF0000"/>
|
||||
<path id="Rectangle 35_2" d="M50.6617 20.6241L59.9872 24.2345L57.0989 31.6949L47.7734 28.0844L49.2176 24.3542L50.6617 20.6241Z" fill="#FF0000"/>
|
||||
<path id="Rectangle 31_2" d="M32.0107 13.4031L41.3362 17.0136L38.4479 24.474L29.1224 20.8635L30.5666 17.1333L32.0107 13.4031Z" fill="white"/>
|
||||
<path id="Rectangle 32_2" d="M41.3363 17.0136L50.6618 20.6241L47.7734 28.0844L38.4479 24.474L39.8921 20.7438L41.3363 17.0136Z" fill="white"/>
|
||||
<path id="Rectangle 33_2" d="M59.9872 24.2345L69.3127 27.845L66.4243 35.3054L57.0988 31.6949L58.543 27.9647L59.9872 24.2345Z" fill="white"/>
|
||||
<path id="Rectangle 29_2" d="M76.7731 30.7333L69.3127 27.845L66.4243 35.3054L73.8847 38.1937L77.194 35.1856L76.7731 30.7333Z" fill="#FF0000"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
+3
-214
@@ -1,188 +1,11 @@
|
||||
<template>
|
||||
<div class="app_container">
|
||||
<UpdateCard
|
||||
:is-update-card-open="isUpdateCardOpen"
|
||||
@toggle-card="() => (isUpdateCardOpen = false)"
|
||||
/>
|
||||
|
||||
<AppWelcomeCard :is-card-open="isWelcomeCardOpen" @toggle-card="closeWelcomeCard" />
|
||||
|
||||
<Tooltip />
|
||||
|
||||
<AppHeader />
|
||||
|
||||
<main class="app_main">
|
||||
<router-view v-slot="{ Component }">
|
||||
<keep-alive>
|
||||
<component :is="Component" :key="$route.name" />
|
||||
</keep-alive>
|
||||
</router-view>
|
||||
</main>
|
||||
|
||||
<AppFooter
|
||||
:version="VERSION"
|
||||
:is-on-production-host="isOnProductionHost"
|
||||
:is-update-card-open="isUpdateCardOpen"
|
||||
@open-update-card="() => (isUpdateCardOpen = true)"
|
||||
/>
|
||||
<AppNewDomainInfo />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import axios from 'axios';
|
||||
|
||||
import { version } from '../package.json';
|
||||
import { Status } from './typings/common';
|
||||
import { useMainStore } from './store/mainStore';
|
||||
import { useApiStore } from './store/apiStore';
|
||||
import { useTooltipStore } from './store/tooltipStore';
|
||||
|
||||
import Clock from './components/App/Clock.vue';
|
||||
import StatusIndicator from './components/App/StatusIndicator.vue';
|
||||
import AppHeader from './components/App/AppHeader.vue';
|
||||
import Tooltip from './components/Tooltip/Tooltip.vue';
|
||||
import UpdateCard from './components/App/UpdateCard.vue';
|
||||
|
||||
import StorageManager from './managers/storageManager';
|
||||
import AppFooter from './components/App/AppFooter.vue';
|
||||
import AppWelcomeCard from './components/App/AppWelcomeCard.vue';
|
||||
|
||||
const STORAGE_VERSION_KEY = 'app_version';
|
||||
const WELCOME_CARD_SEEN_KEY = 'welcome_card_seen';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
Clock,
|
||||
StatusIndicator,
|
||||
AppHeader,
|
||||
AppFooter,
|
||||
UpdateCard,
|
||||
AppWelcomeCard,
|
||||
Tooltip
|
||||
},
|
||||
|
||||
data: () => ({
|
||||
VERSION: version,
|
||||
store: useMainStore(),
|
||||
apiStore: useApiStore(),
|
||||
tooltipStore: useTooltipStore(),
|
||||
|
||||
isUpdateCardOpen: false,
|
||||
isWelcomeCardOpen: false,
|
||||
|
||||
isOnProductionHost: location.hostname == 'stacjownik-td2.web.app'
|
||||
}),
|
||||
|
||||
created() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
async mounted() {
|
||||
window.addEventListener('mousemove', (e: MouseEvent) => this.tooltipStore.handle(e));
|
||||
window.addEventListener('mousedown', () => this.tooltipStore.hide());
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
if (!this.isOnProductionHost) document.title = 'Stacjownik Dev';
|
||||
|
||||
this.loadLang();
|
||||
this.setupOfflineHandling();
|
||||
this.checkAppVersion();
|
||||
this.handleQueries();
|
||||
|
||||
this.apiStore.setupAPIData();
|
||||
},
|
||||
|
||||
handleQueries() {
|
||||
const query = new URLSearchParams(window.location.search);
|
||||
|
||||
if (query.get('welcomeCard') == '1') {
|
||||
this.isWelcomeCardOpen = true;
|
||||
}
|
||||
},
|
||||
|
||||
async checkAppVersion() {
|
||||
const isWelcomeCardSeen = StorageManager.getBooleanValue(WELCOME_CARD_SEEN_KEY);
|
||||
const storageVersion = StorageManager.getStringValue(STORAGE_VERSION_KEY);
|
||||
|
||||
if (isWelcomeCardSeen == false && storageVersion == '') {
|
||||
setTimeout(() => {
|
||||
this.isWelcomeCardOpen = true;
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
try {
|
||||
const releaseData = await (
|
||||
await axios.get('https://api.github.com/repos/Spythere/stacjownik/releases/latest')
|
||||
).data;
|
||||
|
||||
if (!releaseData) return;
|
||||
|
||||
this.store.appUpdate = {
|
||||
version,
|
||||
changelog: releaseData.body,
|
||||
releaseURL: releaseData.html_url
|
||||
};
|
||||
|
||||
this.isUpdateCardOpen =
|
||||
(storageVersion != '' && storageVersion != version && this.isOnProductionHost) ||
|
||||
import.meta.env.VITE_UPDATE_TEST === 'test';
|
||||
} catch (error) {
|
||||
console.error(`Wystąpił błąd podczas pobierania danych z API GitHuba: ${error}`);
|
||||
}
|
||||
|
||||
StorageManager.setStringValue(STORAGE_VERSION_KEY, version);
|
||||
},
|
||||
|
||||
setupOfflineHandling() {
|
||||
this.store.isOffline = !window.navigator.onLine;
|
||||
|
||||
if (this.store.isOffline) this.handleOfflineMode();
|
||||
|
||||
window.addEventListener('offline', this.handleOfflineMode);
|
||||
window.addEventListener('online', this.handleOnlineMode);
|
||||
},
|
||||
|
||||
handleOfflineMode() {
|
||||
this.store.isOffline = true;
|
||||
|
||||
this.apiStore.activeData = undefined;
|
||||
this.apiStore.dataStatuses.connection = Status.Data.Offline;
|
||||
},
|
||||
|
||||
handleOnlineMode() {
|
||||
this.store.isOffline = false;
|
||||
this.apiStore.dataStatuses.connection = Status.Data.Loading;
|
||||
|
||||
this.apiStore.connectToAPI();
|
||||
},
|
||||
|
||||
loadLang() {
|
||||
const storageLang = StorageManager.getStringValue('lang');
|
||||
|
||||
if (storageLang) {
|
||||
this.store.changeLocale(storageLang);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!window.navigator.language) return;
|
||||
|
||||
const naviLanguage = window.navigator.language.toString();
|
||||
|
||||
if (!naviLanguage.startsWith('pl')) {
|
||||
this.store.changeLocale('en');
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
closeWelcomeCard() {
|
||||
this.isWelcomeCardOpen = false;
|
||||
StorageManager.setBooleanValue(WELCOME_CARD_SEEN_KEY, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
<script lang="ts" setup>
|
||||
import AppNewDomainInfo from './components/App/AppNewDomainInfo.vue';
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -209,38 +32,4 @@ export default defineComponent({
|
||||
.app_main {
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
|
||||
.warning {
|
||||
background-color: firebrick;
|
||||
text-align: center;
|
||||
padding: 0.5em 0.4em;
|
||||
max-width: 1100px;
|
||||
margin: 0 auto;
|
||||
|
||||
border-radius: 0 0 1em 1em;
|
||||
}
|
||||
|
||||
// FOOTER
|
||||
.app_footer {
|
||||
max-width: 100%;
|
||||
padding: 0.5em;
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
padding: 0.1em;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 1.1em;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
z-index: 10;
|
||||
|
||||
background: #111;
|
||||
color: white;
|
||||
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -84,7 +84,7 @@ export default defineComponent({
|
||||
isChristmas() {
|
||||
const date = new Date();
|
||||
|
||||
return date.getUTCMonth() == 11 && date.getUTCDate() >= 20 && date.getUTCDate() <= 31;
|
||||
return date.getUTCMonth() == 11 && date.getUTCDate() >= 6 && date.getUTCDate() <= 31;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="app-domain-info">
|
||||
<div>
|
||||
<img src="/images/icon-loading.svg" alt="loading" height="200" />
|
||||
<h1><span class="text--primary">Aplikacja</span> została przeniesiona na nową domenę!</h1>
|
||||
<h1><span class="text--primary">This app</span> has been moved to a new domain!</h1>
|
||||
|
||||
<div style="margin-top: 1em">
|
||||
<a :href="newLink">Nowy link dla obecnego adresu / New link to the current address</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed } from 'vue';
|
||||
|
||||
const newLink = computed(() => {
|
||||
return 'https://stacjownik-td2.spythere.eu' + location.pathname + location.search;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-domain-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
min-height: 100vh;
|
||||
color: white;
|
||||
}
|
||||
|
||||
a {
|
||||
font-size: 1.35em;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<Card :is-open="isOpen" @toggle-card="toggleCard">
|
||||
<div class="body-content">
|
||||
<div class="content-top">
|
||||
<img src="/images/icon-loading.svg" alt="loading" height="125" />
|
||||
<h1>{{ t('migrate-info.header-text') }}</h1>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p v-html="t('migrate-info.paragraph-1-html')"></p>
|
||||
|
||||
<p>
|
||||
<a class="new-link" href="https://stacjownik-td2.spythere.eu/" target="_blank">
|
||||
{{ t('migrate-info.paragraph-2-link-text') }}
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
{{ t('migrate-info.paragraph-3-text') }}
|
||||
</p>
|
||||
|
||||
<p class="info-bottom" v-html="t('migrate-info.paragraph-4-html')"></p>
|
||||
</div>
|
||||
|
||||
<div class="content-actions">
|
||||
<button class="btn btn--action" @click="toggleCard">PRZYJĄŁEM!</button>
|
||||
</div>
|
||||
</div>
|
||||
</Card>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import Card from '../Global/Card.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
defineProps({
|
||||
isOpen: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
const emit = defineEmits(['toggleCard']);
|
||||
|
||||
function toggleCard() {
|
||||
emit('toggleCard');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.body-content {
|
||||
max-width: 800px;
|
||||
min-height: 500px;
|
||||
padding: 1em 0.5em;
|
||||
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
gap: 0.5em;
|
||||
|
||||
text-align: center;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
p {
|
||||
padding: 0.5em 0;
|
||||
}
|
||||
|
||||
a.new-link {
|
||||
font-size: 1.2em;
|
||||
color: var(--clr-primary);
|
||||
color: transparent;
|
||||
|
||||
background: var(--clr-primary);
|
||||
background: linear-gradient(90deg, var(--clr-primary), #ffffff);
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
|
||||
text-shadow: var(--clr-primary) 0 0 10px;
|
||||
}
|
||||
|
||||
.info-bottom {
|
||||
font-size: 0.9em;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.content-actions {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
</style>
|
||||
@@ -81,13 +81,8 @@ export default defineComponent({
|
||||
|
||||
background-color: #1a1a1a;
|
||||
box-shadow: 0 0 15px 10px #0e0e0e;
|
||||
border-radius: 1em;
|
||||
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@include responsive.smallScreen{
|
||||
.card {
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -23,6 +23,15 @@
|
||||
"bottom-text": "Enjoy!\n~Spythere",
|
||||
"button-confirm": "Start using the app!"
|
||||
},
|
||||
"migrate-info": {
|
||||
"tooltip-content": "Information about migration of\nStacjownik site!",
|
||||
"header-text": "Attention!",
|
||||
"paragraph-1-html": "Due to the growing interest in Stacjownik and other applications I have made, <b>as of January 1, 2026, Stacjownik will be <u>permanently moved</u> to a new dedicated domain:</b>",
|
||||
"paragraph-2-link-text": "https://stacjownik-td2.spythere.eu",
|
||||
"paragraph-3-text": "This website will no longer receive future updates and after the New Year it will only redirect to the address above.",
|
||||
"paragraph-4-italic-text": "\"Why are you messing this up? It's been fine for so long!\"",
|
||||
"paragraph-4-html": "<i>\"Why are you messing this up? It's been fine for so long!\"</i> <br /> The change is mainly caused by the growing website interest and exceeding the free limit plan of the current Google hosting, which forces additional fees for each use of the service above a certain threshold (or otherwise blocks access to it). By moving the site to a dedicated domain (which has already been purchased and is maintained with the financial help of <span class=\"text--donator\">Supporters</span>), I will get rid of unnecessary expenses for a large corporation that can shut down my application at any given time."
|
||||
},
|
||||
"donations": {
|
||||
"button-title": "TOSS A COIN",
|
||||
"header": "Toss a coin to Stacjownik!",
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
"bottom-text": "Miłego korzystania\n~Spythere",
|
||||
"button-confirm": "Zacznij korzystać z aplikacji!"
|
||||
},
|
||||
"migrate-info": {
|
||||
"tooltip-content": "Informacja o migracji\nstrony Stacjownika!",
|
||||
"header-text": "Uwaga!",
|
||||
"paragraph-1-html": "Ze względu na coraz większe zainteresowanie Stacjownikiem oraz innymi aplikacjami mojego autorstwa <b>z dniem 1 stycznia 2026r. Stacjownik zostaje <u>permamentnie przeniesiony</u> na nową dedykowaną domenę:</b>",
|
||||
"paragraph-2-link-text": "https://stacjownik-td2.spythere.eu",
|
||||
"paragraph-3-text": "Obecna strona nie będzie otrzymywać już przyszłych aktualizacji, a po Nowym Roku będzie jedynie przenosić na powyższy adres.",
|
||||
"paragraph-4-html": "<i>\"Po co psujesz? Przecież było dobrze tyle czasu!\"</i> <br /> Zmiana podyktowana jest głównie wzrostem zainteresowania stroną i przekraczaniem darmowego limitu obecnego hostingu Google'a, który wymusza płatność za każde użycie serwisu ponad określoną wartość (lub w przeciwnym wypadku blokuje do niego dostęp). Przenosząc stronę na dedykowaną domenę (która jest już wykupiona i utrzymywana dzięki pomocy <span class=\"text--donator\">Wspierających</span>), pozbędę się niepotrzebnego wydatku dla wielkiej korporacji, która w każdej chwili może mi wyłączyć aplikację."
|
||||
},
|
||||
"donations": {
|
||||
"button-title": "GROSZA DAJ",
|
||||
"header": "Grosza daj Stacjownikowi!",
|
||||
|
||||
@@ -36,7 +36,9 @@ export const useMainStore = defineStore('mainStore', {
|
||||
chosenModalTrainId: undefined,
|
||||
|
||||
modalLastClickedTarget: null,
|
||||
currentLocale: 'pl'
|
||||
currentLocale: 'pl',
|
||||
|
||||
isMigrateInfoCardOpen: false
|
||||
}) as MainStoreState,
|
||||
|
||||
actions: {
|
||||
|
||||
@@ -13,6 +13,7 @@ export interface MainStoreState {
|
||||
chosenModalTrainId?: string;
|
||||
modalLastClickedTarget: EventTarget | null;
|
||||
currentLocale: string;
|
||||
isMigrateInfoCardOpen: boolean;
|
||||
}
|
||||
|
||||
export interface StationJSONData {
|
||||
|
||||
@@ -13,6 +13,16 @@
|
||||
</div>
|
||||
|
||||
<div class="topbar-links">
|
||||
<button
|
||||
v-if="isOldStacjownikDomain"
|
||||
class="btn--image migrate-info-button"
|
||||
@click="toggleMigrateInfoCard(true)"
|
||||
data-tooltip-type="HtmlTooltip"
|
||||
:data-tooltip-content="`<b>${$t('migrate-info.tooltip-content')}</b>`"
|
||||
>
|
||||
<img :src="`/images/icon-alert-triangle.svg`" alt="show migrate info card" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="btn--image lang-button"
|
||||
@click="toggleLocales()"
|
||||
@@ -110,9 +120,19 @@ export default defineComponent({
|
||||
this.isDonationCardOpen = value;
|
||||
},
|
||||
|
||||
toggleMigrateInfoCard(value: boolean) {
|
||||
this.mainStore.isMigrateInfoCardOpen = value;
|
||||
},
|
||||
|
||||
toggleLocales() {
|
||||
this.mainStore.changeLocale(this.mainStore.currentLocale == 'pl' ? 'en' : 'pl');
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
isOldStacjownikDomain() {
|
||||
return location.hostname == 'stacjownik-td2.web.app';
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -136,11 +156,12 @@ export default defineComponent({
|
||||
|
||||
.stations-topbar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5em;
|
||||
justify-content: space-between;
|
||||
|
||||
position: relative;
|
||||
margin-bottom: 0.5em;
|
||||
position: relative;
|
||||
|
||||
& > div {
|
||||
display: flex;
|
||||
@@ -170,6 +191,11 @@ button.lang-button {
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
button.migrate-info-button {
|
||||
padding: 0 0.5em;
|
||||
background-color: var(--clr-primary);
|
||||
}
|
||||
|
||||
a.pojazdownik-link {
|
||||
background-color: #1f263b;
|
||||
|
||||
|
||||
+1
-10
@@ -39,14 +39,5 @@ export default defineConfig({
|
||||
},
|
||||
devOptions: { enabled: true, suppressWarnings: true }
|
||||
})
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
entryFileNames: 'app-[name].js',
|
||||
assetFileNames: 'app-[name].css',
|
||||
chunkFileNames: 'chunk-[name].js'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user