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

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

parents b22e6438 7ab11762
VITE_APP_ENV = 'DEV' VITE_APP_ENV = 'DEV'
VITE_APP_NAME = 'SuperLink' VITE_APP_NAME = 'ModelLink'
VITE_APP_THEME_COLOR = '#000DFF' VITE_APP_THEME_COLOR = '#000DFF'
VITE_PORT = 8848 VITE_PORT = 8848
......
VITE_APP_ENV = 'PROD' VITE_APP_ENV = 'PROD'
VITE_APP_NAME = 'SuperLink' VITE_APP_NAME = 'ModelLink'
VITE_APP_THEME_COLOR = '#000DFF' VITE_APP_THEME_COLOR = '#000DFF'
VITE_PUBLIC_PATH = /fe VITE_PUBLIC_PATH = /fe
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/> />
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_4711453_egfmzk2ywd.css" /> <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4711453_egfmzk2ywd.css" />
<title>SuperLink</title> <title>Model Link</title>
</head> </head>
<body> <body>
......
src/assets/images/logo.png

5.98 KB | W: | H:

src/assets/images/logo.png

4.61 KB | W: | H:

src/assets/images/logo.png
src/assets/images/logo.png
src/assets/images/logo.png
src/assets/images/logo.png
  • 2-up
  • Swipe
  • Onion skin
src/assets/images/page-logo.png

3.1 KB | W: | H:

src/assets/images/page-logo.png

5.34 KB | W: | H:

src/assets/images/page-logo.png
src/assets/images/page-logo.png
src/assets/images/page-logo.png
src/assets/images/page-logo.png
  • 2-up
  • Swipe
  • Onion skin
