Commit a17fa9b5 authored by anton's avatar anton

Add legacy warning message

parent f8468920
Pipeline #50853 passed with stage
in 5 minutes and 28 seconds
<template lang="pug">
div
q-alert.q-mb-lg(v-if="visible" color="warning" icon="warning" :actions="actions" class="q-mb-sm")
| {{ $t('messages.legacy_site_migration') }}
q-btn(@click="gotoLegacySite" flat) {{ migrationURL }}
</template>
<script>
import { openURL } from 'quasar'
export default {
name: 'MigrationWarning',
data () {
return {
migrationURL: process.env.MIGRATION_PREVIOUS_URL,
visible: !localStorage.getItem('mb_alert_migration_warning')
}
},
methods: {
dismiss () {
localStorage.setItem('mb_alert_migration_warning', 1)
this.visible = false
},
gotoLegacySite () {
openURL(this.migrationURL)
}
},
computed: {
actions () {
const actions = [
{ label: this.$t('buttons.do_not_show_again'), handler: this.dismiss }
]
if (process.env.MIGRATION_PREVIOUS_INFO_URL) {
actions.unshift({
label: this.$t('buttons.more_info'),
handler: () => openURL(process.env.MIGRATION_PREVIOUS_INFO_URL)
})
}
return actions
}
}
}
</script>
<style scoped>
</style>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment