Try first view support

This commit is contained in:
Johannes Zellner
2024-11-01 14:16:09 +01:00
parent e536c94028
commit 0513ed16bb
5 changed files with 159 additions and 4 deletions

View File

@@ -0,0 +1,57 @@
<template>
<div>
<SupportView v-if="view === VIEWS.SUPPORT"></SupportView>
</div>
</template>
<script>
import SupportView from './SupportView.vue';
const VIEWS = {
SUPPORT: 'support'
};
export default {
name: 'Index',
components: {
SupportView
},
data() {
return {
VIEWS,
accessToken: localStorage.token,
view: ''
};
},
methods: {
},
async mounted() {
if (!localStorage.token) {
console.error('Set localStorage.token');
return;
}
const that = this;
function onHashChange() {
const view = location.hash.slice(2);
if (view === VIEWS.SUPPORT) {
that.view = VIEWS.SUPPORT;
} else {
that.view = '';
}
}
window.addEventListener('hashchange', onHashChange);
onHashChange();
console.log('Indexvue mounted')
}
};
</script>
<style>
</style>