import { fetchEventSource } from '@microsoft/fetch-event-source' import { fetchEventSource } from '@microsoft/fetch-event-source'
import { BASE_URLS } from '@/config/base-url' import { BASE_URLS } from '@/config/base-url'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { useSystemLanguageStore } from '@/store/modules/system-language'
import { languageKeyTransform } from '@/utils/language-key-transform'
const EVENT_SOURCE_BASE_URL = `${BASE_URLS[window.ENV || 'DEV']}` const EVENT_SOURCE_BASE_URL = `${BASE_URLS[window.ENV || 'DEV']}`
...@@ -14,6 +16,7 @@ export function fetchCustomEventSource(config: { ...@@ -14,6 +16,7 @@ export function fetchCustomEventSource(config: {
onFinally?: () => void onFinally?: () => void
}) { }) {
const userStore = useUserStore() const userStore = useUserStore()
const systemLanguageStore = useSystemLanguageStore()
let responseError = false let responseError = false
fetchEventSource(`${EVENT_SOURCE_BASE_URL}${config.path}`, { fetchEventSource(`${EVENT_SOURCE_BASE_URL}${config.path}`, {
...@@ -21,6 +24,7 @@ export function fetchCustomEventSource(config: { ...@@ -21,6 +24,7 @@ export function fetchCustomEventSource(config: {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X-Request-Token': userStore.token || '', 'X-Request-Token': userStore.token || '',
'x-lang': languageKeyTransform(systemLanguageStore.currentLanguageInfo.key),
}, },
body: JSON.stringify(config.payload || {}), body: JSON.stringify(config.payload || {}),
signal: config.controller?.signal, signal: config.controller?.signal,
......
...@@ -119,7 +119,7 @@ login_module: ...@@ -119,7 +119,7 @@ login_module:
other_login_methods: 'Other login methods' other_login_methods: 'Other login methods'
home_module: home_module:
agent_welcome_message: 'Hi, welcome to SuperLink' agent_welcome_message: 'Hi, welcome to Model Link'
agent_description: 'Here, you can experience models and dedicated agents for multiple platforms' agent_description: 'Here, you can experience models and dedicated agents for multiple platforms'
currently_in_the_latest_session: 'This is the latest session' currently_in_the_latest_session: 'This is the latest session'
switching_over: 'Switching' switching_over: 'Switching'
......
...@@ -102,7 +102,7 @@ common_module: ...@@ -102,7 +102,7 @@ common_module:
goto: '跳转至' goto: '跳转至'
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: '请输入手机号'
...@@ -118,7 +118,7 @@ login_module: ...@@ -118,7 +118,7 @@ login_module:
other_login_methods: '其他登录方式' other_login_methods: '其他登录方式'
home_module: home_module:
agent_welcome_message: 'Hi, 欢迎使用SuperLink' agent_welcome_message: 'Hi, 欢迎使用Model Link'
agent_description: '在这里,你可以体验多个平台的模型和专属的智能体' agent_description: '在这里,你可以体验多个平台的模型和专属的智能体'
currently_in_the_latest_session: '当前已是最新会话' currently_in_the_latest_session: '当前已是最新会话'
switching_over: '切换中' switching_over: '切换中'
......
...@@ -120,7 +120,7 @@ login_module: ...@@ -120,7 +120,7 @@ login_module:
interrupt_the_conversation_and_apply_the_history_prompt: '當前回復尚未完成,是否確定打斷對話應用其它記錄?' interrupt_the_conversation_and_apply_the_history_prompt: '當前回復尚未完成,是否確定打斷對話應用其它記錄?'
home_module: home_module:
agent_welcome_message: 'Hi, 歡迎使用SuperLink' agent_welcome_message: 'Hi, 歡迎使用Model Link'
agent_description: '在這裏,你可以體驗多個平臺的模型和專屬的智' agent_description: '在這裏,你可以體驗多個平臺的模型和專屬的智'
currently_in_the_latest_session: '當前已是最新會話' currently_in_the_latest_session: '當前已是最新會話'
switching_over: '切換中' switching_over: '切換中'
......
...@@ -23,10 +23,10 @@ const defaultLanguageOptions = [ ...@@ -23,10 +23,10 @@ const defaultLanguageOptions = [
label: '中文繁體', label: '中文繁體',
key: 'zh-HK', key: 'zh-HK',
}, },
{ // {
label: 'English', // label: 'English',
key: 'en', // key: 'en',
}, // },
] ]
const localeKey = ss.get('i18nextLng') || defaultLocale const localeKey = ss.get('i18nextLng') || defaultLocale
...@@ -53,28 +53,3 @@ export const useSystemLanguageStore = defineStore('system-language-store', { ...@@ -53,28 +53,3 @@ export const useSystemLanguageStore = defineStore('system-language-store', {
}, },
}, },
}) })
// export const useSystemLanguageStore = defineStore('system-language-store', () => {
// const currentLanguageInfo = ref({
// key: localeKey,
// label: defaultLanguageOptions.find((optionItem) => optionItem.key === localeKey)!.label,
// })
// const languageOptions = readonly(defaultLanguageOptions)
// function updateCurrentLanguageInfo(key: I18n.LangType) {
// if (currentLanguageInfo.value.key === key) return ''
// ss.set('i18nextLng', key)
// const { locale } = useI18n()
// locale.value = key
// currentLanguageInfo.value = defaultLanguageOptions.find((optionItem) => optionItem.key === key) as {
// key: string
// label: string
// }
// }
// return { currentLanguageInfo, languageOptions, updateCurrentLanguageInfo }
// })
...@@ -304,7 +304,7 @@ function handleEmailCodeGain() { ...@@ -304,7 +304,7 @@ function handleEmailCodeGain() {
<template> <template>
<div class="bg-px-login_bg-png relative h-screen min-h-[750px] w-full min-w-[600px] bg-cover bg-center bg-no-repeat"> <div class="bg-px-login_bg-png relative h-screen min-h-[750px] w-full min-w-[600px] bg-cover bg-center bg-no-repeat">
<div <div
class="bg-px-logo-png z-100 absolute left-[60px] top-[25px] h-[29px] w-[119px] bg-contain bg-center bg-no-repeat" class="bg-px-logo-png z-100 absolute left-[60px] top-[25px] h-[29px] w-[119px] !bg-contain bg-center bg-no-repeat"
></div> ></div>
<div class="z-100 absolute right-[60px] top-[25px] w-[140px]"> <div class="z-100 absolute right-[60px] top-[25px] w-[140px]">
......
import { fetchEventSource } from '@microsoft/fetch-event-source' import { fetchEventSource } from '@microsoft/fetch-event-source'
import { BASE_URLS } from '@/config/base-url' import { BASE_URLS } from '@/config/base-url'
import { useUserStore } from '@/store/modules/user' import { useUserStore } from '@/store/modules/user'
import { useSystemLanguageStore } from '@/store/modules/system-language'
import { languageKeyTransform } from '@/utils/language-key-transform'
const EVENT_SOURCE_BASE_URL = `${BASE_URLS[window.ENV || 'DEV']}` const EVENT_SOURCE_BASE_URL = `${BASE_URLS[window.ENV || 'DEV']}`
...@@ -14,6 +16,7 @@ export function fetchEventStreamSource(config: { ...@@ -14,6 +16,7 @@ export function fetchEventStreamSource(config: {
onFinally?: () => void onFinally?: () => void
}) { }) {
const userStore = useUserStore() const userStore = useUserStore()
const systemLanguageStore = useSystemLanguageStore()
let responseError = false let responseError = false
fetchEventSource(`${EVENT_SOURCE_BASE_URL}${config.path}`, { fetchEventSource(`${EVENT_SOURCE_BASE_URL}${config.path}`, {
...@@ -21,6 +24,7 @@ export function fetchEventStreamSource(config: { ...@@ -21,6 +24,7 @@ export function fetchEventStreamSource(config: {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
'X-Request-Token': userStore.token || '', 'X-Request-Token': userStore.token || '',
'x-lang': languageKeyTransform(systemLanguageStore.currentLanguageInfo.key),
}, },
body: JSON.stringify(config.payload || {}), body: JSON.stringify(config.payload || {}),
signal: config.controller?.signal, signal: config.controller?.signal,
......
...@@ -54,7 +54,7 @@ const currentKnowledgeChunkInfo = ref<KnowledgeChunkItem>({ ...defaultKnowledgeC ...@@ -54,7 +54,7 @@ const currentKnowledgeChunkInfo = ref<KnowledgeChunkItem>({ ...defaultKnowledgeC
const documentIcon = computed(() => (documentUrl: string) => { const documentIcon = computed(() => (documentUrl: string) => {
const type = documentUrl.substring(documentUrl.lastIndexOf('.') + 1) const type = documentUrl.substring(documentUrl.lastIndexOf('.') + 1)
return `https://gsst-poe-sit.gz.bcebos.com/icon/${type}.png` return `https://gsst-poe-sit.gz.bcebos.com/icon/${type}.svg`
}) })
const emptyKnowledgeChunkListText = computed(() => { const emptyKnowledgeChunkListText = computed(() => {
......
...@@ -13,6 +13,7 @@ export interface KnowledgeItem { ...@@ -13,6 +13,7 @@ export interface KnowledgeItem {
trainStatus: TrainStatus trainStatus: TrainStatus
isOpen: 'Y' | 'N' isOpen: 'Y' | 'N'
createdTime: Date createdTime: Date
documentInfos: KnowledgeDocumentItem[]
} }
export interface SegmentationConfigInterface { export interface SegmentationConfigInterface {
......
...@@ -66,7 +66,7 @@ const trainFileFontColor = computed(() => (status: TrainStatus) => { ...@@ -66,7 +66,7 @@ const trainFileFontColor = computed(() => (status: TrainStatus) => {
const trainFileIcon = computed(() => (documentUrl: string) => { const trainFileIcon = computed(() => (documentUrl: string) => {
const type = documentUrl.substring(documentUrl.lastIndexOf('.') + 1) const type = documentUrl.substring(documentUrl.lastIndexOf('.') + 1)
return `https://gsst-poe-sit.gz.bcebos.com/icon/${type}.png` return `https://gsst-poe-sit.gz.bcebos.com/icon/${type}.svg`
}) })
const isTrainFileListFinish = computed(() => { const isTrainFileListFinish = computed(() => {
...@@ -132,7 +132,7 @@ function handleConfirm() { ...@@ -132,7 +132,7 @@ function handleConfirm() {
<div <div
v-show="![TrainStatus.COMPLETE, TrainStatus.FAIL].includes(trainFileItem.trainStatus)" v-show="![TrainStatus.COMPLETE, TrainStatus.FAIL].includes(trainFileItem.trainStatus)"
class="animate-training absolute left-0 top-[-1px] h-[90px] w-full bg-gradient-to-r from-transparent via-[#9EA0FF] to-transparent" class="animate-training absolute left-0 top-[-1px] h-[90px] w-full rounded-[10px] bg-gradient-to-r from-transparent via-[#9EA0FF] to-transparent"
/> />
</li> </li>
</ul> </ul>
......
...@@ -34,7 +34,7 @@ const emit = defineEmits<Emit>() ...@@ -34,7 +34,7 @@ const emit = defineEmits<Emit>()
const uploadFileList = ref<FileItem[]>([]) const uploadFileList = ref<FileItem[]>([])
const uploadFileIcon = (type: string) => { const uploadFileIcon = (type: string) => {
return `https://gsst-poe-sit.gz.bcebos.com/icon/${type}.png` return `https://gsst-poe-sit.gz.bcebos.com/icon/${type}.svg`
} }
const isDisabledNextBtn = computed(() => { const isDisabledNextBtn = computed(() => {
...@@ -258,7 +258,7 @@ function handleNextStep() { ...@@ -258,7 +258,7 @@ function handleNextStep() {
<div <div
v-show="[FileItemStatus.UPLOADING].includes(uploadFileItem.status)" v-show="[FileItemStatus.UPLOADING].includes(uploadFileItem.status)"
class="animate-training absolute left-0 top-[-1px] h-[92px] w-full bg-gradient-to-r from-transparent via-[#9EA0FF] to-transparent" class="animate-training absolute left-0 top-[-1px] h-[92px] w-full rounded-[10px] bg-gradient-to-r from-transparent via-[#9EA0FF] to-transparent"
/> />
</li> </li>
</ul> </ul>
......
...@@ -233,7 +233,7 @@ defineExpose({ ...@@ -233,7 +233,7 @@ defineExpose({
@click="handleMessageSend" @click="handleMessageSend"
/> />
<div v-show="!isLogin" class="absolute left-3 top-[5px] flex h-[34px] items-center text-[#84868c]"> <div v-show="!isLogin" class="absolute left-3 top-[5px] flex h-[30px] items-center text-[#84868c]">
{{ t('share_agent_module.please') }} {{ t('share_agent_module.please') }}
<span class="text-theme-color cursor-pointer px-1 hover:opacity-80" @click="handleToLogin"> <span class="text-theme-color cursor-pointer px-1 hover:opacity-80" @click="handleToLogin">
{{ t('common_module.login') }} {{ t('common_module.login') }}
......
...@@ -33,7 +33,7 @@ function handleToLogin() { ...@@ -33,7 +33,7 @@ function handleToLogin() {
<template> <template>
<header class="flex h-[48px] w-full items-center justify-between border-b border-[#e8e9eb] bg-white px-4"> <header class="flex h-[48px] w-full items-center justify-between border-b border-[#e8e9eb] bg-white px-4">
<div class="bg-px-logo-png h-[24px] w-[100px] bg-center bg-no-repeat" /> <div class="bg-px-logo-png bg-contain! h-[24px] w-[100px] bg-center bg-no-repeat" />
<div> <div>
<NButton <NButton
v-show="isLogin" v-show="isLogin"
......
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