Skip to content

Commit e297ab2

Browse files
committed
Display migration notice on the old domain
1 parent 137b569 commit e297ab2

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

website/.env.sample

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ VUE_APP_SENTRY_ENABLED=true
1212
VUE_APP_SENTRY_MAX_BREADCRUMBS=100
1313
VUE_APP_SENTRY_SAMPLE_RATE=0.1
1414
VUE_APP_SENTRY_TRACING_ORIGINS=api.gimvicurnik.filips.si
15+
16+
VUE_APP_MIGRATION_DISPLAY=true
17+
VUE_APP_MIGRATION_TARGET=https://urnik.gimvic.org/
18+
VUE_APP_MIGRATION_INSTRUCTIONS=https://github.com/filips123/GimVicUrnik/wiki#namestitev

website/src/App.vue

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
</v-container>
5050
</v-main>
5151

52+
<v-dialog v-model="migrationNoticeDialog" width="35rem">
53+
<migration-notice v-if="migrationNoticeDialog" @closeDialog=closeMigrationNoticeDialog />
54+
</v-dialog>
55+
5256
<v-snackbar v-model="isSnackbarDisplayed">
5357
{{ snackbarMessage }}
5458

@@ -112,12 +116,14 @@ import { mdiCog, mdiRss } from '@mdi/js'
112116
import PullToRefresh from 'pulltorefreshjs'
113117
import { Component, Vue } from 'vue-property-decorator'
114118
119+
import MigrationNotice from '@/components/base/MigrationNotice.vue'
115120
import { SettingsModule, ThemeType } from '@/store/modules/settings'
116121
import { updateAllData } from '@/store/modules/storage'
117122
import { displaySnackbar, hideSnackbar } from '@/utils/snackbar'
118123
119124
@Component({
120125
components: {
126+
MigrationNotice,
121127
ViewNavigationDesktop: () => import(/* webpackChunkName: "desktop" */ '@/components/navigation/ViewNavigationDesktop.vue'),
122128
ViewNavigationMobile: () => import(/* webpackChunkName: "mobile" */ '@/components/navigation/ViewNavigationMobile.vue'),
123129
DayNavigation: () => import(/* webpackChunkName: "mobile" */ '@/components/navigation/DayNavigation.vue')
@@ -132,6 +138,8 @@ export default class App extends Vue {
132138
isNavigationDisplayed = true
133139
isDayMenuDisplayed = false
134140
141+
migrationNoticeDialog = process.env.VUE_APP_MIGRATION_DISPLAY
142+
135143
isSnackbarDisplayed = false
136144
snackbarMessage = ''
137145
snackbarButton = ''
@@ -258,5 +266,9 @@ export default class App extends Vue {
258266
setDayMenuDisplay (isDayMenuDisplayed: boolean): void {
259267
this.isDayMenuDisplayed = isDayMenuDisplayed
260268
}
269+
270+
closeMigrationNoticeDialog (): void {
271+
this.migrationNoticeDialog = false
272+
}
261273
}
262274
</script>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<template>
2+
<v-card width="35rem">
3+
<v-toolbar class="text-uppercase" color="#009300" dark>
4+
Nov naslov spletne aplikacije
5+
</v-toolbar>
6+
7+
<v-card-text class="text--primary pt-6 mb-n6">
8+
<p>
9+
S šolskim letom 2022/23 bo spletna aplikacija {{ title }} dostopna na naslovu <a :href="target" target="_blank">{{ target }}</a>.
10+
</p>
11+
<p>
12+
Trenutno različico boste morali odstraniti ter aplikacijo ponovno namestiti iz novega naslova. Navodila za namestitev
13+
so dostopna v <a :href="instructions" target="_blank">dokumentaciji projekta</a>.
14+
</p>
15+
<p>
16+
Podatki na obstoječi različici se bodo prenehali posodabljati, sčasoma pa bo ukinjena, zato prehod na novo opravite čim prej.
17+
Nova različica ohranja vse funkcionalnosti obstoječe, dodaja pa tudi nekatere novosti in izboljšanje stabilnosti.
18+
</p>
19+
</v-card-text>
20+
21+
<v-card-actions class="justify-end">
22+
<v-btn color="green" text v-on:click=closeDialog>Skrij obvestilo</v-btn>
23+
</v-card-actions>
24+
</v-card>
25+
</template>
26+
27+
<script lang="ts">
28+
import { Component, Vue } from 'vue-property-decorator'
29+
30+
@Component
31+
export default class MigrationNotice extends Vue {
32+
title = process.env.VUE_APP_TITLE
33+
target = process.env.VUE_APP_MIGRATION_TARGET
34+
instructions = process.env.VUE_APP_MIGRATION_INSTRUCTIONS
35+
36+
closeDialog (): void {
37+
this.$emit('closeDialog')
38+
}
39+
}
40+
</script>

0 commit comments

Comments
 (0)