Add help page link to footer
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
<v-row justify="center" no-gutters>
|
<v-row justify="center" no-gutters>
|
||||||
<v-col cols="12" class="text-center">
|
<v-col cols="12" class="text-center">
|
||||||
<span class="text-caption">© {{ new Date().getFullYear() }}</span>
|
<span class="text-caption">© {{ new Date().getFullYear() }}</span>
|
||||||
|
<v-btn dark small text rounded :to="{ name: 'help' }">FAQ</v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
</v-footer>
|
</v-footer>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
export default function ({ $auth, store, route, redirect }) {
|
export default function ({ $auth, store, route, redirect }) {
|
||||||
|
const noAuthRoutes = ['login', 'help']
|
||||||
// If Firebase Auth hasn't been initialized yet, redirect to index page
|
// If Firebase Auth hasn't been initialized yet, redirect to index page
|
||||||
if (!store.state.firebaseInitialized && route.name !== 'index') {
|
if (!store.state.firebaseInitialized && route.name !== 'index') {
|
||||||
return redirect({ name: 'index' })
|
return redirect({ name: 'index' })
|
||||||
}
|
}
|
||||||
// If the user attempts to access any site other than the login page without being logged in,
|
// If the user attempts to access any site other than those defined in noAuthRoutes without being logged in,
|
||||||
// redirect to login page
|
// redirect to login page
|
||||||
else if (store.state.firebaseInitialized && (!$auth.currentUser && route.name !== 'login')) {
|
else if (store.state.firebaseInitialized && (!$auth.currentUser && !noAuthRoutes.includes(route.name))) {
|
||||||
return redirect({ name: 'login' })
|
return redirect({ name: 'login' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user