Skip to content

Commit

Permalink
feat(nuxt-auth): add new layout auth
Browse files Browse the repository at this point in the history
  • Loading branch information
gravitano committed Feb 22, 2023
1 parent ddc09ea commit 337abfa
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
5 changes: 5 additions & 0 deletions starter/nuxt-auth/layouts/auth.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<AuthLayout>
<slot />
</AuthLayout>
</template>
5 changes: 2 additions & 3 deletions starter/nuxt-auth/pages/auth/forgot-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
definePageMeta({
auth: false,
middleware: 'guest',
layout: 'auth',
});
const appConfig = useAppConfig();
Expand All @@ -10,7 +11,5 @@ useHead(appConfig.auth.forgotPassword.head);
</script>

<template>
<AuthLayout>
<AuthForgotPassword />
</AuthLayout>
<AuthForgotPassword />
</template>
5 changes: 2 additions & 3 deletions starter/nuxt-auth/pages/auth/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
definePageMeta({
auth: false,
middleware: 'guest',
layout: 'auth',
});
const appConfig = useAppConfig();
Expand All @@ -10,7 +11,5 @@ useHead(appConfig.auth.login.head);
</script>

<template>
<AuthLayout>
<AuthLogin />
</AuthLayout>
<AuthLogin />
</template>
5 changes: 2 additions & 3 deletions starter/nuxt-auth/pages/auth/register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
definePageMeta({
auth: false,
middleware: 'guest',
layout: 'auth',
});
const appConfig = useAppConfig();
Expand All @@ -10,7 +11,5 @@ useHead(appConfig.auth.register.head);
</script>

<template>
<AuthLayout>
<AuthRegister />
</AuthLayout>
<AuthRegister />
</template>
2 changes: 0 additions & 2 deletions starter/nuxt-auth/pages/protected.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<script setup lang="ts">
const appConfig = useAppConfig();
useHead({
title: 'Protected',
meta: [
Expand Down

0 comments on commit 337abfa

Please sign in to comment.