chore: update @ciphera-net/ui dependency to version 0.0.49 and refactor terminology in layout content for consistency

This commit is contained in:
Usman Baig
2026-02-09 09:51:19 +01:00
parent 309ba53ec7
commit 03fcfba180
5 changed files with 19 additions and 11 deletions

View File

@@ -36,7 +36,9 @@ function AuthCallbackContent() {
if (localStorage.getItem('pulse_pending_checkout')) {
router.push('/welcome')
} else {
router.push('/')
const raw = searchParams.get('returnTo') || '/'
const safe = (typeof raw === 'string' && raw.startsWith('/') && !raw.startsWith('//')) ? raw : '/'
router.push(safe)
}
} else {
setError(authMessageFromErrorType(result.error as AuthErrorType))

View File

@@ -26,7 +26,7 @@ export default function LayoutContent({ children }: { children: React.ReactNode
}
}, [auth.user])
const handleSwitchWorkspace = async (orgId: string | null) => {
const handleSwitchOrganization = async (orgId: string | null) => {
if (!orgId) return // Pulse doesn't support personal workspace
try {
const { access_token } = await switchContext(orgId)
@@ -56,9 +56,9 @@ export default function LayoutContent({ children }: { children: React.ReactNode
appName="Pulse"
orgs={orgs}
activeOrgId={auth.user?.org_id}
onSwitchWorkspace={handleSwitchWorkspace}
onSwitchOrganization={handleSwitchOrganization}
onCreateOrganization={handleCreateOrganization}
allowPersonalWorkspace={false}
allowPersonalOrganization={false}
showFaq={false}
showSecurity={false}
showPricing={true}

View File

@@ -686,9 +686,15 @@ function WelcomeContent() {
variant="primary"
className="flex-1"
disabled={siteLoading || !siteName.trim() || !siteDomain.trim()}
isLoading={siteLoading}
>
Add site
{siteLoading ? (
<>
<span className="inline-block h-4 w-4 border-2 border-current border-t-transparent rounded-full animate-spin mr-2" aria-hidden />
Adding...
</>
) : (
'Add site'
)}
</Button>
<Button
type="button"