From 29395381eaac2c7d0e983cfc3bc0be237702849b Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Sat, 20 Jun 2026 18:44:17 +0200 Subject: [PATCH] refactor: tokenize Files and Auth surfaces, text, borders, and CTAs --- client/src/components/Auth/AuthLayout.tsx | 6 ++-- client/src/components/Auth/Footer.tsx | 2 +- client/src/components/Auth/Login.tsx | 2 +- client/src/components/Auth/LoginForm.tsx | 4 +-- client/src/components/Auth/Registration.tsx | 6 ++-- .../components/Auth/RequestPasswordReset.tsx | 4 +-- .../src/components/Auth/SocialLoginRender.tsx | 6 ++-- .../src/components/Auth/TwoFactorScreen.tsx | 8 +++-- client/src/components/Auth/VerifyEmail.tsx | 12 +++---- client/src/components/Files/ActionButton.tsx | 2 +- .../src/components/Files/DeleteIconButton.tsx | 5 ++- .../components/Files/FileDashboardView.tsx | 4 +-- .../Files/FileList/DataTableFile.tsx | 14 ++++---- .../Files/FileList/FileListItem.tsx | 8 ++--- .../Files/FileList/FileListItem2.tsx | 8 ++--- .../components/Files/FileList/FilePreview.tsx | 26 +++++++------- .../Files/FileList/FileTableColumns.tsx | 4 +-- .../Files/FileList/UploadFileButton.tsx | 2 +- .../Files/FileList/UploadFileModal.tsx | 12 ++++--- client/src/components/Files/FilesListView.tsx | 2 +- .../components/Files/FilesSectionSelector.tsx | 2 +- .../Files/VectorStore/VectorStoreButton.tsx | 2 +- .../Files/VectorStore/VectorStoreListItem.tsx | 10 +++--- .../Files/VectorStore/VectorStorePreview.tsx | 36 ++++++++++--------- .../src/components/Files/VectorStoreView.tsx | 2 +- 25 files changed, 97 insertions(+), 92 deletions(-) diff --git a/client/src/components/Auth/AuthLayout.tsx b/client/src/components/Auth/AuthLayout.tsx index 1aad9a94e7..76bc5c70f4 100644 --- a/client/src/components/Auth/AuthLayout.tsx +++ b/client/src/components/Auth/AuthLayout.tsx @@ -57,7 +57,7 @@ function AuthLayout({ }; return ( -
+
@@ -74,10 +74,10 @@ function AuthLayout({
-
+
{!hasStartupConfigError && !isFetching && header && (

{header} diff --git a/client/src/components/Auth/Footer.tsx b/client/src/components/Auth/Footer.tsx index fccd099eef..9513ab7269 100644 --- a/client/src/components/Auth/Footer.tsx +++ b/client/src/components/Auth/Footer.tsx @@ -37,7 +37,7 @@ function Footer({ startupConfig }: { startupConfig: TStartupConfig | null | unde
{privacyPolicyRender} {privacyPolicyRender && termsOfServiceRender && ( -
+
)} {termsOfServiceRender}
diff --git a/client/src/components/Auth/Login.tsx b/client/src/components/Auth/Login.tsx index 7c3adf51bd..a8b637671e 100644 --- a/client/src/components/Auth/Login.tsx +++ b/client/src/components/Auth/Login.tsx @@ -110,7 +110,7 @@ function Login() { /> )} {startupConfig?.registrationEnabled === true && ( -

+

{' '} {localize('com_auth_no_account')}{' '} = ({ onSubmit, startupConfig, error, const renderError = (fieldName: string) => { const errorMessage = errors[fieldName]?.message; return errorMessage ? ( - + {String(errorMessage)} ) : null; @@ -76,7 +76,7 @@ const LoginForm: React.FC = ({ onSubmit, startupConfig, error, return ( <> {showResendLink && ( -

{errors.email && ( -

+

{errors.email.message}

)} diff --git a/client/src/components/Auth/SocialLoginRender.tsx b/client/src/components/Auth/SocialLoginRender.tsx index ad76354a53..b4f2ac18ba 100644 --- a/client/src/components/Auth/SocialLoginRender.tsx +++ b/client/src/components/Auth/SocialLoginRender.tsx @@ -122,10 +122,8 @@ function SocialLoginRender({ <> {startupConfig.emailLoginEnabled && ( <> -
-
- Or -
+
+
Or
diff --git a/client/src/components/Auth/TwoFactorScreen.tsx b/client/src/components/Auth/TwoFactorScreen.tsx index 11eab660c7..936a4e088e 100644 --- a/client/src/components/Auth/TwoFactorScreen.tsx +++ b/client/src/components/Auth/TwoFactorScreen.tsx @@ -105,7 +105,9 @@ const TwoFactorScreen: React.FC = React.memo(() => { )} /> - {errors.token && {errors.token.message}} + {errors.token && ( + {errors.token.message} + )}
)} {useBackup && ( @@ -134,7 +136,7 @@ const TwoFactorScreen: React.FC = React.memo(() => { )} /> {errors.backupCode && ( - {errors.backupCode.message} + {errors.backupCode.message} )}
)} @@ -144,7 +146,7 @@ const TwoFactorScreen: React.FC = React.memo(() => { aria-label={localize('com_auth_continue')} data-testid="login-button" disabled={isLoading} - className="w-full rounded-2xl bg-green-600 px-4 py-3 text-sm font-medium text-white transition-colors hover:bg-green-700 disabled:opacity-80 dark:bg-green-600 dark:hover:bg-green-700" + className="w-full rounded-2xl bg-surface-submit px-4 py-3 text-sm font-medium text-white transition-colors hover:bg-surface-submit-hover disabled:opacity-80" > {isLoading ? localize('com_auth_email_verifying_ellipsis') : localize('com_ui_verify')} diff --git a/client/src/components/Auth/VerifyEmail.tsx b/client/src/components/Auth/VerifyEmail.tsx index 4c24b5437b..9b4275e2c9 100644 --- a/client/src/components/Auth/VerifyEmail.tsx +++ b/client/src/components/Auth/VerifyEmail.tsx @@ -78,16 +78,14 @@ function RequestPasswordReset() { const VerificationSuccess = () => (
-

- {headerText} -

+

{headerText}

{countdown > 0 && ( -

+

{localize('com_auth_email_verification_redirecting', { 0: countdown.toString() })}

)} {showResendLink && countdown === 0 && ( -

+

{localize('com_auth_email_verification_resend_prompt')}

diff --git a/client/src/components/Files/FileDashboardView.tsx b/client/src/components/Files/FileDashboardView.tsx index 20d7a7800a..fb86b14286 100644 --- a/client/src/components/Files/FileDashboardView.tsx +++ b/client/src/components/Files/FileDashboardView.tsx @@ -7,7 +7,7 @@ const FileDashboardView = () => { const params = useParams(); const navigate = useNavigate(); return ( -
+
{params.vectorStoreId && ( )}
-
+
diff --git a/client/src/components/Files/FileList/DataTableFile.tsx b/client/src/components/Files/FileList/DataTableFile.tsx index 269001d0a3..f62d673208 100644 --- a/client/src/components/Files/FileList/DataTableFile.tsx +++ b/client/src/components/Files/FileList/DataTableFile.tsx @@ -117,7 +117,7 @@ export default function DataTableFile({ {isDeleting ? ( ) : ( - + )} {localize('com_ui_delete')} @@ -132,7 +132,7 @@ export default function DataTableFile({ {table .getAllColumns() @@ -141,7 +141,7 @@ export default function DataTableFile({ return ( column.toggleVisibility(Boolean(value))} > @@ -192,7 +192,7 @@ export default function DataTableFile({ return ( {header.isPlaceholder @@ -210,7 +210,7 @@ export default function DataTableFile({ {row.getVisibleCells().map((cell, index) => { const maxWidth = @@ -254,7 +254,7 @@ export default function DataTableFile({ })}
diff --git a/client/src/components/Files/FileList/UploadFileButton.tsx b/client/src/components/Files/FileList/UploadFileButton.tsx index 0823f706e3..0a6f17f8ab 100644 --- a/client/src/components/Files/FileList/UploadFileButton.tsx +++ b/client/src/components/Files/FileList/UploadFileButton.tsx @@ -9,7 +9,7 @@ type UploadFileProps = { export default function UploadFileButton({ onClick }: UploadFileProps) { return (
- diff --git a/client/src/components/Files/FileList/UploadFileModal.tsx b/client/src/components/Files/FileList/UploadFileModal.tsx index 7be59184a5..d8ffb3b5de 100644 --- a/client/src/components/Files/FileList/UploadFileModal.tsx +++ b/client/src/components/Files/FileList/UploadFileModal.tsx @@ -18,11 +18,11 @@ const UploadFileModal = ({ open, onOpenChange }) => { - + Upoad a File @@ -33,7 +33,7 @@ const UploadFileModal = ({ open, onOpenChange }) => {
Please upload square file, size less than 100KB
-
+
@@ -43,13 +43,15 @@ const UploadFileModal = ({ open, onOpenChange }) => {
- +
-