Files
speckle-server/packages/frontend-2/components/error/page/GenericUnauthorizedBlock.vue
T
Kristaps Fabians Geikins 6bfffca0a9 fix: various invite flow fixes & improvements (#2451)
* fix(fe2): show signup CTA for non-registered invitees [web-1144]

* fix: server invite signup error

* WIP project error access block

* feat(fe2): better 'no project access' error screens

* CR fix
2024-06-28 17:26:11 +02:00

46 lines
1.1 KiB
Vue

<template>
<div class="flex flex-col space-y-8 mt-12">
<div class="flex flex-col justify-center sm:flex-row sm:space-x-2 items-center">
<LockClosedIcon class="w-12 h-12 text-primary shrink-0" />
<h1 class="h3 font-bold">You are not authorized to access this project.</h1>
</div>
<div
class="flex flex-col space-y-2 sm:space-y-0 sm:flex-row sm:space-x-2 items-center"
>
<FormButton
v-if="!isLoggedIn"
size="lg"
full-width
color="default"
@click="() => goToLogin()"
>
Sign In
</FormButton>
<FormButton
size="lg"
full-width
:color="isLoggedIn ? 'default' : 'secondary'"
:to="homeRoute"
>
Go Home
</FormButton>
</div>
</div>
</template>
<script setup lang="ts">
import { LockClosedIcon } from '@heroicons/vue/24/solid'
import { useRememberRouteAndGoToLogin, homeRoute } from '~/lib/common/helpers/route'
withDefaults(
defineProps<{
resourceType: string
}>(),
{
resourceType: 'project'
}
)
const { isLoggedIn } = useActiveUser()
const goToLogin = useRememberRouteAndGoToLogin()
</script>