Files
speckle-server/packages/frontend-2/components/header/NavBar.vue
T
andrewwallacespeckle 91cb011ded feat(fe2): New user onboarding flow (#3932)
* CodeInput. verify-email page

* middleware

* Loading toast

* Countdown only for registration

* Improve middleware

* Fix middleware breaking auth flow

* Remove old notifications

* Remove old onboarding. New segmentation

* Remove skip button

* Block verify email when verified

* useUserEmails composable. Cancel addition

* Move user emails queries

* Fix fragments etc

* redirect updates

* HeaderWithEmptyPage

* Check env before enforcing

* Join workspace

* Updates

* Fix console warnings on login

* Fix register console warnings

* Working cache updates

* Verify secondary email

* Force onboarding off

* EMAIL WIP

* useIsJustRegistered state

* Improve isRequired

* Uneeded change

* Improved slots

* Updates from CR

* CR comments

* Only show message if forced

* Update onboarding middleware

* Update loading bar

* ref > computed to fix onboarding

* Resend tooltip. Better errors

* Add other to form.

* Email changes

* Updates to emails

* Remove force email FF

* Remove FF's

* Hide header on embed

* Update graphql.ts

* Re-add FF

* Update graphql.ts

* GQL Fragments

* Fix build
2025-02-14 10:20:14 +00:00

57 lines
1.7 KiB
Vue

<template>
<div>
<nav class="fixed z-40 top-0 h-12 bg-foundation border-b border-outline-2">
<div
class="flex gap-4 items-center justify-between h-full w-screen py-4 px-3 sm:px-4"
>
<HeaderLogoBlock :active="false" to="/" class="hidden lg:flex lg:min-w-40" />
<div class="flex items-center truncate">
<ClientOnly>
<PortalTarget name="mobile-navigation"></PortalTarget>
</ClientOnly>
<ClientOnly>
<PortalTarget name="navigation"></PortalTarget>
</ClientOnly>
</div>
<div class="flex items-center justify-end gap-2.5 sm:gap-2 lg:min-w-40">
<ClientOnly>
<PortalTarget name="secondary-actions"></PortalTarget>
<PortalTarget name="primary-actions"></PortalTarget>
</ClientOnly>
<FormButton
v-if="!activeUser"
:to="loginUrl.fullPath"
color="outline"
class="hidden md:flex"
>
Sign in
</FormButton>
<!-- Profile dropdown -->
<HeaderNavUserMenu :login-url="loginUrl" />
</div>
</div>
</nav>
<PopupsSignIn v-if="!activeUser" />
</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
}
})
)
</script>