Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/FiDA_Front
This commit is contained in:
@@ -55,3 +55,33 @@ export const getProjectList = (params) => {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改项目信息
|
||||||
|
* @param id 项目id
|
||||||
|
* @param data 修改项目信息参数
|
||||||
|
* @param data.name 项目名称
|
||||||
|
* @param data.type 项目类型
|
||||||
|
* @param data.region 项目区域
|
||||||
|
* @param data.style 项目风格
|
||||||
|
* @param data.temperature 项目温度
|
||||||
|
* @returns 修改项目信息
|
||||||
|
*/
|
||||||
|
export const updateProject = (id: string, data: Object) => {
|
||||||
|
return request({
|
||||||
|
url: `/api/project/${id}`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 删除项目
|
||||||
|
* @param id 项目id
|
||||||
|
* @returns 删除项目
|
||||||
|
*/
|
||||||
|
export const deleteProject = (id: string) => {
|
||||||
|
return request({
|
||||||
|
url: `/api/project/${id}`,
|
||||||
|
method: 'delete',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ export class StateManager {
|
|||||||
}
|
}
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
this.vueFlow = options.vueFlow
|
this.vueFlow = options.vueFlow
|
||||||
|
this.zoom = ref(1)
|
||||||
this.nodes = ref<NodesItem[]>([]);
|
this.nodes = ref<NodesItem[]>([]);
|
||||||
this.nodes_ = computed(() => {
|
this.nodes_ = computed(() => {
|
||||||
return this.nodes.value.map((node, index) => {
|
return this.nodes.value.map((node, index) => {
|
||||||
@@ -61,7 +62,6 @@ export class StateManager {
|
|||||||
return arr
|
return arr
|
||||||
})
|
})
|
||||||
|
|
||||||
this.zoom = ref(1)
|
|
||||||
}
|
}
|
||||||
/** 添加节点 */
|
/** 添加节点 */
|
||||||
addNode(node: NodesItem) {
|
addNode(node: NodesItem) {
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
<p></p>
|
<p></p>
|
||||||
<div class="btn" @click="onSetting">
|
<div class="btn" @click="onSetting">
|
||||||
<span class="icon"><svg-icon name="setting" size="18" /></span>
|
<span class="icon"><svg-icon name="setting" size="18" /></span>
|
||||||
<span class="label">Settings</span>
|
<span class="label">{{ $t('Home.setting') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn" @click="onLogout">
|
<div class="btn" @click="onLogout">
|
||||||
<span class="icon"><svg-icon name="logout" size="18" /></span>
|
<span class="icon"><svg-icon name="logout" size="18" /></span>
|
||||||
<span class="label">Log out</span>
|
<span class="label">{{ $t('Home.logout') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
|
|||||||
@@ -60,7 +60,45 @@ export default {
|
|||||||
history: 'History',
|
history: 'History',
|
||||||
today: 'Today',
|
today: 'Today',
|
||||||
yesterday: 'Yesterday',
|
yesterday: 'Yesterday',
|
||||||
earlierChat: 'Earlier Chat'
|
earlierChat: 'Earlier Chat',
|
||||||
|
rename: 'Rename',
|
||||||
|
delete: 'Delete',
|
||||||
|
setting: 'Setting',
|
||||||
|
logout: 'Logout',
|
||||||
|
general: 'General',
|
||||||
|
profile: 'Profile',
|
||||||
|
learnMore: 'Learn More',
|
||||||
|
userName: 'User Name',
|
||||||
|
email: 'Email',
|
||||||
|
language: 'Language',
|
||||||
|
logoutDevice: 'Log out on this device',
|
||||||
|
region: 'Region',
|
||||||
|
role: 'Role',
|
||||||
|
currentAgentProfile: 'Current Agent Profile',
|
||||||
|
currentNotificationFrequency: 'Current Notification Frequency',
|
||||||
|
timesPerHour: '{time} times per hour',
|
||||||
|
userAgreement: 'User Agreement',
|
||||||
|
privacyPolicy: 'Privacy Policy',
|
||||||
|
view: 'View',
|
||||||
|
},
|
||||||
|
Country:{
|
||||||
|
unitedStates: 'United States',
|
||||||
|
singapore: 'Singapore',
|
||||||
|
australia: 'Australia',
|
||||||
|
southKorea: 'South Korea',
|
||||||
|
china: 'China',
|
||||||
|
italy: 'Italy',
|
||||||
|
france: 'France',
|
||||||
|
japan: 'Japan',
|
||||||
|
canada: 'Canada',
|
||||||
|
germany: 'Germany',
|
||||||
|
},
|
||||||
|
Role: {
|
||||||
|
designer: 'Designer',
|
||||||
|
student: 'Student',
|
||||||
|
teacher: 'Teacher',
|
||||||
|
parent: 'Parent',
|
||||||
|
other: 'Other',
|
||||||
},
|
},
|
||||||
Input: {
|
Input: {
|
||||||
placeholder: 'Please input',
|
placeholder: 'Please input',
|
||||||
|
|||||||
@@ -61,7 +61,45 @@ export default {
|
|||||||
history: '历史记录',
|
history: '历史记录',
|
||||||
today: '今天',
|
today: '今天',
|
||||||
yesterday: '昨天',
|
yesterday: '昨天',
|
||||||
earlierChat: '更早的'
|
earlierChat: '更早的',
|
||||||
|
rename: '重命名',
|
||||||
|
delete: '删除',
|
||||||
|
setting: '设置',
|
||||||
|
logout: '退出登录',
|
||||||
|
general: '通用',
|
||||||
|
profile: '个人资料',
|
||||||
|
learnMore: '了解更多',
|
||||||
|
userName: '用户名',
|
||||||
|
email: '邮箱',
|
||||||
|
language: '语言',
|
||||||
|
logoutDevice: '退出当前设备',
|
||||||
|
region: '地区',
|
||||||
|
role: '角色',
|
||||||
|
currentAgentProfile: '当前智能体个人资料',
|
||||||
|
currentNotificationFrequency: '当前通知频率',
|
||||||
|
timesPerHour: '{time} 次/小时',
|
||||||
|
userAgreement: '用户协议',
|
||||||
|
privacyPolicy: '隐私政策',
|
||||||
|
view: '查看',
|
||||||
|
},
|
||||||
|
Country: {
|
||||||
|
unitedStates: '美国',
|
||||||
|
singapore: '新加坡',
|
||||||
|
australia: '澳大利亚',
|
||||||
|
southKorea: '韩国',
|
||||||
|
china: '中国',
|
||||||
|
italy: '意大利',
|
||||||
|
france: '法国',
|
||||||
|
japan: '日本',
|
||||||
|
canada: '加拿大',
|
||||||
|
germany: '德国',
|
||||||
|
},
|
||||||
|
Role: {
|
||||||
|
designer: '设计师',
|
||||||
|
student: '学生',
|
||||||
|
teacher: '教师',
|
||||||
|
parent: '家长',
|
||||||
|
other: '其他',
|
||||||
},
|
},
|
||||||
Input: {
|
Input: {
|
||||||
placeholder: '请输入',
|
placeholder: '请输入',
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="agent-title">{{ props.title }}</div>
|
<div class="agent-title">{{ props.title }}</div>
|
||||||
<div class="agent-name">AI Assistant 1.0</div>
|
<div class="agent-name">AI Assistant 1.0</div>
|
||||||
</div>
|
</div>
|
||||||
<SvgIcon name="equal" color="#0d0d0d" size="24" />
|
<!-- <SvgIcon name="equal" color="#0d0d0d" size="24" /> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="agent-body flex-1 flex flex-col">
|
<div class="agent-body flex-1 flex flex-col">
|
||||||
<List ref="listRef" :message-list="messageList" @regenerate="handleRegenerate" />
|
<List ref="listRef" :message-list="messageList" @regenerate="handleRegenerate" />
|
||||||
@@ -447,7 +447,6 @@
|
|||||||
.agent-header {
|
.agent-header {
|
||||||
height: 7.4rem;
|
height: 7.4rem;
|
||||||
border-bottom: 0.1rem solid #c9c9c9;
|
border-bottom: 0.1rem solid #c9c9c9;
|
||||||
font-family: 'GeneralMedium';
|
|
||||||
padding: 1.4rem 3.4rem 1.4rem 3.1rem;
|
padding: 1.4rem 3.4rem 1.4rem 3.1rem;
|
||||||
|
|
||||||
.agent-title {
|
.agent-title {
|
||||||
|
|||||||
@@ -187,7 +187,6 @@
|
|||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 0.2rem solid #e5e5e5;
|
border: 0.2rem solid #e5e5e5;
|
||||||
font-family: 'GeneralMedium';
|
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
padding: 0 0.9rem 0 1.4rem;
|
padding: 0 0.9rem 0 1.4rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
padding: 1.5rem 1.45rem;
|
padding: 1.5rem 1.45rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
border-radius: 2rem;
|
border-radius: 3rem;
|
||||||
position: relative;
|
position: relative;
|
||||||
background: white;
|
background: white;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
rgba(233, 121, 60, 0.8) 1.61%,
|
rgba(233, 121, 60, 0.8) 1.61%,
|
||||||
rgba(255, 207, 144, 0.8) 101.01%
|
rgba(255, 207, 144, 0.8) 101.01%
|
||||||
);
|
);
|
||||||
border-radius: 2.2rem;
|
border-radius: 2.5rem;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.preview-wrapper {
|
.preview-wrapper {
|
||||||
width: 91.2rem;
|
width: 56%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -730,7 +730,6 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border: 0.1rem solid rgba(0, 0, 0, 0.1);
|
border: 0.1rem solid rgba(0, 0, 0, 0.1);
|
||||||
font-family: 'GeneralMedium';
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
min-height: initial;
|
min-height: initial;
|
||||||
@@ -854,7 +853,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fida-style-popover-header {
|
.fida-style-popover-header {
|
||||||
font-family: 'GeneralMedium';
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
color: #000;
|
color: #000;
|
||||||
@@ -908,7 +906,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fida-style-popover-item .fida-option-label {
|
.fida-style-popover-item .fida-option-label {
|
||||||
font-family: 'GeneralMedium';
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -934,7 +931,6 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 3.8rem;
|
border-radius: 3.8rem;
|
||||||
font-family: 'GeneralMedium';
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -1031,7 +1027,6 @@
|
|||||||
height: 4.4rem;
|
height: 4.4rem;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
border: 0.11rem solid #0000001a;
|
border: 0.11rem solid #0000001a;
|
||||||
font-family: 'GeneralMedium';
|
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
column-gap: 0;
|
column-gap: 0;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<span class="title" v-show="!isCollapse">{{ $t('Home.home') }}</span>
|
<span class="title" v-show="!isCollapse">{{ $t('Home.home') }}</span>
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="menu-item" @click="onTest">
|
<div class="menu-item" @click="onTest">
|
||||||
<span class="title" v-show="!isCollapse">TEST</span>
|
<span class="title">TEST</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu-item" @click="onHistory" :class="{ active: showHistory }">
|
<div class="menu-item" @click="onHistory" :class="{ active: showHistory }">
|
||||||
<span class="icon"><svg-icon name="history" size="24" /></span>
|
<span class="icon"><svg-icon name="history" size="24" /></span>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="history-list" v-show="!isCollapse && showHistory">
|
<div class="history-list" v-show="!isCollapse && showHistory">
|
||||||
<div v-for="item in historyList" :key="item.name" class="history-item">
|
<div v-for="item in list" :key="item.name" class="history-item">
|
||||||
<div v-if="item.title" class="title">{{ item.name }}</div>
|
<div v-if="item.title" class="title">{{ item.name }}</div>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
@@ -34,18 +34,33 @@
|
|||||||
@click="onClickHistoryItem(item)"
|
@click="onClickHistoryItem(item)"
|
||||||
:class="{ active: item.id == id }"
|
:class="{ active: item.id == id }"
|
||||||
>
|
>
|
||||||
<span>{{ item.name }}</span>
|
<input
|
||||||
|
v-show="item.edit"
|
||||||
|
type="text"
|
||||||
|
:value="item.name"
|
||||||
|
ref="inputRef"
|
||||||
|
:input-id="item.id"
|
||||||
|
@click.stop
|
||||||
|
@keyup.enter="(e) => onEnterHistoryItem(e, item)"
|
||||||
|
@blur="(e) => onBlurHistoryItem(e, item)"
|
||||||
|
/>
|
||||||
|
<span class="label" v-show="!item.edit">{{ item.name }}</span>
|
||||||
<el-popover
|
<el-popover
|
||||||
placement="right"
|
placement="right"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
popper-style="padding: 1rem 0.5rem;"
|
popper-style="padding: 1rem 0.5rem;"
|
||||||
|
v-model:visible="item.visible"
|
||||||
>
|
>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<span @click.stop class="icon"><svg-icon name="more" size="16" /></span>
|
<span @click.stop class="icon"><svg-icon name="more" size="16" /></span>
|
||||||
</template>
|
</template>
|
||||||
<div class="history-item-menu">
|
<div class="history-item-menu">
|
||||||
<div class="rename" @click="onRenameHistoryItem(item)">Rename</div>
|
<div class="rename" @click="onRenameHistoryItem(item)">
|
||||||
<div class="delete" @click="onDeleteHistoryItem(item)">Delete</div>
|
{{ $t('Home.rename') }}
|
||||||
|
</div>
|
||||||
|
<div class="delete" @click="onDeleteHistoryItem(item)">
|
||||||
|
{{ $t('Home.delete') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
@@ -55,10 +70,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref, nextTick } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { getProjectList } from '@/api/agent'
|
import { getProjectList, updateProject, deleteProject } from '@/api/agent'
|
||||||
import { FormatDate } from '@/utils/tools'
|
import { FormatDate } from '@/utils/tools'
|
||||||
import MyEvent from '@/utils/myEvent'
|
import MyEvent from '@/utils/myEvent'
|
||||||
const { t: $t } = useI18n()
|
const { t: $t } = useI18n()
|
||||||
@@ -72,35 +87,7 @@
|
|||||||
globalStore.setHomeLeftNavCollapse(!isCollapse.value)
|
globalStore.setHomeLeftNavCollapse(!isCollapse.value)
|
||||||
}
|
}
|
||||||
const showHistory = ref(true)
|
const showHistory = ref(true)
|
||||||
|
const list = ref([])
|
||||||
const todayList = ref([])
|
|
||||||
const yesterdayList = ref([])
|
|
||||||
const earlierChatList = ref([])
|
|
||||||
const historyList = computed(() => {
|
|
||||||
const list = []
|
|
||||||
if (todayList.value.length > 0) {
|
|
||||||
list.push({
|
|
||||||
title: true,
|
|
||||||
name: $t('Home.today')
|
|
||||||
})
|
|
||||||
list.push(...todayList.value)
|
|
||||||
}
|
|
||||||
if (yesterdayList.value.length > 0) {
|
|
||||||
list.push({
|
|
||||||
title: true,
|
|
||||||
name: $t('Home.yesterday')
|
|
||||||
})
|
|
||||||
list.push(...yesterdayList.value)
|
|
||||||
}
|
|
||||||
if (earlierChatList.value.length > 0) {
|
|
||||||
list.push({
|
|
||||||
title: true,
|
|
||||||
name: $t('Home.earlierChat')
|
|
||||||
})
|
|
||||||
list.push(...earlierChatList.value)
|
|
||||||
}
|
|
||||||
return list
|
|
||||||
})
|
|
||||||
|
|
||||||
const onCreateProject = () => {
|
const onCreateProject = () => {
|
||||||
router.push({ name: 'mainInput' })
|
router.push({ name: 'mainInput' })
|
||||||
@@ -120,16 +107,37 @@
|
|||||||
const onClickHistoryItem = (item: any) => {
|
const onClickHistoryItem = (item: any) => {
|
||||||
router.push({ name: 'agent', params: { id: item.id } })
|
router.push({ name: 'agent', params: { id: item.id } })
|
||||||
}
|
}
|
||||||
|
const inputRef = ref(null)
|
||||||
const onRenameHistoryItem = (item: any) => {
|
const onRenameHistoryItem = (item: any) => {
|
||||||
// const index = historyList.value.findIndex((i: any) => i.id == item.id)
|
item.visible = false
|
||||||
// if (index != -1) {
|
item.edit = true
|
||||||
// }
|
nextTick(() => {
|
||||||
|
inputRef.value.forEach((v: any) => {
|
||||||
|
const id = v.getAttribute('input-id')
|
||||||
|
if (id == item.id) v.focus()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const onEnterHistoryItem = (e: any, item: any) => {
|
||||||
|
e.target.blur()
|
||||||
|
}
|
||||||
|
const onBlurHistoryItem = (e: any, item: any) => {
|
||||||
|
item.edit = false
|
||||||
|
const name = e.target.value
|
||||||
|
if (!name) return console.warn('未输入名称,不允许重命名')
|
||||||
|
item.name = name
|
||||||
|
updateProject(item.id, { name }).then(() => {
|
||||||
|
GetProjectList()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const onDeleteHistoryItem = (item: any) => {
|
const onDeleteHistoryItem = (item: any) => {
|
||||||
// const index = historyList.value.findIndex((i: any) => i.id == item.id)
|
item.visible = false
|
||||||
// if (index != -1) {
|
deleteProject(item.id).then(() => {
|
||||||
// historyList.value.splice(index, 1)
|
GetProjectList()
|
||||||
// }
|
if (item.id == id.value) {
|
||||||
|
router.push({ name: 'mainInput' })
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const GetProjectList = async () => {
|
const GetProjectList = async () => {
|
||||||
@@ -137,25 +145,47 @@
|
|||||||
page: 1,
|
page: 1,
|
||||||
size: 100
|
size: 100
|
||||||
})
|
})
|
||||||
|
const arr = res.records || []
|
||||||
|
list.value = []
|
||||||
const str = 'yyyyMMdd'
|
const str = 'yyyyMMdd'
|
||||||
const today = FormatDate(Date.now(), str)
|
const today = FormatDate(Date.now(), str)
|
||||||
const yesterday = FormatDate(Date.now() - 24 * 60 * 60 * 1000, str)
|
const yesterday = FormatDate(Date.now() - 24 * 60 * 60 * 1000, str)
|
||||||
todayList.value = []
|
const todayList = []
|
||||||
yesterdayList.value = []
|
const yesterdayList = []
|
||||||
earlierChatList.value = []
|
const earlierChatList = []
|
||||||
const list = res.records || []
|
arr.forEach((item: any) => {
|
||||||
list.forEach((item: any) => {
|
const obj = { ...item, edit: false, visible: false }
|
||||||
const obj = { ...item }
|
const date = FormatDate(obj.updateTime * 1000, str)
|
||||||
const date = FormatDate(obj.createTime * 1000, str)
|
|
||||||
if (date == today) {
|
if (date == today) {
|
||||||
todayList.value.push(obj)
|
todayList.push(obj)
|
||||||
} else if (date == yesterday) {
|
} else if (date == yesterday) {
|
||||||
yesterdayList.value.push(obj)
|
yesterdayList.push(obj)
|
||||||
} else {
|
} else {
|
||||||
earlierChatList.value.push(obj)
|
earlierChatList.push(obj)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
if (todayList.length > 0) {
|
||||||
|
list.value.push({
|
||||||
|
title: true,
|
||||||
|
name: $t('Home.today')
|
||||||
|
})
|
||||||
|
list.value.push(...todayList)
|
||||||
|
}
|
||||||
|
if (yesterdayList.length > 0) {
|
||||||
|
list.value.push({
|
||||||
|
title: true,
|
||||||
|
name: $t('Home.yesterday')
|
||||||
|
})
|
||||||
|
list.value.push(...yesterdayList)
|
||||||
|
}
|
||||||
|
if (earlierChatList.length > 0) {
|
||||||
|
list.value.push({
|
||||||
|
title: true,
|
||||||
|
name: $t('Home.earlierChat')
|
||||||
|
})
|
||||||
|
list.value.push(...earlierChatList)
|
||||||
|
}
|
||||||
|
}
|
||||||
MyEvent.add('updateProjectList', GetProjectList)
|
MyEvent.add('updateProjectList', GetProjectList)
|
||||||
GetProjectList()
|
GetProjectList()
|
||||||
</script>
|
</script>
|
||||||
@@ -177,6 +207,7 @@
|
|||||||
--collapse-top-padding: 4.6rem 0 0 0;
|
--collapse-top-padding: 4.6rem 0 0 0;
|
||||||
--collapse-create-btn-width: 5.1rem;
|
--collapse-create-btn-width: 5.1rem;
|
||||||
--collapse-menu-item-width: 50%;
|
--collapse-menu-item-width: 50%;
|
||||||
|
--collapse-menu-item-icon-margin-right: 0;
|
||||||
}
|
}
|
||||||
> .top {
|
> .top {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -242,6 +273,7 @@
|
|||||||
}
|
}
|
||||||
> .icon {
|
> .icon {
|
||||||
transition: transform 0.2s ease-in-out;
|
transition: transform 0.2s ease-in-out;
|
||||||
|
margin-right: var(--collapse-menu-item-icon-margin-right, 1.6rem);
|
||||||
}
|
}
|
||||||
&.active > .jiantou {
|
&.active > .jiantou {
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
@@ -288,6 +320,14 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
> input {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
height: 100%;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
> .icon {
|
> .icon {
|
||||||
width: 2.5rem;
|
width: 2.5rem;
|
||||||
height: 2.5rem;
|
height: 2.5rem;
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ import Input from './components/Input.vue'
|
|||||||
.slogan{
|
.slogan{
|
||||||
color: #000;
|
color: #000;
|
||||||
font-size: 6rem;
|
font-size: 6rem;
|
||||||
font-family: 'GeneralMedium';
|
font-family: 'Medium';
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 5.6rem;
|
margin-bottom: 5.6rem;
|
||||||
.fiDA{
|
.fiDA{
|
||||||
font-family: 'GeneralBold';
|
font-family: 'MBold';
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">User Name</div>
|
<div class="label">{{ $t('Home.userName') }}</div>
|
||||||
<div class="value">{{ userInfo?.username || '------' }}</div>
|
<div class="value">{{ userInfo?.username || '------' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">Email</div>
|
<div class="label">{{ $t('Home.email') }}</div>
|
||||||
<div class="value">{{ userInfo?.email || '------' }}</div>
|
<div class="value">{{ userInfo?.email || '------' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">Language</div>
|
<div class="label">{{ $t('Home.language') }}</div>
|
||||||
<dropdown-menu v-model="locale" :list="langs" @change="changeLang" />
|
<dropdown-menu v-model="locale" :list="langs" @change="changeLang" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">Log out on this device</div>
|
<div class="label">{{ $t('Home.logoutDevice') }}</div>
|
||||||
<button class="logout-btn" @click="logout">Log out</button>
|
<button class="logout-btn" @click="logout">{{ $t('Home.logout') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">User Agreement</div>
|
<div class="label">{{ $t('Home.userAgreement') }}</div>
|
||||||
<button @click="onClickUserAgreement">View</button>
|
<button @click="onClickUserAgreement">{{ $t('Home.view') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">Privacy Policy</div>
|
<div class="label">{{ $t('Home.privacyPolicy') }}</div>
|
||||||
<button @click="onClickPrivacy">View</button>
|
<button @click="onClickPrivacy">{{ $t('Home.view') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">Region</div>
|
<div class="label">{{ $t('Home.region') }}</div>
|
||||||
<dropdown-menu v-model="base" :list="baseList" @change="changeBase" />
|
<dropdown-menu v-model="base" :list="baseList" @change="changeBase" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">Role</div>
|
<div class="label">{{ $t('Home.role') }}</div>
|
||||||
<dropdown-menu v-model="role" :list="roles" @change="changeRole" />
|
<dropdown-menu v-model="role" :list="roles" @change="changeRole" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">Current Agent Profile</div>
|
<div class="label">{{ $t('Home.currentAgentProfile') }}</div>
|
||||||
<div class="group">
|
<div class="group">
|
||||||
<span class="icon"><svg-icon name="xiang" size="20" color="#000" /></span>
|
<span class="icon"><svg-icon name="xiang" size="20" color="#000" /></span>
|
||||||
<dropdown-menu v-model="agent" :list="agents" @change="changeAgent" />
|
<dropdown-menu v-model="agent" :list="agents" @change="changeAgent" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="label">Current Notification Frequency</div>
|
<div class="label">{{ $t('Home.currentNotificationFrequency') }}</div>
|
||||||
<div class="value">3–6 times per hour</div>
|
<div class="value">{{ $t('Home.timesPerHour', { time: '3–6' }) }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -27,19 +27,19 @@
|
|||||||
import { UpdateUserProfile } from '@/api/user'
|
import { UpdateUserProfile } from '@/api/user'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
const userInfoStore = useUserInfoStore()
|
const userInfoStore = useUserInfoStore()
|
||||||
const { locale } = useI18n()
|
const { t } = useI18n()
|
||||||
const base = ref(userInfoStore.state.userInfo.base)
|
const base = ref(userInfoStore.state.userInfo.base)
|
||||||
const baseList = ref([
|
const baseList = ref([
|
||||||
{ label: 'United States', value: 'United States' },
|
{ label: t('Country.unitedStates'), value: 'United States' },
|
||||||
{ label: 'Singapore', value: 'Singapore' },
|
{ label: t('Country.singapore'), value: 'Singapore' },
|
||||||
{ label: 'Australia', value: 'Australia' },
|
{ label: t('Country.australia'), value: 'Australia' },
|
||||||
{ label: 'South Korea', value: 'South Korea' },
|
{ label: t('Country.southKorea'), value: 'South Korea' },
|
||||||
{ label: 'China', value: 'China' },
|
{ label: t('Country.china'), value: 'China' },
|
||||||
{ label: 'Italy', value: 'Italy' },
|
{ label: t('Country.italy'), value: 'Italy' },
|
||||||
{ label: 'France', value: 'France' },
|
{ label: t('Country.france'), value: 'France' },
|
||||||
{ label: 'Japan', value: 'Japan' },
|
{ label: t('Country.japan'), value: 'Japan' },
|
||||||
{ label: 'Canada', value: 'Canada' },
|
{ label: t('Country.canada'), value: 'Canada' },
|
||||||
{ label: 'Germany', value: 'Germany' }
|
{ label: t('Country.germany'), value: 'Germany' }
|
||||||
])
|
])
|
||||||
const changeBase = (value: string) => {
|
const changeBase = (value: string) => {
|
||||||
onSubmit({ base: value })
|
onSubmit({ base: value })
|
||||||
@@ -47,17 +47,17 @@
|
|||||||
|
|
||||||
const role = ref(userInfoStore.state.userInfo.role)
|
const role = ref(userInfoStore.state.userInfo.role)
|
||||||
const roles = ref([
|
const roles = ref([
|
||||||
{ label: 'Designer', value: 'Designer' },
|
{ label: t('Role.designer'), value: 'Designer' },
|
||||||
{ label: 'Student', value: 'Student' },
|
{ label: t('Role.student'), value: 'Student' },
|
||||||
{ label: 'Teacher', value: 'Teacher' },
|
{ label: t('Role.teacher'), value: 'Teacher' },
|
||||||
{ label: 'Parent', value: 'Parent' },
|
{ label: t('Role.parent'), value: 'Parent' },
|
||||||
{ value: 'Other', label: 'Other' }
|
{ label: t('Role.other'), value: 'Other' }
|
||||||
])
|
])
|
||||||
const changeRole = (value: string) => {
|
const changeRole = (value: string) => {
|
||||||
onSubmit({ role: value })
|
onSubmit({ role: value })
|
||||||
}
|
}
|
||||||
|
|
||||||
const agent = ref("Partner")
|
const agent = ref('Partner')
|
||||||
const agents = ref([
|
const agents = ref([
|
||||||
{ label: 'Partner', value: 'Partner' },
|
{ label: 'Partner', value: 'Partner' },
|
||||||
{ label: 'Observer', value: 'Observer' },
|
{ label: 'Observer', value: 'Observer' },
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
>
|
>
|
||||||
<template #header="{ close }">
|
<template #header="{ close }">
|
||||||
<div class="setting-header">
|
<div class="setting-header">
|
||||||
<div class="title">Setting</div>
|
<div class="title">{{ $t('Home.setting') }}</div>
|
||||||
<span class="close" @click="close">
|
<span class="close" @click="close">
|
||||||
<svg-icon name="close" size="10" color="#000" />
|
<svg-icon name="close" size="10" color="#000" />
|
||||||
</span>
|
</span>
|
||||||
@@ -56,9 +56,9 @@
|
|||||||
|
|
||||||
const nav = ref('setting')
|
const nav = ref('setting')
|
||||||
const navs = shallowRef([
|
const navs = shallowRef([
|
||||||
{ icon: 'setting', label: 'General', component: General },
|
{ icon: 'setting', label: $t('Home.general'), component: General },
|
||||||
{ icon: 'profile', label: 'Profile', component: Profile },
|
{ icon: 'profile', label: $t('Home.profile'), component: Profile },
|
||||||
{ icon: 'learn-more', label: 'Learn more', component: LearnMore }
|
{ icon: 'learn-more', label: $t('Home.learnMore'), component: LearnMore }
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -35,27 +35,29 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref, reactive } from 'vue'
|
import { computed, ref, reactive } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
import { useI18n } from 'vue-i18n'
|
||||||
|
const { t } = useI18n()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const emit = defineEmits(['next'])
|
const emit = defineEmits(['next'])
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
baseList: [
|
baseList: [
|
||||||
{ label: 'United States', value: 'United States' },
|
{ label: t('Country.unitedStates'), value: 'United States' },
|
||||||
{ label: 'Singapore', value: 'Singapore' },
|
{ label: t('Country.singapore'), value: 'Singapore' },
|
||||||
{ label: 'Australia', value: 'Australia' },
|
{ label: t('Country.australia'), value: 'Australia' },
|
||||||
{ label: 'South Korea', value: 'South Korea' },
|
{ label: t('Country.southKorea'), value: 'South Korea' },
|
||||||
{ label: 'China', value: 'China' },
|
{ label: t('Country.china'), value: 'China' },
|
||||||
{ label: 'Italy', value: 'Italy' },
|
{ label: t('Country.italy'), value: 'Italy' },
|
||||||
{ label: 'France', value: 'France' },
|
{ label: t('Country.france'), value: 'France' },
|
||||||
{ label: 'Japan', value: 'Japan' },
|
{ label: t('Country.japan'), value: 'Japan' },
|
||||||
{ label: 'Canada', value: 'Canada' },
|
{ label: t('Country.canada'), value: 'Canada' },
|
||||||
{ label: 'Germany', value: 'Germany' }
|
{ label: t('Country.germany'), value: 'Germany' }
|
||||||
],
|
],
|
||||||
roleList: [
|
roleList: [
|
||||||
{ label: 'Designer', value: 'Designer' },
|
{ label: t('Role.designer'), value: 'Designer' },
|
||||||
{ value: 'Student', label: 'Student' },
|
{ label: t('Role.student'), value: 'Student' },
|
||||||
{ value: 'Teacher', label: 'Teacher' },
|
{ label: t('Role.teacher'), value: 'Teacher' },
|
||||||
{ value: 'Parent', label: 'Parent' },
|
{ label: t('Role.parent'), value: 'Parent' },
|
||||||
{ value: 'Other', label: 'Other' }
|
{ label: t('Role.other'), value: 'Other' }
|
||||||
],
|
],
|
||||||
base: 'China',
|
base: 'China',
|
||||||
role: 'Student'
|
role: 'Student'
|
||||||
|
|||||||
Reference in New Issue
Block a user