Add unified entry (#179)

Co-authored-by: AceDataCloud <office@acedata.cloud>
This commit is contained in:
GermeyandAceDataCloud authored and GitHub committed 2025-02-16 00:32:22 +08:00
1 parent 339bfd4ca8
commit 7948887048
44 files changed
+2369 -2306

No files matched your search

+22 -29
View File
@@ -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({
+41
View File
@@ -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>
@@ -18,7 +18,6 @@
<div class="flex gap-1">
<mode-selector />
<el-button type="primary" class="btn w-full" round @click="$emit('generate')">
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
{{ $t('midjourney.button.generate') }}
</el-button>
</div>
@@ -42,12 +41,10 @@ import ModeSelector from './config/ModeSelector2.vue';
import PromptInput from './config/PromptInput.vue';
import ReferenceImage from './config/ReferenceImage.vue';
import { ElButton } from 'element-plus';
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
export default defineComponent({
name: 'ConfigPanel',
components: {
FontAwesomeIcon,
ElButton,
PromptInput,
ModeSelector,
@@ -104,6 +104,7 @@ export default defineComponent({
color: white;
position: absolute;
text-align: center;
top: 12px;
}
&.active {
@@ -64,7 +64,6 @@ export default defineComponent({
position: relative;
.title {
font-size: 14px;
margin-bottom: 10px;
}
}
}
@@ -31,32 +31,32 @@ export default defineComponent({
{
value: '1:1',
label: '1:1',
width: 15,
height: 15
width: 20,
height: 20
},
{
value: '4:3',
label: '4:3',
width: 16,
height: 12
width: 20,
height: 15
},
{
value: '3:4',
label: '3:4',
width: 12,
height: 16
width: 15,
height: 20
},
{
value: '16:9',
label: '16:9',
width: 16,
height: 9
width: 25,
height: 13
},
{
value: '9:16',
label: '9:16',
width: 9,
height: 16
width: 13,
height: 25
}
]
};
@@ -99,8 +99,8 @@ export default defineComponent({
.item {
width: 48px;
height: 60px;
border: 1px solid var(--el-border-color);
height: 65px;
border: 2px solid var(--el-border-color);
display: flex;
flex-direction: column;
align-items: center;
@@ -117,7 +117,7 @@ export default defineComponent({
justify-content: center;
.rect {
border: 1px solid var(--el-border-color);
border: 2px solid var(--el-border-color);
width: 20px;
height: 20px;
border-radius: 2px;
@@ -99,7 +99,7 @@ export default defineComponent({
.item {
width: 45px;
height: 75px;
height: 70px;
border: 2px solid var(--el-border-color);
display: flex;
flex-direction: column;