Skip to content

Commit 5156663

Browse files
authored
Merge pull request #1268 from refly-ai/feat/support-pin-ask-ai
feat: tweak code artifact preview and login modal
2 parents 58ff889 + 69b540d commit 5156663

File tree

4 files changed

+13
-14
lines changed

4 files changed

+13
-14
lines changed

packages/ai-workspace-common/src/components/canvas/node-preview/code-artifact.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const CodeArtifactNodePreviewComponent = ({ nodeId }: CodeArtifactNodePreviewPro
3939
title,
4040
status,
4141
shareId,
42-
activeTab = 'code',
42+
activeTab = 'preview',
4343
type = 'text/html',
4444
language = 'html',
4545
} = data?.metadata || {};

packages/ai-workspace-common/src/hooks/use-create-code-artifact.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ export const useCreateCodeArtifact = () => {
4646
status: 'finish',
4747
language: language ?? 'typescript',
4848
type: type ?? 'text/html',
49-
activeTab: activeTab ?? 'code',
49+
activeTab: activeTab ?? 'preview',
5050
},
5151
},
5252
position: position,
5353
},
5454
connectTo: connectTo,
55-
shouldPreview: true,
55+
shouldPreview: false,
5656
needSetCenter: true,
5757
});
5858
},

packages/web-core/src/components/login-modal/index.tsx

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ const LoginModal = (props: { visible?: boolean; from?: string }) => {
202202

203203
{(isGithubEnabled || isGoogleEnabled) && isEmailEnabled && (
204204
<Divider className="!mb-3 !mt-8 !h-4">
205-
<span className="text-refly-text-0 text-xs font-normal leading-none">
205+
<span className="text-refly-text-2 text-xs font-normal leading-none">
206206
{t('landingPage.loginModal.or')}
207207
</span>
208208
</Divider>
@@ -241,12 +241,11 @@ const LoginModal = (props: { visible?: boolean; from?: string }) => {
241241
<Form.Item
242242
className="mb-3"
243243
name="password"
244-
label={
245-
<div className="flex w-96 flex-row items-center justify-between">
246-
<span className="font-medium">
247-
{t('landingPage.loginModal.passwordLabel')}
248-
</span>
249-
{!authStore.isSignUpMode && (
244+
label={t('landingPage.loginModal.passwordLabel')}
245+
labelCol={{ style: { fontWeight: 500 } }}
246+
extra={
247+
!authStore.isSignUpMode && (
248+
<div className="flex justify-start mt-1 mb-1">
250249
<Button
251250
type="link"
252251
className="p-0 !text-refly-text-2"
@@ -256,8 +255,8 @@ const LoginModal = (props: { visible?: boolean; from?: string }) => {
256255
{t('landingPage.loginModal.passwordForget')}
257256
</span>
258257
</Button>
259-
)}
260-
</div>
258+
</div>
259+
)
261260
}
262261
validateTrigger={['onBlur']}
263262
hasFeedback
@@ -288,7 +287,7 @@ const LoginModal = (props: { visible?: boolean; from?: string }) => {
288287
type="primary"
289288
onClick={handleEmailAuth}
290289
loading={authStore.loginInProgress && authStore.loginProvider === 'email'}
291-
className="h-10 w-full text-base"
290+
className="h-10 w-full text-base shadow-md"
292291
data-cy="continue-button"
293292
>
294293
{t('landingPage.loginModal.continue')}

packages/web-core/src/components/login-modal/oauth-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const OAuthButton: React.FC<OAuthButtonProps> = ({
3939
onClick={onClick}
4040
type="default"
4141
variant="filled"
42-
className="h-[52px] w-full font-semibold text-refly-text-0 border-refly-Card-Border shadow-sm"
42+
className="h-[52px] w-full font-semibold text-refly-text-0 border-refly-Card-Border !shadow-md !bg-white"
4343
data-cy={getDataCy()}
4444
loading={loading}
4545
disabled={disabled}

0 commit comments

Comments
 (0)