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'
import type { MenuOption } from 'naive-ui'
import CustomIcon from '@/components/custom-icon/custom-icon.vue'
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()
......@@ -90,7 +90,7 @@ function handleMenuValueChange(key: string) {
<template>
<div class="flex h-full flex-col justify-between 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">
<n-button
......@@ -117,16 +117,18 @@ function handleMenuValueChange(key: string) {
</n-scrollbar>
</div>
<div class="mb-[20px] mt-6 px-[12px]">
<div class="mb-[20px] mt-6">
<div>
<NDropdown
v-if="userStore.isLogin"
trigger="click"
placement="top-start"
placement="top"
:options="avatarOptions"
@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" />
<div class="ml-3 line-clamp-1 max-w-[140px] select-none break-all text-base">
......@@ -142,9 +144,9 @@ function handleMenuValueChange(key: string) {
</div>
</div>
<div class="mt-[10px]">
<!-- <div class="mt-[10px]">
<LanguageSetting arrow-direction="top" />
</div>
</div> -->
</div>
</div>
</template>
......
......@@ -31,7 +31,7 @@ watchEffect(() => {
<NLayoutContent class="bg-[#f3f6f9]! flex-1">
<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 }"
>
<RouterView v-slot="{ Component }">
......
......@@ -3,12 +3,12 @@ import { createI18n } from 'vue-i18n'
import messages from './messages'
import { ss } from '@/utils/storage'
export const defaultLocale = 'zh-CN'
export const defaultLocale = 'zh-HK'
const i18n = createI18n<[I18n.Schema], I18n.LangType>({
legacy: false,
locale: ss.get('i18nextLng') || defaultLocale,
fallbackLocale: 'zh-HK',
fallbackLocale: 'zh-CN',
messages,
})
......
......@@ -83,7 +83,6 @@ common_module:
total_file: '1 file in total | {count} files in total'
expired_identity: 'Your identity has expired. Please login again'
dialogue_module:
continue_question_message: 'You can keep asking questions'
empty_message_content: '[Empty content]'
......@@ -110,8 +109,26 @@ common_module:
total: 'Total'
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:
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_password: 'Please enter password'
please_enter_your_cell_phone_number: 'Please enter your phone number'
......@@ -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_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:
title: 'Personal space'
create_btn_text: 'Newly build'
......
......@@ -82,7 +82,6 @@ common_module:
total_file: '共{count}个文件'
expired_identity: '身份已过期,请重新登录'
dialogue_module:
continue_question_message: '你可以继续提问'
empty_message_content: '[空内容]'
......@@ -109,6 +108,24 @@ common_module:
total: '共'
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:
app_welcome_words: 'Hi, 欢迎使用Model Link'
please_enter_your_account_number: '请输入账号'
......@@ -127,7 +144,7 @@ login_module:
home_module:
agent_welcome_message: 'Hi, 欢迎使用Model Link'
agent_description: '在这里,你可以体验多个平台的模型和专属的智能体'
agent_description: '在这里,你可以体验多个平台的模型和创建专属的智能体'
currently_in_the_latest_session: '当前已是最新会话'
switching_over: '切换中'
history_application_success: '历史记录应用成功'
......@@ -143,23 +160,6 @@ home_module:
interrupt_dialogue_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:
title: '个人空间'
create_btn_text: '新建'
......
......@@ -108,8 +108,26 @@ common_module:
total: '共'
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:
app_welcome_words: '歡迎使用萃想POC'
app_welcome_words: 'Hi, 歡迎使用Model Link'
please_enter_your_account_number: '請輸入賬號'
please_enter_your_password: '請輸入密碼'
please_enter_your_cell_phone_number: '請輸入手機號'
......@@ -128,7 +146,7 @@ login_module:
home_module:
agent_welcome_message: 'Hi, 歡迎使用Model Link'
agent_description: '在這裏,你可以體驗多個平臺的模型和專屬的智'
agent_description: '在這裏,你可以體驗多個平臺的模型和創建專屬的智能體'
currently_in_the_latest_session: '當前已是最新會話'
switching_over: '切換中'
history_application_success: '歷史記錄應用成功'
......@@ -142,23 +160,6 @@ home_module:
history_record_item_apply_tip: '是否確定應用此會話記錄?'
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:
title: '個人空間'
create_btn_text: '新建'
......
......@@ -178,9 +178,9 @@ function handleAddAgentApplications() {
<div>
<n-collapse-transition :show="isShowCarousel">
<div>
<n-carousel autoplay class="h-[280px] w-full rounded-[10px] object-cover 2xl:object-fill">
<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 autoplay class="h-[280px] w-full rounded-[20px] object-cover 2xl:object-fill">
<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" /> -->
</n-carousel>
</div>
<div class="h-[20px] bg-[#f3f6f9]"></div>
......
......@@ -42,9 +42,17 @@ const isSelectAllRecord = computed(() => {
getSessionHistoryRecordList()
})()
function getSessionHistoryRecordList() {
function getSessionHistoryRecordList(isCreateNewSessionCheck = false) {
fetchSessionHistoryRecordList<SessionHistoryRecordItem[]>().then((res) => {
sessionHistoryRecordList.value = res.data
if (
isCreateNewSessionCheck &&
props.currentSessionId &&
sessionHistoryRecordList.value.find((item) => item.dialogsId !== props.currentSessionId)
) {
emit('createNewSession')
}
})
}
......@@ -104,10 +112,9 @@ function handleRecordDelete() {
window.$message.success(t('common_module.delete_success_message'))
isHistoryListEdit.value = false
currentSelectHistoryRecordList.value = []
emit('createNewSession')
getSessionHistoryRecordList()
getSessionHistoryRecordList(true)
})
})
.catch(() => {
......
......@@ -35,7 +35,7 @@ const smsLoginFormRef = useTemplateRef<FormInst>('smsLoginFormRef')
const emailLoginFormRef = useTemplateRef<FormInst>('emailLoginFormRef')
const countdownRef = useTemplateRef<CountdownInst>('countdownRef')
const currentLoginMethod = ref<LoginMethod>('password')
const currentLoginMethod = ref<LoginMethod>('sms')
const showCardReserveAnimation = ref(false)
const loginBtnLoading = ref(false)
......@@ -232,6 +232,8 @@ function handleLoginSubmit(method: LoginMethod) {
memberId: res.data.memberId,
mobilePhone: res.data.mobilePhone,
nickName: res.data.nickName,
remark: res.data.remark,
email: res.data.email,
})
const redirectUrl = decodeURIComponent((route.query.redirect as string) || '')
......
......@@ -5,7 +5,7 @@ export default defineConfig({
[
/^bg-svg-([\w-]+)$/,
([, dirFname]) => {
let url = '@/assets/images/'
let url = '@/assets/svgs/'
const dirFnameArr = dirFname.split('-')
......@@ -13,12 +13,12 @@ export default defineConfig({
const [dirStr, fname] = dirFnameArr
const dirPath = dirStr.split('_').join('/')
url += `${dirPath}/${fname.replace(/_/g, '-')}`
url += `${dirPath}/${fname.replace(/_/g, '-')}.svg`
} 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