diff --git a/packages/frontend/core/src/components/affine/ai-onboarding/general.dialog.css.ts b/packages/frontend/core/src/components/affine/ai-onboarding/general.dialog.css.ts index a2e5e9617133e..c9f2ce0841b17 100644 --- a/packages/frontend/core/src/components/affine/ai-onboarding/general.dialog.css.ts +++ b/packages/frontend/core/src/components/affine/ai-onboarding/general.dialog.css.ts @@ -60,7 +60,7 @@ export const title = style({ color: cssVar('textPrimaryColor'), }); export const description = style({ - fontSize: cssVar('fontBase'), + fontSize: cssVar('fontSm'), lineHeight: '24px', minHeight: 48, fontWeight: 400, @@ -94,7 +94,7 @@ export const privacyLink = style({ export const footer = style({ width: '100%', - padding: '20px 28px', + padding: '20px 28px 20px 24px', gap: 12, display: 'flex', justifyContent: 'space-between', diff --git a/packages/frontend/core/src/components/affine/ai-onboarding/general.dialog.tsx b/packages/frontend/core/src/components/affine/ai-onboarding/general.dialog.tsx index 5d65399ff9e86..5191df7a28dd2 100644 --- a/packages/frontend/core/src/components/affine/ai-onboarding/general.dialog.tsx +++ b/packages/frontend/core/src/components/affine/ai-onboarding/general.dialog.tsx @@ -215,6 +215,7 @@ export const AIOnboardingGeneral = ({ activeIndex={index} itemRenderer={descriptionRenderer} transitionDuration={500} + preload={5} /> diff --git a/packages/frontend/core/src/components/affine/ai-onboarding/local.dialog.css.ts b/packages/frontend/core/src/components/affine/ai-onboarding/local.dialog.css.ts index d260ab953a243..e226324ac0916 100644 --- a/packages/frontend/core/src/components/affine/ai-onboarding/local.dialog.css.ts +++ b/packages/frontend/core/src/components/affine/ai-onboarding/local.dialog.css.ts @@ -1,5 +1,5 @@ import { cssVar } from '@toeverything/theme'; -import { style } from '@vanilla-extract/css'; +import { globalStyle, style } from '@vanilla-extract/css'; export const card = style({ borderRadius: 12, @@ -34,7 +34,15 @@ export const footerActions = style({ marginTop: 8, }); +globalStyle(`${footerActions} > *, ${footerActions}`, { + color: `${cssVar('textSecondaryColor')} !important`, +}); +globalStyle(`${footerActions} > *:last-child`, { + color: `${cssVar('textPrimaryColor')} !important`, +}); + export const actionButton = style({ fontSize: cssVar('fontSm'), padding: '0 2px', + color: 'inherit !important', }); diff --git a/packages/frontend/core/src/components/affine/ai-onboarding/local.dialog.tsx b/packages/frontend/core/src/components/affine/ai-onboarding/local.dialog.tsx index 367619535e84d..62b3c32ef0e76 100644 --- a/packages/frontend/core/src/components/affine/ai-onboarding/local.dialog.tsx +++ b/packages/frontend/core/src/components/affine/ai-onboarding/local.dialog.tsx @@ -1,4 +1,9 @@ import { Button, notify } from '@affine/component'; +import { + RouteLogic, + useNavigateHelper, +} from '@affine/core/hooks/use-navigate-helper'; +import { AuthService } from '@affine/core/modules/cloud'; import { WorkspaceFlavour } from '@affine/env/workspace'; import { useAFFiNEI18N } from '@affine/i18n/hooks'; import { AiIcon } from '@blocksuite/icons'; @@ -27,20 +32,30 @@ const LocalOnboardingAnimation = () => { const FooterActions = ({ onDismiss }: { onDismiss: () => void }) => { const t = useAFFiNEI18N(); + const authService = useService(AuthService); + const loginStatus = useLiveData(authService.session.status$); + const loggedIn = loginStatus === 'authenticated'; + const { jumpToSignIn } = useNavigateHelper(); + return (
); }; diff --git a/packages/frontend/core/src/hooks/use-navigate-helper.ts b/packages/frontend/core/src/hooks/use-navigate-helper.ts index c15a2a5218d2a..5228298b38711 100644 --- a/packages/frontend/core/src/hooks/use-navigate-helper.ts +++ b/packages/frontend/core/src/hooks/use-navigate-helper.ts @@ -139,13 +139,22 @@ export function useNavigateHelper() { ( redirectUri?: string, logic: RouteLogic = RouteLogic.PUSH, - otherOptions?: Omit