4dae1569cd
* list invites table * invites list works * update last reminded date on resend * fix FE * WIP invitedialog + updated debounced utility * invite create works * exclude users correctly * more adjustments * minor cleanup * using workspace invite server role * test fix * fixed multiple root eslint issues * minor adjustments
69 lines
2.0 KiB
Vue
69 lines
2.0 KiB
Vue
<template>
|
|
<div>
|
|
<nav class="fixed z-40 top-0 h-14 bg-foundation border-b border-outline-2">
|
|
<div
|
|
class="flex gap-4 items-center justify-between h-full w-screen py-4 pl-3 pr-4"
|
|
>
|
|
<div class="flex items-center truncate">
|
|
<HeaderLogoBlock :active="false" to="/" />
|
|
<HeaderNavLink
|
|
to="/"
|
|
name="Dashboard"
|
|
:separator="true"
|
|
class="hidden md:inline-block"
|
|
/>
|
|
<ClientOnly>
|
|
<PortalTarget name="navigation"></PortalTarget>
|
|
</ClientOnly>
|
|
</div>
|
|
<div class="flex items-center gap-2.5 sm:gap-2">
|
|
<ClientOnly>
|
|
<PortalTarget name="secondary-actions"></PortalTarget>
|
|
<PortalTarget name="primary-actions"></PortalTarget>
|
|
</ClientOnly>
|
|
<!-- Notifications dropdown -->
|
|
<HeaderNavNotifications v-if="hasNotifications" />
|
|
<FormButton
|
|
v-if="!activeUser"
|
|
:to="loginUrl.fullPath"
|
|
color="outline"
|
|
class="hidden md:flex"
|
|
>
|
|
Sign in
|
|
</FormButton>
|
|
<!-- Profile dropdown -->
|
|
<HeaderNavUserMenu :login-url="loginUrl" />
|
|
</div>
|
|
</div>
|
|
<PopupsSignIn v-if="!activeUser" />
|
|
</nav>
|
|
<div class="h-16"></div>
|
|
</div>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { useActiveUser } from '~~/lib/auth/composables/activeUser'
|
|
import { loginRoute } from '~~/lib/common/helpers/route'
|
|
import type { Optional } from '@speckle/shared'
|
|
|
|
const { activeUser } = useActiveUser()
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
|
|
const token = computed(() => route.query.token as Optional<string>)
|
|
|
|
const loginUrl = computed(() =>
|
|
router.resolve({
|
|
path: loginRoute,
|
|
query: {
|
|
token: token.value || undefined
|
|
}
|
|
})
|
|
)
|
|
|
|
const hasNotifications = computed(() => {
|
|
if (!activeUser.value) return false
|
|
if (!activeUser.value?.verified) return true
|
|
return false
|
|
})
|
|
</script>
|