Enable the Vue 3 front-end

This commit is contained in:
Bubka
2023-12-01 15:29:26 +01:00
parent ffde1723d4
commit 9efb54adf4
146 changed files with 2000 additions and 9387 deletions

View File

@@ -0,0 +1,17 @@
/**
* Allows an authenticated user to access the main view only if he owns at least one twofaccount.
* Push to the starter view otherwise.
*/
export default async function starter({ to, next, nextMiddleware, stores }) {
const { twofaccounts } = stores
if (twofaccounts.isEmpty) {
await twofaccounts.fetch().then(() => {
if (twofaccounts.isEmpty) {
next({ name: 'start' })
}
else nextMiddleware()
})
}
else nextMiddleware()
}