Fix: Various workspace wizard fixes (#3705)

This commit is contained in:
Mike
2024-12-17 13:10:30 +01:00
committed by GitHub
parent cb134f3b14
commit 09e93562d1
4 changed files with 16 additions and 14 deletions
@@ -2,7 +2,12 @@
<div class="bg-foundation-page">
<nav class="fixed z-40 top-0 h-12 bg-foundation border-b border-outline-2">
<div class="flex items-center justify-between h-full w-screen py-4 px-3 sm:px-4">
<HeaderLogoBlock :active="false" to="/" class="min-w-40" />
<HeaderLogoBlock
:active="false"
class="min-w-40 cursor-pointer"
no-link
@click="onCancelClick"
/>
<FormButton size="sm" color="outline" @click="onCancelClick">Cancel</FormButton>
</div>
</nav>
@@ -31,7 +36,7 @@ defineProps<{
workspaceId?: string
}>()
const { currentStep } = useWorkspacesWizard()
const { currentStep, resetWizardState } = useWorkspacesWizard()
const isCancelDialogOpen = ref(false)
@@ -40,6 +45,7 @@ const isFirstStep = computed(() => currentStep.value === WizardSteps.Details)
const onCancelClick = () => {
if (isFirstStep.value) {
navigateTo(workspacesRoute)
resetWizardState()
} else {
isCancelDialogOpen.value = true
}
@@ -70,12 +70,14 @@ const onAddInvite = () => {
}
const onSubmit = handleSubmit(() => {
state.value.invites = fields.value
const validInvites = fields.value
.filter((field) => !!field)
.map((field) => field.value)
state.value.invites = validInvites
mixpanel.track('Workspace Invites Step Completed', {
inviteCount: state.value.invites.length
inviteCount: validInvites
})
goToNextStep()
@@ -176,11 +176,6 @@ export function useCreateProject() {
title: 'Project creation failed',
description: err
})
} else {
triggerNotification({
type: ToastNotificationType.Success,
title: 'Project successfully created'
})
}
return newProject
@@ -56,15 +56,14 @@
{{ notification.description }}
</p>
<div v-if="notification.cta">
<FormButton
class="mt-1"
color="subtle"
<TextLink
class="mt-1 color-primary"
:to="notification.cta.url"
size="sm"
@click="(e: MouseEvent) => onCtaClick(notification, e)"
>
{{ notification.cta.title }}
</FormButton>
</TextLink>
</div>
</div>
<div class="ml-2 flex-shrink-0 mt-0.5">
@@ -84,7 +83,7 @@
</div>
</template>
<script setup lang="ts">
import FormButton from '~~/src/components/common/text/Link.vue'
import TextLink from '~~/src/components/common/text/Link.vue'
import {
CheckCircleIcon,
XCircleIcon,