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