Commit b5a0c2f3 authored by shirlyn.guo's avatar shirlyn.guo 👌🏻

chore: 适配英文&版面调整

parent ea73ba1e
......@@ -69,6 +69,12 @@ common_module:
collect_unsubscribed: 'Uncollected'
cancel: 'Cancel'
preservation: 'Save'
open: 'Open'
close: 'Close'
delete_tip_title: 'Delete Prompt'
wipe_data: 'Wipe Data '
delete_all_tip_title: 'Clear Data Prompt'
search: 'Search'
dialogue_module:
continue_question_message: 'You can keep asking questions'
......@@ -144,6 +150,8 @@ router_title_module:
knowledge_document_list: 'Knowledge base document list'
knowledge_document_detail: 'Knowledge base Document Details'
multi_model_dialogue: 'Multi-model debugging'
explore: 'Explore'
application_square: 'Application square'
personal_space_module:
title: 'Personal space'
......@@ -230,7 +238,7 @@ personal_space_module:
continuous_question: 'Make a close inquiry'
continuous_question_popover_message: 'The large model automatically generates additional questions based on the content of the conversation'
continuous_question_default: 'Default'
continuous_question_default_desc: 'Based on the user''s latest round of conversation, it automatically provides three question suggestions after a reply.'
continuous_question_default_desc: "Based on the user's latest round of conversation, it automatically provides three question suggestions after a reply."
continuous_question_close: 'Close'
continuous_question_close_desc: 'After each round of responses, users will not be provided with any suggestions for questions'
memory: 'Memory'
......@@ -244,6 +252,12 @@ personal_space_module:
memory_variable_action_copy: 'Copy name'
variable_name: 'Variable name'
variable_value: 'Variable value'
memory_fragment: 'Memory fragments'
memory_fragment_message: 'Activate the memory fragment function, and the application will store the information fragments mentioned by the user based on the conversation content, and reply based on the memory fragments. Taking "Interview Assistant" as an example:'
memory_fragment_content: 'Record all memory fragments related to user information, preferences, and plans during the chat conversation.'
memory_variable_delete_tip_content: 'After deletion, it cannot be revoked. If the application has already been released, after the update is released, users of the application will not be able to use the memory variable. Do you want to continue?'
memory_fragment_delete_all_tip_content: 'After data is cleared, it cannot be revoked. Are you sure you want to clear it all?'
memory_fragment_delete_row_tip_content: 'After data deletion, it cannot be revoked. Are you sure you want to delete it?'
memory_variable_modal:
edit_memory_variable: 'Edit memory variable'
......@@ -259,6 +273,9 @@ personal_space_module:
default_value_placeholder: 'Please enter'
name_placeholder: 'Please enter name'
add_variable: 'New variable'
memory_variable_add_now: 'Immediately Add'
none_memory_variable: 'No memory variables available at the moment'
add_variable_message: 'Add memory variables to better record user characteristics and information'
memory_variable_rules:
name_not_null: 'Please enter name'
......@@ -388,3 +405,8 @@ multi_model_dialogue_module:
please_select_model_first: 'Please select the model first'
replace_configuration_tip: 'Whether to overwrite the configuration of the model over the original configuration item'
open_new_conversation: 'A new session has been started. Procedure'
applications_square_module:
create_application_btn_text: 'Create application'
all_application_btn_text: 'All applications'
immediate_use_btn_text: 'Immediate use'
......@@ -73,6 +73,7 @@ common_module:
delete_tip_title: '删除提示'
wipe_data: '清空数据'
delete_all_tip_title: '清空数据提示'
search: '搜索'
dialogue_module:
continue_question_message: '你可以继续提问'
......
......@@ -73,6 +73,7 @@ common_module:
delete_tip_title: '删除提示'
wipe_data: '清空數據'
delete_all_tip_title: '清空數據提示'
search: '搜索'
dialogue_module:
continue_question_message: '你可以繼續提問'
......@@ -149,7 +150,7 @@ router_title_module:
knowledge_document_detail: '知識庫文檔詳情'
multi_model_dialogue: '多模型調試'
explore: '探索'
applications-square: '應用廣場'
application_square: '應用廣場'
personal_space_module:
title: '個人空間'
......@@ -404,7 +405,6 @@ multi_model_dialogue_module:
open_new_conversation: '已開啓新會話'
applications_square_module:
title: '應用廣場'
create_application_btn_text: '創建應用'
all_application_btn_text: '所有應用'
immediate_use_btn_text: '立即使用'
......@@ -18,7 +18,7 @@ export default [
name: 'ApplicationsSquare',
meta: {
rank: 1001,
title: 'router_title_module.applications-square',
title: 'router_title_module.application_square',
belong: 'ApplicationsSquare',
},
component: () => import('@/views/applications-square/applications-square.vue'),
......
......@@ -14,10 +14,15 @@ import { router } from '@/router'
import searchEmptyImage from '@/assets/images/search-empty.png'
import applicationEmptyImage from '@/assets/images/application-empty.png'
interface mallCategory {
id: number
categoryName: string
}
const { t } = useI18n()
const searchQuery = ref('')
const checkedClassifyValue = ref(t('applications_square_module.all_application_btn_text'))
const checkedClassifyValue = ref(0)
const agentApplicationList = ref<PersonalAppConfigState[]>([])
const pagingInfo = ref<PaginationInfo>({
......@@ -26,7 +31,7 @@ const pagingInfo = ref<PaginationInfo>({
totalPages: 0,
totalRows: 0,
})
const mallCategoryList = ref<string[]>([])
const mallCategoryList = ref<mallCategory[]>([])
const cardContentWrapRef = useTemplateRef<HTMLDivElement>('cardContentWrapRef')
const isShowCarousel = ref(true)
const smooth = ref(false)
......@@ -39,8 +44,8 @@ const behavior = computed(() => (smooth.value ? 'smooth' : 'auto'))
const { arrivedState } = useScroll(cardContentWrapRef, { behavior })
;(function () {
handleGetAgentApplicationList()
handleGetMallCategoryList()
handleGetAgentApplicationList()
})()
watch(checkedClassifyValue, () => {
......@@ -70,7 +75,7 @@ watch(
)
function handleGetAgentApplicationList(update = false, search = false) {
const agentType = ref('')
const agentTypeId = ref<number | null>(0)
if (agentApplicationBottomIsLoading.value && agentApplicationClassifyIsLoading.value) return
if (search && searchQuery.value.length !== 0) {
......@@ -81,13 +86,11 @@ function handleGetAgentApplicationList(update = false, search = false) {
if (update) pagingInfo.value.pageNo = 1
checkedClassifyValue.value === t('applications_square_module.all_application_btn_text')
? (agentType.value = '')
: (agentType.value = checkedClassifyValue.value)
checkedClassifyValue.value === 0 ? (agentTypeId.value = null) : (agentTypeId.value = checkedClassifyValue.value)
const payload = {
search: searchQuery.value,
pagingInfo: pagingInfo.value,
agentType: agentType.value,
categoryId: agentTypeId.value,
}
fetchGetAgentApplicationList<PersonalAppConfigState[]>(payload).then((res) => {
agentApplicationList.value = update ? res.data : [...agentApplicationList.value, ...res.data]
......@@ -112,9 +115,8 @@ function handleCollectOrCancelAgentApplication(id: number) {
}
function handleGetMallCategoryList() {
mallCategoryList.value[0] = t('applications_square_module.all_application_btn_text')
fetchGetMallCategoryList<string[]>().then((res) => {
mallCategoryList.value.unshift({ id: 0, categoryName: t('applications_square_module.all_application_btn_text') })
fetchGetMallCategoryList<mallCategory[]>().then((res) => {
if (res.code !== 0) return
mallCategoryList.value = [...mallCategoryList.value, ...res.data]
})
......@@ -141,7 +143,7 @@ function handleAddAgentApplications() {
<n-input
v-model:value="searchQuery"
type="text"
placeholder="搜索"
:placeholder="t('common_module.search')"
class="search-input rounded-[26px]! text-[16px]! leading-[32px]! border-[#9ea3ff]! border-[1px] py-[6px] shadow-[0_4px_10px_0px_rgba(103,103,103,.1)]"
clearable
@keyup.enter="handleGetAgentApplicationList(true, true)"
......@@ -158,7 +160,7 @@ function handleAddAgentApplications() {
type="primary"
:bordered="false"
:focusable="false"
class="w-[86px]!"
class="min-w-[86px]!"
@click="handleAddAgentApplications"
>
<span class="text-sm text-[#fff]">{{ t('applications_square_module.create_application_btn_text') }}</span>
......@@ -185,13 +187,13 @@ function handleAddAgentApplications() {
<div class="flex items-center rounded-[5px] bg-white py-[9px] pl-[9px]">
<button
v-for="classify in mallCategoryList"
:key="classify"
:key="classify.id"
:focusable="false"
:class="['classify-radio-button', { active: checkedClassifyValue === classify }]"
class="mr-[4px] w-[86px] cursor-pointer rounded-[5px] border-[1px] border-[#fff] bg-transparent py-[5px] transition-colors duration-300 hover:bg-[#eeefff]"
@click="checkedClassifyValue = classify"
:class="['classify-radio-button', { active: checkedClassifyValue === classify.id }]"
class="mr-[4px] min-w-[86px] cursor-pointer rounded-[5px] border-[1px] border-[#fff] bg-transparent px-[5px] py-[5px] transition-colors duration-300 hover:bg-[#eeefff]"
@click="checkedClassifyValue = classify.id"
>
{{ classify }}
{{ classify.categoryName }}
</button>
</div>
</div>
......@@ -298,7 +300,7 @@ function handleAddAgentApplications() {
class="mb-[50px] mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
>
<div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div>
<div class="mb-[8px] w-[80px]">
<div class="mb-[8px] min-w-[80px]">
{{ t('personal_space_module.agent_module.agent_list_module.already_bottom') }}
</div>
<div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div>
......
......@@ -1005,7 +1005,7 @@ function handleChangeMemoryFragmentState(value: boolean) {
</template>
<NCollapseItem name="memoryVariable" class="my-[13px]!">
<template #header>
<span class="mr-[5px] w-[60px]">{{
<span class="mr-[5px] min-w-[60px]">{{
t('personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_variable')
}}</span>
<n-popover trigger="hover" placement="top-start" class="p-[12px]! left-[-120px]!" :show-arrow="false">
......@@ -1118,7 +1118,7 @@ function handleChangeMemoryFragmentState(value: boolean) {
<NCollapseItem name="memoryFragment" class="my-[13px]!">
<template #header>
<span class="mr-[5px] w-[60px]">
<span class="mr-[5px] min-w-[60px]">
{{
t('personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_fragment')
}}
......
......@@ -346,7 +346,7 @@ defineExpose({
}}
</div>
<div
class="text-theme-color mt-[6px] flex w-[78px] cursor-pointer"
class="text-theme-color mt-[6px] flex min-w-[78px] cursor-pointer"
@click="handleAddMemoryVariableItem"
>
<Plus theme="outline" size="22" :stroke-width="3" class="text-theme-color" />
......@@ -363,13 +363,16 @@ defineExpose({
</table>
</div>
</n-scrollbar>
<div
v-show="memoryVariableTable.length !== 0"
class="text-theme-color mt-[16px] flex w-[78px] cursor-pointer"
@click="handleAddMemoryVariableItem"
>
<Plus theme="outline" size="22" :stroke-width="3" class="text-theme-color" />
<span>{{
<div v-show="memoryVariableTable.length !== 0" class="text-theme-color mt-[16px] flex min-w-[78px]">
<Plus
theme="outline"
size="22"
:stroke-width="3"
class="text-theme-color cursor-pointer"
@click="handleAddMemoryVariableItem"
/>
<span class="cursor-pointer" @click="handleAddMemoryVariableItem">{{
t(
'personal_space_module.agent_module.agent_setting_module.agent_config_module.memory_variable_modal.add_variable',
)
......
......@@ -203,7 +203,7 @@ const handleCardContentScrollDebounce = debounce(
<template>
<div class="h-full">
<div class="mb-[13px] flex justify-between">
<n-space vertical class="w-[118px]">
<n-space vertical class="min-w-[140px]">
<n-select
v-model:value="selectedPublishStatusValue"
:options="publishStatusOptions"
......@@ -261,7 +261,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
<n-button
:color="agentAppItem.baseInfo.agentPublishStatus === 'draft' ? '#CCCCCC' : '#000DFF'"
class="h-[27px]! w-[71px]! pl-[17px]! pr-[16px]! pt-[7px]! pb-[8px]! text-[13px]! rounded-[13px] border-[1px]"
class="h-[27px]! min-w-[71px]! pl-[17px]! pr-[16px]! pt-[7px]! pb-[8px]! text-[13px]! rounded-[13px] border-[1px]"
round
ghost
>
......@@ -303,7 +303,7 @@ const handleCardContentScrollDebounce = debounce(
</template>
<div
v-show="agentAppItem.baseInfo.agentPublishStatus !== 'draft'"
class="mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333] hover:bg-[#f1f1f1c7]"
class="hover:bg-active-color mb-[10px] mt-[8px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]"
@click="handleAnalysisPersonalApp(agentAppItem)"
>
{{ t('common_module.data_table_module.analysis') }}
......@@ -319,7 +319,7 @@ const handleCardContentScrollDebounce = debounce(
>
<template #trigger>
<div
class="mb-[10px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333] hover:bg-[#f1f1f1c7]"
class="hover:bg-active-color mb-[10px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]"
>
{{ t('common_module.data_table_module.remove_applications') }}
</div>
......@@ -333,7 +333,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
<div v-show="agentAppItem.isSale === 'N'">
<div
class="mb-[10px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333] hover:bg-[#f1f1f1c7]"
class="hover:bg-active-color mb-[10px] h-[24px] w-full rounded-[4px] py-[5px] pl-[5px] text-[14px] leading-[14px] text-[#333333]"
@click="handleChangeApplicationsSaleStatus(agentAppItem)"
>
{{ t('common_module.data_table_module.listing_applications') }}
......@@ -342,7 +342,7 @@ const handleCardContentScrollDebounce = debounce(
</div>
<div
class="mb-[8px] mt-[8px] h-[24px] w-[72px] rounded-[4px] py-[5px] pl-[8px] text-[14px] leading-[14px] text-[#F25744] hover:bg-[#f1f1f1c7]"
class="hover:bg-active-color mb-[8px] mt-[8px] h-[24px] min-w-[72px] rounded-[4px] py-[5px] pl-[8px] text-[14px] leading-[14px] text-[#F25744]"
@click="handleDeletePersonalApp(agentAppItem.baseInfo.agentId)"
>
{{ t('common_module.delete') }}
......@@ -387,7 +387,7 @@ const handleCardContentScrollDebounce = debounce(
class="mt-[30px] flex justify-center text-center text-[14px] text-[#a9b4cc]"
>
<div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div>
<div class="mb-[8px] w-[80px]">
<div class="mb-[8px] min-w-[80px]">
{{ t('personal_space_module.agent_module.agent_list_module.already_bottom') }}
</div>
<div class="relative top-[10px] h-[1px] w-[14px] bg-[#a9b4cc]"></div>
......
......@@ -6,6 +6,11 @@ import { Close, Help, Notes, CheckSmall } from '@icon-park/vue-next'
import { ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
interface mallCategory {
id: number
categoryName: string
}
const isShowSaleApplicationsConfigurationModal = defineModel<boolean>()
const props = defineProps<{
......@@ -18,13 +23,13 @@ const emit = defineEmits<{
const { t } = useI18n()
const checkedClassifyValue = ref('')
const checkedClassifyValue = ref<number | null>(null)
const isCopy = ref('N')
const saleApplicationsId = ref(props.data.agentPublishId)
const isClassifyError = ref(false)
const applicationsClassify = ref<string[]>([])
const applicationsClassify = ref<mallCategory[]>([])
;(function () {
handleGetMallCategoryList()
......@@ -33,7 +38,7 @@ const applicationsClassify = ref<string[]>([])
watch(
() => checkedClassifyValue.value,
() => {
if (checkedClassifyValue.value !== '') isClassifyError.value = false
if (checkedClassifyValue.value !== null) isClassifyError.value = false
},
)
......@@ -46,7 +51,7 @@ watch(
function handleApplicationsSaleSettingModalClose() {
isShowSaleApplicationsConfigurationModal.value = false
checkedClassifyValue.value = ''
checkedClassifyValue.value = null
}
function handleApplicationReleaseBtn() {
......@@ -56,7 +61,7 @@ function handleApplicationReleaseBtn() {
}
const payload = {
agentPublishId: saleApplicationsId.value,
agentType: checkedClassifyValue.value,
categoryId: checkedClassifyValue.value,
isCopy: isCopy.value,
isSale: 'Y',
}
......@@ -79,7 +84,7 @@ function handleIsCopySwitchUpdateValue(value: string) {
function handleGetMallCategoryList() {
fetchGetMallCategoryList().then((res) => {
if (res.code !== 0) return
applicationsClassify.value = res.data as string[]
applicationsClassify.value = res.data as mallCategory[]
})
}
</script>
......@@ -121,19 +126,19 @@ function handleGetMallCategoryList() {
<div class="flex flex-wrap">
<button
v-for="classify in applicationsClassify"
:key="classify"
:class="['classify-radio-button', { active: checkedClassifyValue === classify }]"
:key="classify.id"
:class="['classify-radio-button', { active: checkedClassifyValue === classify.id }]"
class="relative mb-[8px] mr-[8px] h-[26px] cursor-pointer rounded-[6px] border-[1px] border-[#edeef7] bg-[#edeef7] px-[8px] text-[12px]"
@click="checkedClassifyValue = classify"
@click="checkedClassifyValue = classify.id"
>
<div
v-show="checkedClassifyValue === classify"
v-show="checkedClassifyValue === classify.id"
class="bg-theme-color absolute left-0 top-[-1px] h-[14px] w-[14px] rounded-[3px]"
style="clip-path: polygon(0 0, 100% 0, 0 100%)"
>
<CheckSmall theme="outline" size="10" fill="#fff" />
</div>
{{ classify }}
{{ classify.categoryName }}
</button>
</div>
<div class="mb-[10px] h-[16px] text-red-500">
......
......@@ -115,7 +115,7 @@ async function handleCreateKnowledgeNextStep(createKnowledgeData: KnowledgeFormD
<div>
<NDropdown trigger="hover" :options="addPersonalSpaceOptions" @select="handleSelectAddType">
<NButton type="primary" :bordered="false" :focusable="false" class="w-[75px]!">
<NButton type="primary" :bordered="false" :focusable="false" class="min-w-[75px]!">
<Plus theme="outline" size="16" fill="#fff" :stroke-width="4" />
<span class="ml-1 text-sm">{{ t('personal_space_module.create_btn_text') }}</span>
</NButton>
......
......@@ -48,7 +48,7 @@ function handleToLogin() {
<div class="flex items-center">
<CustomIcon
icon="weui:back-outlined"
class="hover:text-theme-color mr-5 outline-none"
class="hover:text-theme-color mr-5 cursor-pointer outline-none"
@click="handleBackHomePage"
/>
<img :src="agentApplicationConfig.baseInfo.agentAvatar" class="mr-5 h-10 w-10 rounded-md" />
......@@ -72,12 +72,12 @@ function handleToLogin() {
<NButton
v-show="isLogin"
type="primary"
class="rounded-md! h-[32px]! w-[100px]!"
class="rounded-md! h-[32px]! min-w-[100px]!"
@click="handleToCreateApplication"
>
{{ t('common_module.create_agent_btn_text') }}
</NButton>
<NButton v-show="!isLogin" type="primary" class="rounded-md! h-[32px]! w-[100px]!" @click="handleToLogin">
<NButton v-show="!isLogin" type="primary" class="rounded-md! h-[32px]! min-w-[100px]!" @click="handleToLogin">
{{ t('common_module.login_now') }}
</NButton>
</div>
......
......@@ -74,6 +74,7 @@ declare namespace I18n {
delete_tip_title: string
wipe_data: string
delete_all_tip_title: string
search: string
dialogue_module: {
continue_question_message: string
......@@ -158,7 +159,7 @@ declare namespace I18n {
knowledge_document_detail: string
multi_model_dialogue: string
explore: string
applications_square: string
application_square: string
}
personal_space_module: {
......@@ -419,7 +420,6 @@ declare namespace I18n {
}
applications_square_module: {
title: string
create_application_btn_text: string
all_application_btn_text: string
immediate_use_btn_text: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment