mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
chore(app): removed migration info card & obsolete data
This commit is contained in:
-18
@@ -50,7 +50,6 @@ import AppWelcomeCard from './components/App/AppWelcomeCard.vue';
|
||||
|
||||
const STORAGE_VERSION_KEY = 'app_version';
|
||||
const WELCOME_CARD_SEEN_KEY = 'welcome_card_seen';
|
||||
const MIGRATE_INFO_CARD_SEEN_KEY = 'migrate_info_card_seen';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@@ -92,7 +91,6 @@ export default defineComponent({
|
||||
this.setupOfflineHandling();
|
||||
this.checkAppVersion();
|
||||
this.handleQueries();
|
||||
this.handleMigrateInfo();
|
||||
|
||||
this.apiStore.setupAPIData();
|
||||
},
|
||||
@@ -103,10 +101,6 @@ export default defineComponent({
|
||||
if (query.get('welcomeCard') == '1') {
|
||||
this.isWelcomeCardOpen = true;
|
||||
}
|
||||
|
||||
if (query.get('migrateCard') == '1') {
|
||||
this.store.isMigrateInfoCardOpen = true;
|
||||
}
|
||||
},
|
||||
|
||||
async checkAppVersion() {
|
||||
@@ -165,13 +159,6 @@ export default defineComponent({
|
||||
this.apiStore.connectToAPI();
|
||||
},
|
||||
|
||||
handleMigrateInfo() {
|
||||
if (location.hostname != 'stacjownik-td2.web.app') return;
|
||||
if (StorageManager.getBooleanValue(MIGRATE_INFO_CARD_SEEN_KEY) === true) return;
|
||||
|
||||
this.store.isMigrateInfoCardOpen = true;
|
||||
},
|
||||
|
||||
loadLang() {
|
||||
const storageLang = StorageManager.getStringValue('lang');
|
||||
|
||||
@@ -193,11 +180,6 @@ export default defineComponent({
|
||||
closeWelcomeCard() {
|
||||
this.isWelcomeCardOpen = false;
|
||||
StorageManager.setBooleanValue(WELCOME_CARD_SEEN_KEY, true);
|
||||
},
|
||||
|
||||
closeMigrateInfoCard() {
|
||||
this.store.isMigrateInfoCardOpen = false;
|
||||
StorageManager.setBooleanValue(MIGRATE_INFO_CARD_SEEN_KEY, true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
<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>
|
||||
@@ -23,15 +23,6 @@
|
||||
"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,14 +23,6 @@
|
||||
"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!",
|
||||
|
||||
@@ -30,8 +30,6 @@ export const useMainStore = defineStore('mainStore', {
|
||||
|
||||
modalLastClickedTarget: null,
|
||||
currentLocale: 'pl',
|
||||
|
||||
isMigrateInfoCardOpen: false
|
||||
}) as MainStoreState,
|
||||
|
||||
actions: {
|
||||
|
||||
@@ -8,7 +8,6 @@ export interface MainStoreState {
|
||||
chosenModalTrainId?: string;
|
||||
modalLastClickedTarget: EventTarget | null;
|
||||
currentLocale: string;
|
||||
isMigrateInfoCardOpen: boolean;
|
||||
}
|
||||
|
||||
export interface StationJSONData {
|
||||
|
||||
@@ -13,16 +13,6 @@
|
||||
</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()"
|
||||
@@ -129,19 +119,9 @@ 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>
|
||||
@@ -200,11 +180,6 @@ 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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user