diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 287e7397196d515cd9ea0700089b8210cc3a3207..ea965392172a51a02d9e8642c6800840380f3b95 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -118,6 +118,8 @@ export default { }, app: { app_center: 'App Center', + flow: 'Flow', + agent: 'Agent', all_select: 'All', app_name: 'App name', app_introduction: 'App introduction', @@ -145,6 +147,7 @@ export default { app_config: 'App Config', agent_app: 'Agent App', mcp_app: 'MCP App', + 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', appName: 'Agent Name', diff --git a/src/i18n/lang/zh-cn.ts b/src/i18n/lang/zh-cn.ts index 8958adfa67a06bb8fa08e5a0e9fef965dabafa58..9c524ab305956661718f59ebdc4aff03b23f3b80 100644 --- a/src/i18n/lang/zh-cn.ts +++ b/src/i18n/lang/zh-cn.ts @@ -117,6 +117,8 @@ export default { }, app: { app_center: '应用中心', + flow: '工作流', + agent: '智能体', all_select: '全部', app_name: '应用名称', app_introduction: '应用简介', @@ -144,6 +146,7 @@ export default { app_config: '界面配置', agent_app: '创建智能体应用', mcp_app: '创建工作流应用', + confirm_delete_app: '确定删除此应用吗?', create_or_edit_workflow_first: '请先创建/编辑工作流', ui_preview: '界面预览', appName: '智能体名称', diff --git a/src/store/theme.ts b/src/store/theme.ts index be0f5c03cafbc63c0c4dedef8327140c577376c4..9e7facbae242be7e1bb49e27ec5be084752c5d8f 100644 --- a/src/store/theme.ts +++ b/src/store/theme.ts @@ -5,7 +5,7 @@ import { onBeforeUnmount, onMounted, ref } from 'vue'; export const useChangeThemeStore = defineStore( 'theme', () => { - const theme = ref<'dark' | 'light'>(); + const theme = ref<'dark' | 'light'>('light'); function updateTheme(t: 'dark' | 'light') { theme.value = t; diff --git a/src/views/app/index.vue b/src/views/app/index.vue index 054efbd1692ebcdb585052e2c2fe44632f40bf78..0e4cf4c839dd4bb533ed7960d5c26fb9c1fa0b80 100644 --- a/src/views/app/index.vue +++ b/src/views/app/index.vue @@ -17,8 +17,8 @@ :suffix-icon="IconCaretDown" > - - + + @@ -96,7 +96,11 @@ : 'appTypeName__agent' " > - {{ appItem.appType === 'flow' ? '工作流' : '智能体' }} + {{ + appItem.appType === 'flow' + ? $t('app.flow') + : $t('app.agent') + }}
@@ -145,7 +149,7 @@
@@ -170,6 +174,7 @@ import DefaultAppIcon from '../../assets/svgs/defaultIcon.webp'; import CustomLoading from '../customLoading/index.vue'; import SelectAppTypeDialog from './components/SelectAppTypeDialog.vue'; import TextMoreTootip from '@/components/textMoreTootip/index.vue'; +import { useI18n } from 'vue-i18n'; interface App { appId: string; @@ -183,6 +188,7 @@ interface App { } const route = useRoute(); const router = useRouter(); +const { t } = useI18n(); const { currentSelectedSession } = storeToRefs(useHistorySessionStore()); const publishStatus = ref('未发布'); @@ -302,7 +308,9 @@ const handleSearchAppList = (type) => { const handleDelApp = (e, item) => { e.stopPropagation(); - ElMessageBox.confirm('确定删除此应用吗?', '提示', { + ElMessageBox.confirm(t('app.confirm_delete_app'), t('common.tip'), { + confirmButtonText: t('common.confirm'), + cancelButtonText: t('common.cancel'), type: 'warning', icon: markRaw(IconAlarm), }).then(() => { @@ -314,7 +322,7 @@ const handleDelApp = (e, item) => { if (res[1]) { ElMessage({ showClose: true, - message: '删除成功', + message: t('common.delete_success'), icon: IconSuccess, customClass: 'o-message--success', duration: 3000, diff --git a/src/views/createapp/components/AssetLibraryDrawer.vue b/src/views/createapp/components/AssetLibraryDrawer.vue index 4cb9f2381641d3e5266fe4319d355c56b1176e3c..73498da63f62caa2756fe763e44cb17a56cb0a8a 100644 --- a/src/views/createapp/components/AssetLibraryDrawer.vue +++ b/src/views/createapp/components/AssetLibraryDrawer.vue @@ -4,6 +4,7 @@ import { ref, onMounted } from 'vue'; import { api } from '@/apis'; import type { KnowledgeBase } from '@/apis/appCenter/knowledge'; import { ElMessage } from 'element-plus'; +import i18n from '@/i18n'; defineProps<{ visible: boolean; @@ -109,8 +110,12 @@ onMounted(() => { diff --git a/src/views/dialogue/components/DialogueSession.vue b/src/views/dialogue/components/DialogueSession.vue index 522110395859b117a8f4eb74b0a976c61603835b..4883f62b5a1749912ce211f27e3c44ecd74c59b6 100644 --- a/src/views/dialogue/components/DialogueSession.vue +++ b/src/views/dialogue/components/DialogueSession.vue @@ -34,7 +34,7 @@ const isCreateApp = ref(props?.isCreateApp); const selectedLLM = ref({}); const handleChangeMode = (val: string) => { selectedLLM.value = val; - }; +}; // const isCreateApp = ref(true); const llmOptions = ref([]); const { app } = storeToRefs(useSessionStore()); @@ -682,7 +682,6 @@ const getappMode = (appId: string) => { }; } }); - console.log("getappMode", appId, Form.value); }; watch( @@ -848,7 +847,7 @@ watch( - +
diff --git a/src/views/tools/index.vue b/src/views/tools/index.vue index e011f72573e4f058240f5090286441d294a7feb6..7f5fe2c874f3229730e3f617a165d68f299b47c3 100644 --- a/src/views/tools/index.vue +++ b/src/views/tools/index.vue @@ -92,8 +92,7 @@ watch( // 等待DOM更新完成 await nextTick(); - - if (isIframeLoaded.value) { + if (isIframeLoaded.value && iframeTarget.value) { sendMessageToIframe(!isWitchaindRoute); const token = localStorage.getItem('ECSESSION') ?? ''; sendTokenToIframe(token);