Add unified entry (#179)
Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
1 parent
339bfd4ca8
commit
7948887048
44 files changed
+2369
-2306
No files matched your search
@@ -170,7 +170,7 @@ export default defineComponent({
|
||||
route: {
|
||||
name: ROUTE_MIDJOURNEY_INDEX
|
||||
},
|
||||
displayName: this.$t('common.nav.midjourney'),
|
||||
displayName: this.$t('common.nav.image'),
|
||||
icon: 'fa-solid fa-palette',
|
||||
routes: [ROUTE_MIDJOURNEY_INDEX]
|
||||
});
|
||||
@@ -205,20 +205,35 @@ export default defineComponent({
|
||||
route: {
|
||||
name: ROUTE_SUNO_INDEX
|
||||
},
|
||||
displayName: this.$t('common.nav.suno'),
|
||||
displayName: this.$t('common.nav.music'),
|
||||
icon: 'fa-solid fa-music',
|
||||
routes: [ROUTE_SUNO_INDEX, ROUTE_SUNO_HISTORY]
|
||||
});
|
||||
}
|
||||
// Add luma's leftmost icon
|
||||
if (this.$store?.state?.site?.features?.luma?.enabled) {
|
||||
// Add luma, pika, hailuo's leftmost icon
|
||||
if (
|
||||
this.$store?.state?.site?.features?.luma?.enabled ||
|
||||
this.$store?.state?.site?.features?.pika?.enabled ||
|
||||
this.$store?.state?.site?.features?.hailuo?.enabled
|
||||
) {
|
||||
result.push({
|
||||
route: {
|
||||
name: ROUTE_LUMA_INDEX
|
||||
name: this.$store?.state?.site?.features?.luma?.enabled
|
||||
? ROUTE_LUMA_INDEX
|
||||
: this.$store?.state?.site?.features?.pika?.enabled
|
||||
? ROUTE_PIKA_INDEX
|
||||
: ROUTE_HAILUO_INDEX
|
||||
},
|
||||
displayName: this.$t('common.nav.luma'),
|
||||
displayName: this.$t('common.nav.video'),
|
||||
icon: 'fa-solid fa-film',
|
||||
routes: [ROUTE_LUMA_INDEX, ROUTE_LUMA_HISTORY]
|
||||
routes: [
|
||||
ROUTE_LUMA_INDEX,
|
||||
ROUTE_LUMA_HISTORY,
|
||||
ROUTE_PIKA_INDEX,
|
||||
ROUTE_PIKA_HISTORY,
|
||||
ROUTE_HAILUO_INDEX,
|
||||
ROUTE_HAILUO_HISTORY
|
||||
]
|
||||
});
|
||||
}
|
||||
// Add headshots's leftmost icon
|
||||
@@ -232,28 +247,6 @@ export default defineComponent({
|
||||
routes: [ROUTE_HEADSHOTS_INDEX, ROUTE_HEADSHOTS_HISTORY]
|
||||
});
|
||||
}
|
||||
// Add pika's leftmost icon
|
||||
if (this.$store?.state?.site?.features?.pika?.enabled) {
|
||||
result.push({
|
||||
route: {
|
||||
name: ROUTE_PIKA_INDEX
|
||||
},
|
||||
displayName: this.$t('common.nav.pika'),
|
||||
icon: 'fa-solid fa-film',
|
||||
routes: [ROUTE_PIKA_INDEX, ROUTE_PIKA_HISTORY]
|
||||
});
|
||||
}
|
||||
// Add hailuo's leftmost icon
|
||||
if (this.$store?.state?.site?.features?.hailuo?.enabled) {
|
||||
result.push({
|
||||
route: {
|
||||
name: ROUTE_HAILUO_INDEX
|
||||
},
|
||||
displayName: this.$t('common.nav.hailuo'),
|
||||
icon: 'fa-solid fa-film',
|
||||
routes: [ROUTE_HAILUO_INDEX, ROUTE_HAILUO_HISTORY]
|
||||
});
|
||||
}
|
||||
|
||||
if (this.direction === 'row') {
|
||||
result.push({
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<el-menu mode="horizontal" :default-active="active">
|
||||
<el-menu-item v-if="site?.features?.luma?.enabled" index="/luma" @click="$router.push('/luma')">
|
||||
{{ $t('common.nav.luma') }}
|
||||
</el-menu-item>
|
||||
<el-menu-item v-if="site?.features?.pika?.enabled" index="/pika" @click="$router.push('/pika')">
|
||||
{{ $t('common.nav.pika') }}
|
||||
</el-menu-item>
|
||||
<el-menu-item v-if="site?.features?.hailuo?.enabled" index="/hailuo" @click="$router.push('/hailuo')">
|
||||
{{ $t('common.nav.hailuo') }}
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { ElMenu, ElMenuItem } from 'element-plus';
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'VideoNavigator',
|
||||
components: {
|
||||
ElMenu,
|
||||
ElMenuItem
|
||||
},
|
||||
computed: {
|
||||
site() {
|
||||
return this.$store.state.site;
|
||||
},
|
||||
active() {
|
||||
console.log(this.$route.path);
|
||||
return this.$route.path;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-menu {
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user