diff --git a/src/apis/server.ts b/src/apis/server.ts index a3cedaca93298f9f70a7aadfcb0da0ffc8740307..6b059ea89987a072560ff4a2aaab52b579567b0f 100644 --- a/src/apis/server.ts +++ b/src/apis/server.ts @@ -19,6 +19,7 @@ import type { import { ElMessage } from 'element-plus'; import { successMsg } from 'src/components/Message'; import { getBaseProxyUrl } from 'src/utils/tools'; +import i18n from 'src/i18n'; export interface FcResponse { error: string; @@ -100,7 +101,7 @@ export const initServer = async () => { } if (error.status === 409) { // 处理错误码为409的情况 - successMsg('已是最新对话'); + successMsg(i18n.global.t('history.latestConversation')); return Promise.reject(error as any); } return await handleStatusError(error); diff --git a/src/assets/styles/variables/theme.scss b/src/assets/styles/variables/theme.scss index 6e7a7ca60062bb7d020e5ea7f66b20eaf31380af..472438eee345aebfa7b32a48a479dc4712fdfa3d 100644 --- a/src/assets/styles/variables/theme.scss +++ b/src/assets/styles/variables/theme.scss @@ -211,4 +211,9 @@ body { cursor: pointer; } --o-border-radius-small: 4px; + + .el-popper[role=tooltip].is-light .el-popper__arrow::before { + background: var(--o-bg-color-base); + border: 1px solid var(--o-tooltip-border-color); +} } diff --git a/src/assets/svgs/user-active.svg b/src/assets/svgs/user-active.svg new file mode 100644 index 0000000000000000000000000000000000000000..f36b0026d6478ce90faaf209d9eff1617d076d18 --- /dev/null +++ b/src/assets/svgs/user-active.svg @@ -0,0 +1,16 @@ + + + Created with Pixso. + + + + + + + + + + + + + diff --git a/src/assets/svgs/user-hover.svg b/src/assets/svgs/user-hover.svg new file mode 100644 index 0000000000000000000000000000000000000000..1834c5e37a24f67873903d080059d912b5d2ba54 --- /dev/null +++ b/src/assets/svgs/user-hover.svg @@ -0,0 +1,15 @@ + + + Created with Pixso. + + + + + + + + + + + + diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index 4b2ac9d7a1e0b8204ec24d9ff6c1fad0b05afa58..85e5476c84252dd8de82379ef46508a2086cf385 100644 --- a/src/components/Upload/index.vue +++ b/src/components/Upload/index.vue @@ -17,6 +17,7 @@ import { oneDark } from '@codemirror/theme-one-dark'; import { useChangeThemeStore } from '@/store'; import CustomLoading from 'src/views/customLoading/index.vue'; import MonacoEditor from 'src/components/monaco/MonacoEditor.vue'; +import i18n from 'src/i18n'; const loading = ref(false); const themeStore = useChangeThemeStore(); @@ -35,9 +36,9 @@ const handleCreateapi = async () => { (item) => item.name, ); uploadtype.value = 'get'; - successMsg('创建成功'); + successMsg(i18n.global.t('app.createSuccessfully')); } else { - errorMsg('创建失败'); + errorMsg(i18n.global.t('app.createFailed')); } loading.value = false; } else { @@ -90,7 +91,7 @@ const handleClose = () => { const handleEdit = () => { //edit数据 - successMsg('可编辑'); + successMsg(i18n.global.t('app.editable')); editable.value = true; }; diff --git a/src/components/dialoguePanel/DialogueFlow.vue b/src/components/dialoguePanel/DialogueFlow.vue index f739356ea7de7c03535032ecc2bcd0d19f2c1714..e0c6a5d7920ff06e83476ffc6f8663097ce91385 100644 --- a/src/components/dialoguePanel/DialogueFlow.vue +++ b/src/components/dialoguePanel/DialogueFlow.vue @@ -2,6 +2,7 @@ import { ref, watch } from 'vue'; import FlowCode from './FlowCode.vue'; import { StatusInfoTitle } from '@/views/createapp/components/types'; +import { IconSuccess, IconError } from '@computing/opendesign-icons'; const props = withDefaults( defineProps<{ @@ -60,18 +61,28 @@ watch( alt="" class="loading-animeIcon" /> - - + + + + + +
+ + + +
{{ props.flowdata.title }}
@@ -132,18 +143,22 @@ watch( alt="" class="loading-animeIcon" /> - - +
+ + + +
+
+ + + +
{{ secItem.title }}
@@ -262,21 +277,43 @@ watch( margin-right: 8px; padding-right: 8px; } +.loading-icon-box { + align-content: center; + .loading-icon { + width: 21px; + height: auto; + display: block; + svg { + width: 14px; + height: 14px; + } + } + .loading-title-icon{ + width: 24px; + height: 24px; + display: block; + margin-right: 12px; + svg { + width: 21px; + height: 21px; + } + } +} .border-red { - border: 1px solid #F7C1C1; + border: 1px solid #f7c1c1; } .border-green { - border: 1px solid #C2E7C7; + border: 1px solid #c2e7c7; } .border-blue { border: 1px solid transparent; border-radius: 4px; - background: + background: linear-gradient(white, white) padding-box, - linear-gradient(180deg, #6C77FA, #6DB9F9) border-box; + linear-gradient(180deg, #6c77fa, #6db9f9) border-box; } .demo-collapse { margin-bottom: 16px; @@ -316,8 +353,8 @@ watch( &-animeIcon { margin-right: 8px; - width: 24px; - height: 24px; + width: 21px; + height: 21px; align-items: center; align-self: center; animation: rotate-img 1s infinite linear; diff --git a/src/components/dialoguePanel/DialoguePanel.scss b/src/components/dialoguePanel/DialoguePanel.scss index cef4685c32173d2e42483bf9673e7b3e91b6c2ae..5b2e1a13fefce13c5ae3a9bd7e747ddb7d646549 100644 --- a/src/components/dialoguePanel/DialoguePanel.scss +++ b/src/components/dialoguePanel/DialoguePanel.scss @@ -47,15 +47,23 @@ } .el-popper[role='tooltip'] { + background-color: var(--o-bg-color-base) !important; max-width: 500px; } .el-popper { border: none; + background-color: pink !important; + background-color: var(--o-bg-color-base) !important; + + .against-popover { + padding: 16px; + } .against-popover-title { color: var(--o-text-color-primary); font-size: 16px; + padding-bottom: 16px; font-weight: 700; line-height: 24px; } @@ -80,15 +88,18 @@ border: 1px solid #7aa5ff; } } + .cancel_button_light[data-v-74300042]:not(.is-disabled) { + color: var(--o-text-color-primary); + } .against-popover .against-button button:first-child:hover { background-color: transparent; } .against-button button:last-child { - background-color: var(--o-color-primary); + background-color: var(--el-color-primary); border: none; - color: var(--o-color-white); + color: var(--o-bg-color-base) !important; &:hover { background-color: #7aa5ff; @@ -102,9 +113,15 @@ color: #e1eaff; } + .error-input { + margin-bottom: 16px; + } + .against-popover .error-input__link, .against-popover .error-input__desc { background-color: var(--o-bg-color-light); + padding: 8px 16px; + margin-bottom: 8px; } } @@ -160,11 +177,6 @@ float: left; //解决整体右浮动.提示语位置偏差 } -::deep .el-popper .el-popper.is-customized { - float: right; //解决整体右浮动.提示语位置偏差 - background-color: pink; -} - .el-popper.is-customized { padding: 6px 12px; background: #f4f6fa; @@ -292,16 +304,6 @@ } } - &::before { - content: ''; - position: absolute; - top: 0px; - width: 48px; - height: 48px; - left: -64px; - left: -64px; - background-image: url('src/assets/svgs/robot.svg'); - } &-icon { animation: rotate-img 1s infinite linear; @@ -506,9 +508,6 @@ width: auto; padding-right: 24px; padding-left: 64px; - .loading { - display: none; - } .dialogue-panel__content { .content { margin-left: 0px; @@ -584,3 +583,20 @@ left: -64px !important; } } +.disliked-button { + background-color: #5ab3ff !important; + :deep(.el-popper__arrow){ + display: none !important; + } +} +:deep(.el-popper){ + :deep(.el-popper__arrow){ + display: none !important; + } +} + +:deep(.el-popper[role=tooltip]){ + :deep(.el-popper__arrow){ + display: none !important; + } +} diff --git a/src/components/dialoguePanel/DialoguePanel.vue b/src/components/dialoguePanel/DialoguePanel.vue index 6bf185a3af2208e5d751346ee0d87e58a1e6e534..f98b716f8062ee438effd5f83d20127b13cc8078 100644 --- a/src/components/dialoguePanel/DialoguePanel.vue +++ b/src/components/dialoguePanel/DialoguePanel.vue @@ -7,6 +7,7 @@ import { useSessionStore, useChangeThemeStore, echartsObj } from '@/store'; import { useHistorySessionStore } from 'src/store'; import AgainstPopover from 'src/views/dialogue/components/AgainstPopover.vue'; import dayjs from 'dayjs'; +import './DialoguePanel.scss' import xss from 'xss'; import { errorMsg, successMsg } from 'src/components/Message'; import ReportPopover from 'src/views/dialogue/components/ReportPopover.vue'; @@ -377,6 +378,7 @@ onMounted(() => { if (props.messageArray?.value) { isComment.value = props.messageArray.value.getCommentbyIndex(index.value); } + popperSize(); setTimeout(() => { handleIsLike(); }, 200); @@ -441,7 +443,7 @@ watch( watch( () => language.value, () => { - popperSize(); + popperSize(); }, ); @@ -481,12 +483,14 @@ const selectQuestion = (item: Suggestion) => { }; const popperSize = () => { - if (language.value == 'EN') { + if (language.value == 'en') { size.width = 418; size.height = 496; return size; } else { - return size; + size.width = 328; + size.height = 416; + return size } }; const { conversationList } = storeToRefs(useSessionStore()); @@ -692,7 +696,7 @@ const chatWithParams = async () => { > {
- diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 0b3b9b3044156f64dba2095ddde83d5b3f02cacd..e87ce9ea47d3211380319b4374cab488c2be6de6 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -151,7 +151,11 @@ export default { app_published: 'Published', app_config: 'App Config', workflow_app: 'WorkFlow App', + create_workflow_app: 'Create WorkFlow App', + workflow_app_desc: '(待翻译)建拖拽式工作流应用,精筑生产级AI', mcp_app: 'MCP App', + create_mcp_app: 'Create MCP App', + mcp_app_desc: '(待翻译)创插件Agent应用,速构个人AI助手', confirm_delete_app: 'Are you sure to delete this application?', create_or_edit_workflow_first: 'Please create/edit a workflow first', ui_preview: 'UI Preview', @@ -176,7 +180,9 @@ export default { 'The workflow name already exists under the current application, please modify the name and try again', deleteWorkflowSuccessfully: 'Delete workflow successfully', createSuccessfully: 'Create successfully', + createFailed: 'Create failed', successfully: 'Successfully', + editable: 'Editable', failed: 'Failed', inputContent: 'Input content', outputContent: 'Output content', @@ -383,6 +389,7 @@ export default { no_apikey: 'No available API key', create_apikey: 'Create new API key', cancel: 'Cancel', + confirm: 'Please enter the description of the API key', }, witChainD: { witChainD: 'WitChainD', @@ -424,4 +431,13 @@ export default { prev: 'Previous', next: 'Next', }, + zoom: { + reduce: "Zoom Out", + amplify: "Zoom In", + adaptive: "Fit to Screen", + scaleTo50: "Zoom to 50%", + scaleTo100: "Zoom to 100%", + scaleTo150: "Zoom to 150%", + scaleTo200: "Zoom to 200%" + } }; diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 1742a298fe0db0c41dee3a31ad21106c58446fd2..913e215c55f4bc017743eeaf48a510c46aae4c3e 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -149,8 +149,12 @@ export default { create_app: '创建应用', app_published: '已发布', app_config: '界面配置', - workflow_app: '创建工作流应用', - mcp_app: '创建智能体应用', + workflow_app: '工作流应用', + create_workflow_app: '创建工作流应用', + workflow_app_desc: '建拖拽式工作流应用,精筑生产级AI', + mcp_app: '智能体应用', + create_mcp_app: '创建智能体应用', + mcp_app_desc: '创插件Agent应用,速构个人AI助手', confirm_delete_app: '确定删除此应用吗?', create_or_edit_workflow_first: '请先创建/编辑工作流', ui_preview: '界面预览', @@ -174,6 +178,8 @@ export default { pleasemodifyTheName: '当前应用下已有该工作流名称,请修改名称', deleteWorkflowSuccessfully: '删除工作流成功', createSuccessfully: '创建成功', + createFailed: '创建失败', + editable: '可编辑', successfully: '成功', failed: '失败', inputContent: '输入内容', @@ -372,6 +378,7 @@ export default { no_apikey: '暂无可用的 API Key', create_apikey: '新建 API Key', cancel: '取消', + confirm: '请输入密钥描述', }, witChainD: { witChainD: '资产库配置', @@ -412,4 +419,13 @@ export default { prev: 'Previous', next: 'Next', }, + zoom: { + reduce: "缩小", + amplify: "放大", + adaptive: "自适应", + scaleTo50: "缩放到50%", + scaleTo100: "缩放到100%", + scaleTo150: "缩放到150%", + scaleTo200: "缩放到200%" + } }; diff --git a/src/views/app/components/SelectAppTypeDialog.vue b/src/views/app/components/SelectAppTypeDialog.vue index ab2e00ddf3eefdf63ba2aee14de7d10fea00e2f8..68a70c371ef6221e57cf5bebcbc3c2e402c821ae 100644 --- a/src/views/app/components/SelectAppTypeDialog.vue +++ b/src/views/app/components/SelectAppTypeDialog.vue @@ -32,16 +32,16 @@ const selectedType = ref('agent'); :class="{ 'app-type__active': selectedType === 'agent' }" @click="selectedType = 'agent'" > -

智能体应用

- 创插件Agent应用,速构个人AI助手 +

{{ $t('app.mcp_app') }}

+ {{ $t('app.mcp_app_desc') }}
-

工作流应用

- 建拖拽式工作流应用,精筑生产级AI +

{{ $t('app.workflow_app') }}

+ {{ $t('app.workflow_app_desc') }}
diff --git a/src/views/createapp/components/PermissionControl.vue b/src/views/createapp/components/PermissionControl.vue index 104d35195472a8c6c0a0e528fa4a2ae831c00134..62e282b9e36f3857a8d831a70692d8424b8588d1 100644 --- a/src/views/createapp/components/PermissionControl.vue +++ b/src/views/createapp/components/PermissionControl.vue @@ -73,13 +73,13 @@ const filteredOptionalList = computed(() => { >
-
可选
+
{{ i18n.global.t('app.optional') }}
{{ optionalList.length }}
@@ -101,7 +101,7 @@ const filteredOptionalList = computed(() => {
-
已选
+
{{ $t('app.selected') }}
{{ checkedList.length }}
diff --git a/src/views/createapp/components/appConfig.vue b/src/views/createapp/components/appConfig.vue index 0d3d626a474524128dfc0840d12b773893d793ec..143a7e1c6cde84572ae92995e8ed0d8d1de790a7 100644 --- a/src/views/createapp/components/appConfig.vue +++ b/src/views/createapp/components/appConfig.vue @@ -2,6 +2,7 @@ import { ref, reactive, watch, onMounted } from 'vue'; import { useI18n } from 'vue-i18n'; const { t } = useI18n(); +import i18n from 'src/i18n'; import { IconCaretRight, IconPlusCircle, @@ -56,18 +57,19 @@ const flowDataList = ref([]); const searchName = ref(''); const permissionTypeList = [ { - label: '公开(所有人可见)', + label: 'app.permission_public', value: 'public', }, { - label: '私密(仅自己可见)', + label: 'app.permission_private', value: 'private', }, { - label: '部分人可见', + label: 'app.somePeople', value: 'protected', }, ]; + const base64Image: any = ref(''); const permissionList = ref([]); const curPersonList = ref([]); @@ -501,7 +503,7 @@ defineExpose({ :key="index" :value="item.value" > - {{ item.label }} + {{ i18n.global.t(item.label) }}
diff --git a/src/views/createapp/components/workFlow.vue b/src/views/createapp/components/workFlow.vue index b5907ea7067cdedf20a92e536cd5673c532dba07..d65f1dfcf81d08d2aa207045dd6acf030645559b 100644 --- a/src/views/createapp/components/workFlow.vue +++ b/src/views/createapp/components/workFlow.vue @@ -1,6 +1,7 @@