Mainification: Bring Onboarding in from rh-test (#6564)

## Summary

Migrate the onboarding / login / sign-up / survey pieces from `rh-test`
to `main`.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6564-WIP-Bring-Onboarding-in-from-rh-test-2a16d73d365081318483f993e3ca0f89)
by [Unito](https://www.unito.io)

---------

Co-authored-by: Jin Yi <jin12cc@gmail.com>
Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Alexander Brown
2025-11-04 16:48:58 -08:00
committed by GitHub
parent 47688fe363
commit 693fbbd3e4
30 changed files with 2295 additions and 37 deletions

View File

@@ -0,0 +1,97 @@
<template>
<div class="flex h-full items-center justify-center p-6">
<div class="max-w-[100vw] text-center lg:w-[500px]">
<h2 class="mb-3 text-xl text-text-primary">
{{ $t('cloudOnboarding.authTimeout.title') }}
</h2>
<p class="mb-5 text-muted">
{{ $t('cloudOnboarding.authTimeout.message') }}
</p>
<!-- Troubleshooting Section -->
<div
class="mb-4 rounded bg-surface-700 px-3 py-2 text-left dark-theme:bg-surface-800"
>
<h3 class="mb-2 text-sm font-semibold text-text-primary">
{{ $t('cloudOnboarding.authTimeout.troubleshooting') }}
</h3>
<ul class="space-y-1.5 text-sm text-muted">
<li
v-for="(cause, index) in $tm('cloudOnboarding.authTimeout.causes')"
:key="index"
class="flex gap-2"
>
<span></span>
<span>{{ cause }}</span>
</li>
</ul>
</div>
<!-- Technical Details (Collapsible) -->
<div v-if="errorMessage" class="mb-4 text-left">
<button
class="flex w-full items-center justify-between rounded bg-surface-600 px-4 py-2 text-sm text-muted transition-colors hover:bg-surface-500 dark-theme:bg-surface-700 dark-theme:hover:bg-surface-600"
@click="showTechnicalDetails = !showTechnicalDetails"
>
<span>{{ $t('cloudOnboarding.authTimeout.technicalDetails') }}</span>
<i
:class="[
'pi',
showTechnicalDetails ? 'pi-chevron-up' : 'pi-chevron-down'
]"
></i>
</button>
<div
v-if="showTechnicalDetails"
class="mt-2 rounded bg-surface-800 p-4 font-mono text-xs text-muted break-all dark-theme:bg-surface-900"
>
{{ errorMessage }}
</div>
</div>
<!-- Helpful Links -->
<p class="mb-5 text-center text-sm text-gray-600">
{{ $t('cloudOnboarding.authTimeout.helpText') }}
<a
href="https://support.comfy.org"
class="cursor-pointer text-blue-400 no-underline"
target="_blank"
rel="noopener noreferrer"
>
{{ $t('cloudOnboarding.authTimeout.supportLink') }}</a
>.
</p>
<div class="flex flex-col gap-3">
<Button
:label="$t('cloudOnboarding.authTimeout.restart')"
class="w-full"
@click="handleRestart"
/>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import Button from 'primevue/button'
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { useFirebaseAuthActions } from '@/composables/auth/useFirebaseAuthActions'
interface Props {
errorMessage?: string
}
defineProps<Props>()
const router = useRouter()
const { logout } = useFirebaseAuthActions()
const showTechnicalDetails = ref(false)
const handleRestart = async () => {
await logout()
await router.replace({ name: 'cloud-login' })
}
</script>