You've already forked isop-mirror
feat: add middleware definitions for pages
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { User } from '~/types/user';
|
import type { User } from '~/types/user';
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:auth', 'admin-only'],
|
||||||
|
});
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
title: "Portál administrátora | ISOP",
|
title: "Portál administrátora | ISOP",
|
||||||
ogTitle: "Portál administrátora",
|
ogTitle: "Portál administrátora",
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { User } from '~/types/user';
|
import type { User } from '~/types/user';
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:auth', 'company-only'],
|
||||||
|
});
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
title: "Portál firmy | ISOP",
|
title: "Portál firmy | ISOP",
|
||||||
ogTitle: "Portál firmy",
|
ogTitle: "Portál firmy",
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
import { Role } from '~/types/role';
|
import { Role } from '~/types/role';
|
||||||
import type { User } from '~/types/user';
|
import type { User } from '~/types/user';
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:auth'],
|
||||||
|
});
|
||||||
|
|
||||||
const user = useSanctumUser<User>();
|
const user = useSanctumUser<User>();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { User } from '~/types/user';
|
import type { User } from '~/types/user';
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:auth', 'student-only'],
|
||||||
|
});
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
title: "Portál študenta | ISOP",
|
title: "Portál študenta | ISOP",
|
||||||
ogTitle: "Portál študenta",
|
ogTitle: "Portál študenta",
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
import { FetchError } from 'ofetch';
|
import { FetchError } from 'ofetch';
|
||||||
const { login } = useSanctumAuth();
|
const { login } = useSanctumAuth();
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:guest'],
|
||||||
|
});
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
title: "Prihlásenie | ISOP",
|
title: "Prihlásenie | ISOP",
|
||||||
ogTitle: "Prihlásenie",
|
ogTitle: "Prihlásenie",
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
import { NewRole } from '~/types/role';
|
import { NewRole } from '~/types/role';
|
||||||
import type { NewUser } from '~/types/user';
|
import type { NewUser } from '~/types/user';
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:guest'],
|
||||||
|
});
|
||||||
|
|
||||||
const client = useSanctumClient();
|
const client = useSanctumClient();
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:guest'],
|
||||||
|
});
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
title: "Registrácia | ISOP",
|
title: "Registrácia | ISOP",
|
||||||
ogTitle: "Registrácia",
|
ogTitle: "Registrácia",
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
import { NewRole } from '~/types/role';
|
import { NewRole } from '~/types/role';
|
||||||
import type { NewUser } from '~/types/user';
|
import type { NewUser } from '~/types/user';
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:guest'],
|
||||||
|
});
|
||||||
|
|
||||||
const client = useSanctumClient();
|
const client = useSanctumClient();
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { FetchError } from 'ofetch';
|
import { FetchError } from 'ofetch';
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
middleware: ['sanctum:guest'],
|
||||||
|
});
|
||||||
|
|
||||||
useSeoMeta({
|
useSeoMeta({
|
||||||
title: "Reset hesla | ISOP",
|
title: "Reset hesla | ISOP",
|
||||||
ogTitle: "Reset hesla",
|
ogTitle: "Reset hesla",
|
||||||
|
|||||||
Reference in New Issue
Block a user