diff --git a/web/src/pages/login/index.less b/web/src/pages/login/index.less
index cafee5c616e9efa2e54e098514870b6c420d86a0..61c5d54438915798d984322cf2e390fe4ccf2b21 100644
--- a/web/src/pages/login/index.less
+++ b/web/src/pages/login/index.less
@@ -2,10 +2,12 @@
.loginPage {
display: flex;
+ background-color: rgba(255, 255, 255, 0.1);
+
.loginLeft {
// width: 610px;
width: 40%;
- background-color: #fff;
+ background-color: rgba(255, 255, 255, 0.1);
height: 100vh;
display: flex;
align-items: center;
@@ -39,7 +41,6 @@
z-index: -1;
}
.white {
- color: #fff;
}
.pink {
color: #e9d7fe;
@@ -87,15 +88,12 @@
span {
font-size: 16px;
line-height: 24px;
-
- color: #000000a6;
}
}
@media screen and (max-width: 957px) {
.loginLeft {
width: 100%;
- background-color: #fff;
height: 100%;
}
diff --git a/web/src/pages/search/index.less b/web/src/pages/search/index.less
index 0f67cc83ce8692c41e502a2fd0b86d03854678fa..b39f982bf461a9bbd76e5fdd8ec4c76ee5976b36 100644
--- a/web/src/pages/search/index.less
+++ b/web/src/pages/search/index.less
@@ -15,16 +15,8 @@
font-size: 14px;
cursor: pointer;
}
-
- // .mainLayout {
- // background: transparent;
- // }
}
-// .transparentSearchSide {
-// background-color: rgb(251 251 251 / 88%) !important;
-// }
-
.searchSide {
position: relative;
max-width: 400px !important;
@@ -101,10 +93,10 @@
}
.answerWrapper {
margin-top: 16px;
- background: rgb(232 242 251 / 70%);
+ background: rgba(232 242 251, 1);
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.08);
:global(.ant-card-head) {
- background-color: #e6f4ff;
+ background-color: #e6f4ff23;
}
& p {
margin: 0;
diff --git a/web/src/pages/search/index.tsx b/web/src/pages/search/index.tsx
index aa5f45de76ca6471722f4ac2fc124c6027a4866e..b9d12f7add682b975c2e091d48f3c9745c1cd0d3 100644
--- a/web/src/pages/search/index.tsx
+++ b/web/src/pages/search/index.tsx
@@ -146,9 +146,9 @@ const SearchPage = () => {
>
- {chunks.length > 0 && (
+ {chunks?.length > 0 && (
(
diff --git a/web/src/pages/user-setting/constants.tsx b/web/src/pages/user-setting/constants.tsx
index 597839ac09e2ed87e5f7afa810ce63df0ad98a48..0bac994803bd6c4b338108295d2b4c5461b3b7c1 100644
--- a/web/src/pages/user-setting/constants.tsx
+++ b/web/src/pages/user-setting/constants.tsx
@@ -1,19 +1,21 @@
-import { ReactComponent as ApiIcon } from '@/assets/svg/api.svg';
-import { ReactComponent as LogoutIcon } from '@/assets/svg/logout.svg';
-import { ReactComponent as ModelIcon } from '@/assets/svg/model-providers.svg';
-import { ReactComponent as PasswordIcon } from '@/assets/svg/password.svg';
-import { ReactComponent as ProfileIcon } from '@/assets/svg/profile.svg';
-import { ReactComponent as TeamIcon } from '@/assets/svg/team.svg';
+import {
+ ApiIcon,
+ LogOutIcon,
+ ModelProviderIcon,
+ PasswordIcon,
+ ProfileIcon,
+ TeamIcon,
+} from '@/assets/icon/Icon';
import { UserSettingRouteKey } from '@/constants/setting';
import { MonitorOutlined } from '@ant-design/icons';
export const UserSettingIconMap = {
[UserSettingRouteKey.Profile]: ,
[UserSettingRouteKey.Password]: ,
- [UserSettingRouteKey.Model]: ,
+ [UserSettingRouteKey.Model]: ,
[UserSettingRouteKey.System]: ,
[UserSettingRouteKey.Team]: ,
- [UserSettingRouteKey.Logout]: ,
+ [UserSettingRouteKey.Logout]: ,
[UserSettingRouteKey.Api]: ,
};
diff --git a/web/src/pages/user-setting/setting-locale/TranslationTable.tsx b/web/src/pages/user-setting/setting-locale/TranslationTable.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..b064b699b4a5ec18abfae05c757eb7c41d7aa0c0
--- /dev/null
+++ b/web/src/pages/user-setting/setting-locale/TranslationTable.tsx
@@ -0,0 +1,68 @@
+import { Table } from 'antd';
+import type { ColumnsType } from 'antd/es/table';
+import React from 'react';
+
+type TranslationTableRow = {
+ key: string;
+ [language: string]: string;
+};
+
+interface TranslationTableProps {
+ data: TranslationTableRow[];
+ languages: string[];
+}
+
+const TranslationTable: React.FC = ({
+ data,
+ languages,
+}) => {
+ // Define columns dynamically based on languages
+ const columns: ColumnsType = [
+ {
+ title: 'Key',
+ dataIndex: 'key',
+ key: 'key',
+ fixed: 'left',
+ width: 200,
+ sorter: (a, b) => a.key.localeCompare(b.key), // Sorting by key
+ },
+ ...languages.map((lang) => ({
+ title: lang,
+ dataIndex: lang,
+ key: lang,
+ sorter: (a: any, b: any) => a[lang].localeCompare(b[lang]), // Sorting by language
+ // Example filter for each language
+ filters: [
+ {
+ text: 'Show Empty',
+ value: 'show_empty',
+ },
+ {
+ text: 'Show Non-Empty',
+ value: 'show_non_empty',
+ },
+ ],
+ onFilter: (value: any, record: any) => {
+ if (value === 'show_empty') {
+ return !record[lang]; // Show rows with empty translations
+ }
+ if (value === 'show_non_empty') {
+ return record[lang] && record[lang].length > 0; // Show rows with non-empty translations
+ }
+ return true;
+ },
+ })),
+ ];
+
+ return (
+
+ );
+};
+
+export default TranslationTable;
diff --git a/web/src/pages/user-setting/setting-locale/index.tsx b/web/src/pages/user-setting/setting-locale/index.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..bc8df7550d53bd8d999e1265963086e2e74602ab
--- /dev/null
+++ b/web/src/pages/user-setting/setting-locale/index.tsx
@@ -0,0 +1,13 @@
+import { translationTable } from '@/locales/config';
+import TranslationTable from './TranslationTable';
+
+function UserSettingLocale() {
+ return (
+
+ );
+}
+
+export default UserSettingLocale;
diff --git a/web/src/pages/user-setting/setting-model/index.less b/web/src/pages/user-setting/setting-model/index.less
index 3ebf992c9805ae0d903d5c3bbe0235cb4637645d..39cdd5a3cb69ddfe67b03e25c239139fefefcb68 100644
--- a/web/src/pages/user-setting/setting-model/index.less
+++ b/web/src/pages/user-setting/setting-model/index.less
@@ -24,12 +24,30 @@
padding: 0;
}
}
+ .toBeAddedCardDark {
+ border-radius: 24px;
+ border: 1px solid #eaecf0;
+ background: #e3f0ff2a;
+ box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
+ :global(.ant-card-body) {
+ padding: 10px 24px;
+ }
+ .addButton {
+ padding: 0;
+ }
+ }
.addedCard {
border-radius: 18px;
border: 1px solid #eaecf0;
background: #e6e7eb;
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
}
+ .addedCardDark {
+ border-radius: 18px;
+ border: 1px solid #eaecf0;
+ background: #e6e7eb21;
+ box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
+ }
.modelDivider {
margin: 0;
}
diff --git a/web/src/pages/user-setting/setting-model/index.tsx b/web/src/pages/user-setting/setting-model/index.tsx
index 5e05c932e11cb23ee1bd0f2db7ac0f1ec57f2430..66b8f9b78985618f543eb056c8fbcfa93fdcafa6 100644
--- a/web/src/pages/user-setting/setting-model/index.tsx
+++ b/web/src/pages/user-setting/setting-model/index.tsx
@@ -1,5 +1,6 @@
import { ReactComponent as MoreModelIcon } from '@/assets/svg/more-model.svg';
import { LlmIcon } from '@/components/svg-icon';
+import { useTheme } from '@/components/theme-provider';
import { useSetModalState, useTranslate } from '@/hooks/common-hooks';
import { LlmItem, useSelectLlmList } from '@/hooks/llm-hooks';
import { CloseCircleOutlined, SettingOutlined } from '@ant-design/icons';
@@ -61,6 +62,7 @@ interface IModelCardProps {
const ModelCard = ({ item, clickApiKey }: IModelCardProps) => {
const { visible, switchVisible } = useSetModalState();
const { t } = useTranslate('setting');
+ const { theme } = useTheme();
const { handleDeleteLlm } = useHandleDeleteLlm(item.name);
const { handleDeleteFactory } = useHandleDeleteFactory(item.name);
@@ -74,7 +76,9 @@ const ModelCard = ({ item, clickApiKey }: IModelCardProps) => {
return (
-
+
@@ -139,6 +143,7 @@ const ModelCard = ({ item, clickApiKey }: IModelCardProps) => {
const UserSettingModel = () => {
const { factoryList, myLlmList: llmList, loading } = useSelectLlmList();
+ const { theme } = useTheme();
const {
saveApiKeyLoading,
initialApiKey,
@@ -313,7 +318,13 @@ const UserSettingModel = () => {
dataSource={factoryList}
renderItem={(item) => (
-
+
diff --git a/web/src/routes.ts b/web/src/routes.ts
index 60c527ae91f412d8bd10913868c8ab8c1bf1102d..85ede80e109485cd9b3d54996f70fdf8888e2e88 100644
--- a/web/src/routes.ts
+++ b/web/src/routes.ts
@@ -77,6 +77,10 @@ const routes = [
path: '/user-setting/profile',
component: '@/pages/user-setting/setting-profile',
},
+ {
+ path: '/user-setting/locale',
+ component: '@/pages/user-setting/setting-locale',
+ },
{
path: '/user-setting/password',
component: '@/pages/user-setting/setting-password',