Layout refactor (#150)

* Revert recent commits

* Move things around, and do preparation work for nested page systems.

* Fixed issue on side bar not appearing
This commit is contained in:
Redblueflame
2021-03-31 19:09:18 +02:00
committed by GitHub
parent e80a5d82a4
commit af8fc53704
29 changed files with 100 additions and 152 deletions

View File

@@ -6,14 +6,10 @@ export default async function (context) {
}
if (context.route.query.code) {
const date = new Date()
date.setFullYear(new Date().getFullYear() + 1)
context.app.$cookies.set('auth-token', context.route.query.code, {
secure: true,
sameSite: 'Strict',
httpOnly: true,
expires: date,
})
await context.store.dispatch('auth/fetchUser', {
@@ -36,7 +32,7 @@ export default async function (context) {
if (!context.$auth.user) {
return context.redirect(
`https://api.modrinth.com/api/v1/auth/init?url=https://modrinth.com${context.route.path}`
`https://api.modrinth.com/api/v1/auth/init?url=https://modrinth.com${context.route.fullPath}`
)
}
}