update navigator
This commit is contained in:
1 parent
b628d652b7
commit
8390528a17
2 files changed
+22
-10
No files matched your search
@@ -2,23 +2,28 @@
|
||||
<div class="sidebar">
|
||||
<div class="top">
|
||||
<div v-for="(link, linkIndex) in links" :key="linkIndex" class="link">
|
||||
<el-button
|
||||
:class="{
|
||||
<el-tooltip effect="dark" :content="link.displayName" placement="right">
|
||||
<el-button
|
||||
:class="{
|
||||
button: true,
|
||||
active: link.routes.includes($route.name as string)
|
||||
}"
|
||||
@click="$router.push(link.route)"
|
||||
>
|
||||
<font-awesome-icon :icon="link.icon" />
|
||||
</el-button>
|
||||
@click="$router.push(link.route)"
|
||||
>
|
||||
<font-awesome-icon :icon="link.icon" />
|
||||
<!-- <img :src="link.image" class="image" :alt="link.icon" /> -->
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle"></div>
|
||||
<div class="bottom">
|
||||
<div class="link">
|
||||
<el-button class="button" @click="onLogout">
|
||||
<font-awesome-icon icon="fa-solid fa-arrow-right-from-bracket" />
|
||||
</el-button>
|
||||
<el-tooltip effect="dark" :content="$t('common.nav.logOut')" placement="right">
|
||||
<el-button class="button" @click="onLogout">
|
||||
<font-awesome-icon icon="fa-solid fa-arrow-right-from-bracket" />
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -26,7 +31,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElButton } from 'element-plus';
|
||||
import { ElButton, ElTooltip } from 'element-plus';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import {
|
||||
ROUTE_AUTH_LOGIN,
|
||||
@@ -41,6 +46,7 @@ export default defineComponent({
|
||||
name: 'Navigator',
|
||||
components: {
|
||||
ElButton,
|
||||
ElTooltip,
|
||||
FontAwesomeIcon
|
||||
},
|
||||
data() {
|
||||
@@ -50,14 +56,18 @@ export default defineComponent({
|
||||
route: {
|
||||
name: ROUTE_CHAT_INDEX
|
||||
},
|
||||
displayName: this.$t('common.nav.chat'),
|
||||
icon: 'fa-regular fa-comment',
|
||||
image: 'https://cdn.zhishuyun.com/9ad12c99b2.png/thumb_100x100',
|
||||
routes: [ROUTE_CHAT_INDEX, ROUTE_CHAT_CONVERSATION, ROUTE_CHAT_CONVERSATION_NEW]
|
||||
},
|
||||
{
|
||||
route: {
|
||||
name: ROUTE_MIDJOURNEY_INDEX
|
||||
},
|
||||
displayName: this.$t('common.nav.midjourney'),
|
||||
icon: 'fa-solid fa-palette',
|
||||
image: 'https://cdn.zhishuyun.com/83ee211091.png/thumb_100x100',
|
||||
routes: [ROUTE_MIDJOURNEY_INDEX, ROUTE_MIDJOURNEY_HISTORY]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
export default {
|
||||
chat: '问答',
|
||||
midjourney: 'Midjourney',
|
||||
editor: '编辑器',
|
||||
setting: '设置',
|
||||
home: '首页',
|
||||
|
||||
Reference in new issue
Block a user