Commit 1d0f31cc authored by shirlyn.guo's avatar shirlyn.guo 👌🏻

Merge branch 'master' of https://gitlab.gsstcloud.com/poc/poc-fe into shirlyn

parents 0e22563a a201868b
This diff is collapsed.
...@@ -6,7 +6,7 @@ import { Plus } from '@icon-park/vue-next' ...@@ -6,7 +6,7 @@ import { Plus } from '@icon-park/vue-next'
import type { MenuOption } from 'naive-ui' import type { MenuOption } from 'naive-ui'
import CustomIcon from '@/components/custom-icon/custom-icon.vue' import CustomIcon from '@/components/custom-icon/custom-icon.vue'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import LanguageSetting from '@/components/language-setting/language-setting.vue' // import LanguageSetting from '@/components/language-setting/language-setting.vue'
const { t } = useI18n() const { t } = useI18n()
...@@ -90,7 +90,7 @@ function handleMenuValueChange(key: string) { ...@@ -90,7 +90,7 @@ function handleMenuValueChange(key: string) {
<template> <template>
<div class="flex h-full flex-col justify-between overflow-hidden"> <div class="flex h-full flex-col justify-between overflow-hidden">
<div class="flex flex-1 flex-col overflow-hidden"> <div class="flex flex-1 flex-col overflow-hidden">
<div class="bg-px-page_logo-png mx-auto flex h-[50px] w-full shrink-0 bg-contain bg-center bg-no-repeat" /> <div class="bg-svg-page_logo mx-auto flex h-[50px] w-full shrink-0 bg-contain bg-center bg-no-repeat" />
<div class="px-3 py-5"> <div class="px-3 py-5">
<n-button <n-button
...@@ -117,16 +117,18 @@ function handleMenuValueChange(key: string) { ...@@ -117,16 +117,18 @@ function handleMenuValueChange(key: string) {
</n-scrollbar> </n-scrollbar>
</div> </div>
<div class="mb-[20px] mt-6 px-[12px]"> <div class="mb-[20px] mt-6">
<div> <div>
<NDropdown <NDropdown
v-if="userStore.isLogin" v-if="userStore.isLogin"
trigger="click" trigger="click"
placement="top-start" placement="top"
:options="avatarOptions" :options="avatarOptions"
@select="handleDropdownSelect" @select="handleDropdownSelect"
> >
<div class="flex h-full cursor-pointer items-center"> <div
class="flex h-full cursor-pointer items-center rounded-[6px] px-[12px] py-[4px] transition hover:bg-[#F3F3F5]"
>
<NAvatar round :size="40" object-fit="cover" :src="userStore.userInfo.avatarUrl || defaultAvatar" /> <NAvatar round :size="40" object-fit="cover" :src="userStore.userInfo.avatarUrl || defaultAvatar" />
<div class="ml-3 line-clamp-1 max-w-[140px] select-none break-all text-base"> <div class="ml-3 line-clamp-1 max-w-[140px] select-none break-all text-base">
...@@ -142,9 +144,9 @@ function handleMenuValueChange(key: string) { ...@@ -142,9 +144,9 @@ function handleMenuValueChange(key: string) {
</div> </div>
</div> </div>
<div class="mt-[10px]"> <!-- <div class="mt-[10px]">
<LanguageSetting arrow-direction="top" /> <LanguageSetting arrow-direction="top" />
</div> </div> -->
</div> </div>
</div> </div>
</template> </template>
......
...@@ -31,7 +31,7 @@ watchEffect(() => { ...@@ -31,7 +31,7 @@ watchEffect(() => {
<NLayoutContent class="bg-[#f3f6f9]! flex-1"> <NLayoutContent class="bg-[#f3f6f9]! flex-1">
<main <main
class="main-content-container box-border h-full transition-[padding] duration-300 ease-in-out" class="main-content-container m-auto box-border h-full max-w-[1669px] transition-[padding] duration-300 ease-in-out"
:class="{ 'px-6': isShowMainContentContainerPadding, 'py-4': isShowMainContentContainerPadding }" :class="{ 'px-6': isShowMainContentContainerPadding, 'py-4': isShowMainContentContainerPadding }"
> >
<RouterView v-slot="{ Component }"> <RouterView v-slot="{ Component }">
......
...@@ -3,12 +3,12 @@ import { createI18n } from 'vue-i18n' ...@@ -3,12 +3,12 @@ import { createI18n } from 'vue-i18n'
import messages from './messages' import messages from './messages'
import { ss } from '@/utils/storage' import { ss } from '@/utils/storage'
export const defaultLocale = 'zh-CN' export const defaultLocale = 'zh-HK'
const i18n = createI18n<[I18n.Schema], I18n.LangType>({ const i18n = createI18n<[I18n.Schema], I18n.LangType>({
legacy: false, legacy: false,
locale: ss.get('i18nextLng') || defaultLocale, locale: ss.get('i18nextLng') || defaultLocale,
fallbackLocale: 'zh-HK', fallbackLocale: 'zh-CN',
messages, messages,
}) })
......
...@@ -83,7 +83,6 @@ common_module: ...@@ -83,7 +83,6 @@ common_module:
total_file: '1 file in total | {count} files in total' total_file: '1 file in total | {count} files in total'
expired_identity: 'Your identity has expired. Please login again' expired_identity: 'Your identity has expired. Please login again'
dialogue_module: dialogue_module:
continue_question_message: 'You can keep asking questions' continue_question_message: 'You can keep asking questions'
empty_message_content: '[Empty content]' empty_message_content: '[Empty content]'
...@@ -110,8 +109,26 @@ common_module: ...@@ -110,8 +109,26 @@ common_module:
total: 'Total' total: 'Total'
goto: 'Skip to' goto: 'Skip to'
router_title_module:
login: 'Login'
server_error: 'Server error'
universal: 'The page was not found'
home: 'Home page'
personal: 'Personal space'
app_setting: 'Application Settings'
agent_application: 'Agent application'
share_application: 'My Agent application'
knowledge: 'Knowledge base'
upload_knowledge_document: 'Uploading Knowledge Base Documents'
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_settings: 'Personal settings'
login_module: login_module:
app_welcome_words: 'Welcome to CuiXiang POC' app_welcome_words: 'Hi, welcome to Model Link'
please_enter_your_account_number: 'Please enter your account number' please_enter_your_account_number: 'Please enter your account number'
please_enter_your_password: 'Please enter password' please_enter_your_password: 'Please enter password'
please_enter_your_cell_phone_number: 'Please enter your phone number' please_enter_your_cell_phone_number: 'Please enter your phone number'
...@@ -144,23 +161,6 @@ home_module: ...@@ -144,23 +161,6 @@ home_module:
interrupt_dialogue_prompt: 'The current reply is not complete. Are you sure to interrupt and initiate a new session?' interrupt_dialogue_prompt: 'The current reply is not complete. Are you sure to interrupt and initiate a new session?'
interrupt_the_conversation_and_apply_the_history_prompt: 'The current reply is not complete, are you sure to interrupt the conversation and apply another record?' interrupt_the_conversation_and_apply_the_history_prompt: 'The current reply is not complete, are you sure to interrupt the conversation and apply another record?'
router_title_module:
login: 'Login'
server_error: 'Server error'
universal: 'The page was not found'
home: 'Home page'
personal: 'Personal space'
app_setting: 'Application Settings'
agent_application: 'Agent application'
share_application: 'My Agent application'
knowledge: 'Knowledge base'
upload_knowledge_document: 'Uploading Knowledge Base Documents'
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: personal_space_module:
title: 'Personal space' title: 'Personal space'
create_btn_text: 'Newly build' create_btn_text: 'Newly build'
......
...@@ -82,7 +82,6 @@ common_module: ...@@ -82,7 +82,6 @@ common_module:
total_file: '共{count}个文件' total_file: '共{count}个文件'
expired_identity: '身份已过期,请重新登录' expired_identity: '身份已过期,请重新登录'
dialogue_module: dialogue_module:
continue_question_message: '你可以继续提问' continue_question_message: '你可以继续提问'
empty_message_content: '[空内容]' empty_message_content: '[空内容]'
...@@ -109,6 +108,24 @@ common_module: ...@@ -109,6 +108,24 @@ common_module:
total: '共' total: '共'
goto: '跳转至' goto: '跳转至'
router_title_module:
login: '登录'
server_error: '服务器错误'
universal: '未找到该页面'
home: '首页'
personal: '个人空间'
app_setting: '应用设置'
agent_application: 'Agent应用'
share_application: '我的Agent应用'
knowledge: '知识库'
upload_knowledge_document: '上传知识库文档'
knowledge_document_list: '知识库文档列表'
knowledge_document_detail: '知识库文档详情'
multi_model_dialogue: '多模型调试'
explore: '探索'
application_square: '应用广场'
personal_settings: '个人设置'
login_module: login_module:
app_welcome_words: 'Hi, 欢迎使用Model Link' app_welcome_words: 'Hi, 欢迎使用Model Link'
please_enter_your_account_number: '请输入账号' please_enter_your_account_number: '请输入账号'
...@@ -127,7 +144,7 @@ login_module: ...@@ -127,7 +144,7 @@ login_module:
home_module: home_module:
agent_welcome_message: 'Hi, 欢迎使用Model Link' agent_welcome_message: 'Hi, 欢迎使用Model Link'
agent_description: '在这里,你可以体验多个平台的模型和专属的智能体' agent_description: '在这里,你可以体验多个平台的模型和创建专属的智能体'
currently_in_the_latest_session: '当前已是最新会话' currently_in_the_latest_session: '当前已是最新会话'
switching_over: '切换中' switching_over: '切换中'
history_application_success: '历史记录应用成功' history_application_success: '历史记录应用成功'
...@@ -143,23 +160,6 @@ home_module: ...@@ -143,23 +160,6 @@ home_module:
interrupt_dialogue_prompt: '当前回复尚未完成,是否确定打断发起新会话?' interrupt_dialogue_prompt: '当前回复尚未完成,是否确定打断发起新会话?'
interrupt_the_conversation_and_apply_the_history_prompt: '当前回复尚未完成,是否确定打断对话应用其它记录?' interrupt_the_conversation_and_apply_the_history_prompt: '当前回复尚未完成,是否确定打断对话应用其它记录?'
router_title_module:
login: '登录'
server_error: '服务器错误'
universal: '未找到该页面'
home: '首页'
personal: '个人空间'
app_setting: '应用设置'
agent_application: 'Agent应用'
share_application: '我的Agent应用'
knowledge: '知识库'
upload_knowledge_document: '上传知识库文档'
knowledge_document_list: '知识库文档列表'
knowledge_document_detail: '知识库文档详情'
multi_model_dialogue: '多模型调试'
explore: '探索'
application_square: '应用广场'
personal_space_module: personal_space_module:
title: '个人空间' title: '个人空间'
create_btn_text: '新建' create_btn_text: '新建'
......
...@@ -108,8 +108,26 @@ common_module: ...@@ -108,8 +108,26 @@ common_module:
total: '共' total: '共'
goto: '跳轉至' goto: '跳轉至'
router_title_module:
login: '登錄'
server_error: '服務器錯誤'
universal: '未找到該頁面'
home: '首頁'
personal: '個人空間'
app_setting: '應用設置'
agent_application: 'Agent應用'
share_application: '我的Agent應用'
knowledge: '知識庫'
upload_knowledge_document: '上傳知識庫文檔'
knowledge_document_list: '知識庫文檔列表'
knowledge_document_detail: '知識庫文檔詳情'
multi_model_dialogue: '多模型調試'
explore: '探索'
application_square: '應用廣場'
personal_settings: '個人設置'
login_module: login_module:
app_welcome_words: '歡迎使用萃想POC' app_welcome_words: 'Hi, 歡迎使用Model Link'
please_enter_your_account_number: '請輸入賬號' please_enter_your_account_number: '請輸入賬號'
please_enter_your_password: '請輸入密碼' please_enter_your_password: '請輸入密碼'
please_enter_your_cell_phone_number: '請輸入手機號' please_enter_your_cell_phone_number: '請輸入手機號'
...@@ -128,7 +146,7 @@ login_module: ...@@ -128,7 +146,7 @@ login_module:
home_module: home_module:
agent_welcome_message: 'Hi, 歡迎使用Model Link' agent_welcome_message: 'Hi, 歡迎使用Model Link'
agent_description: '在這裏,你可以體驗多個平臺的模型和專屬的智' agent_description: '在這裏,你可以體驗多個平臺的模型和創建專屬的智能體'
currently_in_the_latest_session: '當前已是最新會話' currently_in_the_latest_session: '當前已是最新會話'
switching_over: '切換中' switching_over: '切換中'
history_application_success: '歷史記錄應用成功' history_application_success: '歷史記錄應用成功'
...@@ -142,23 +160,6 @@ home_module: ...@@ -142,23 +160,6 @@ home_module:
history_record_item_apply_tip: '是否確定應用此會話記錄?' history_record_item_apply_tip: '是否確定應用此會話記錄?'
historical_record: '歷史記錄' historical_record: '歷史記錄'
router_title_module:
login: '登錄'
server_error: '服務器錯誤'
universal: '未找到該頁面'
home: '首頁'
personal: '個人空間'
app_setting: '應用設置'
agent_application: 'Agent應用'
share_application: '我的Agent應用'
knowledge: '知識庫'
upload_knowledge_document: '上傳知識庫文檔'
knowledge_document_list: '知識庫文檔列表'
knowledge_document_detail: '知識庫文檔詳情'
multi_model_dialogue: '多模型調試'
explore: '探索'
application_square: '應用廣場'
personal_space_module: personal_space_module:
title: '個人空間' title: '個人空間'
create_btn_text: '新建' create_btn_text: '新建'
......
...@@ -178,9 +178,9 @@ function handleAddAgentApplications() { ...@@ -178,9 +178,9 @@ function handleAddAgentApplications() {
<div> <div>
<n-collapse-transition :show="isShowCarousel"> <n-collapse-transition :show="isShowCarousel">
<div> <div>
<n-carousel autoplay class="h-[280px] w-full rounded-[10px] object-cover 2xl:object-fill"> <n-carousel autoplay class="h-[280px] w-full rounded-[20px] object-cover 2xl:object-fill">
<img class="h-[280px] w-full object-cover" src="@/assets/images/application-square-carousel.png" /> <img class="h-full w-full object-cover" src="@/assets/images/application-square-carousel.png" />
<img class="h-[280px] w-full object-cover" src="@/assets/images/application-square-carousel.png" /> <!-- <img class="h-[280px] w-full object-cover" src="@/assets/images/application-square-carousel.png" /> -->
</n-carousel> </n-carousel>
</div> </div>
<div class="h-[20px] bg-[#f3f6f9]"></div> <div class="h-[20px] bg-[#f3f6f9]"></div>
......
...@@ -42,9 +42,17 @@ const isSelectAllRecord = computed(() => { ...@@ -42,9 +42,17 @@ const isSelectAllRecord = computed(() => {
getSessionHistoryRecordList() getSessionHistoryRecordList()
})() })()
function getSessionHistoryRecordList() { function getSessionHistoryRecordList(isCreateNewSessionCheck = false) {
fetchSessionHistoryRecordList<SessionHistoryRecordItem[]>().then((res) => { fetchSessionHistoryRecordList<SessionHistoryRecordItem[]>().then((res) => {
sessionHistoryRecordList.value = res.data sessionHistoryRecordList.value = res.data
if (
isCreateNewSessionCheck &&
props.currentSessionId &&
sessionHistoryRecordList.value.find((item) => item.dialogsId !== props.currentSessionId)
) {
emit('createNewSession')
}
}) })
} }
...@@ -104,10 +112,9 @@ function handleRecordDelete() { ...@@ -104,10 +112,9 @@ function handleRecordDelete() {
window.$message.success(t('common_module.delete_success_message')) window.$message.success(t('common_module.delete_success_message'))
isHistoryListEdit.value = false isHistoryListEdit.value = false
currentSelectHistoryRecordList.value = []
emit('createNewSession') getSessionHistoryRecordList(true)
getSessionHistoryRecordList()
}) })
}) })
.catch(() => { .catch(() => {
......
...@@ -35,7 +35,7 @@ const smsLoginFormRef = useTemplateRef<FormInst>('smsLoginFormRef') ...@@ -35,7 +35,7 @@ const smsLoginFormRef = useTemplateRef<FormInst>('smsLoginFormRef')
const emailLoginFormRef = useTemplateRef<FormInst>('emailLoginFormRef') const emailLoginFormRef = useTemplateRef<FormInst>('emailLoginFormRef')
const countdownRef = useTemplateRef<CountdownInst>('countdownRef') const countdownRef = useTemplateRef<CountdownInst>('countdownRef')
const currentLoginMethod = ref<LoginMethod>('password') const currentLoginMethod = ref<LoginMethod>('sms')
const showCardReserveAnimation = ref(false) const showCardReserveAnimation = ref(false)
const loginBtnLoading = ref(false) const loginBtnLoading = ref(false)
...@@ -232,6 +232,8 @@ function handleLoginSubmit(method: LoginMethod) { ...@@ -232,6 +232,8 @@ function handleLoginSubmit(method: LoginMethod) {
memberId: res.data.memberId, memberId: res.data.memberId,
mobilePhone: res.data.mobilePhone, mobilePhone: res.data.mobilePhone,
nickName: res.data.nickName, nickName: res.data.nickName,
remark: res.data.remark,
email: res.data.email,
}) })
const redirectUrl = decodeURIComponent((route.query.redirect as string) || '') const redirectUrl = decodeURIComponent((route.query.redirect as string) || '')
......
...@@ -5,7 +5,7 @@ export default defineConfig({ ...@@ -5,7 +5,7 @@ export default defineConfig({
[ [
/^bg-svg-([\w-]+)$/, /^bg-svg-([\w-]+)$/,
([, dirFname]) => { ([, dirFname]) => {
let url = '@/assets/images/' let url = '@/assets/svgs/'
const dirFnameArr = dirFname.split('-') const dirFnameArr = dirFname.split('-')
...@@ -13,12 +13,12 @@ export default defineConfig({ ...@@ -13,12 +13,12 @@ export default defineConfig({
const [dirStr, fname] = dirFnameArr const [dirStr, fname] = dirFnameArr
const dirPath = dirStr.split('_').join('/') const dirPath = dirStr.split('_').join('/')
url += `${dirPath}/${fname.replace(/_/g, '-')}` url += `${dirPath}/${fname.replace(/_/g, '-')}.svg`
} else { } else {
url += `${dirFname.replace(/_/g, '-')}` url += `${dirFname.replace(/_/g, '-')}.svg`
} }
return { 'background-image': `url(@/assets/svgs/${url}.svg)`, 'background-size': 'cover' } return { 'background-image': `url(${url})`, 'background-size': 'cover' }
}, },
], ],
[ [
......
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