Add SUNO support (#82)

Co-authored-by: Germey <germey@acedata.cloud>
This commit is contained in:
HCodeandGermey authored and GitHub committed 2024-07-27 18:34:43 +00:00
1 parent ffdf6cbbdf
commit a46fc4ef3c
237 files changed
+9933 -4641

No files matched your search

+4 -1
View File
@@ -13,7 +13,10 @@
<el-menu :collapse="false" class="menu">
<el-popover :width="350" trigger="hover">
<template #reference>
<el-menu-item v-if="site?.features?.support?.wechat?.enabled" index="1">
<el-menu-item
v-if="site?.features?.support?.wechat?.enabled && site?.features?.support?.wechat?.qr"
index="1"
>
<font-awesome-icon icon="fa-brands fa-weixin" class="mr-2" />
<template #title>{{ $t('common.message.addWeChat') }}</template>
</el-menu-item>
+27
View File
@@ -0,0 +1,27 @@
<template>
<Component
:is="icon"
:theme="theme"
:size="size"
:spin="spin"
:fill="fill"
:stroke-linecap="strokeLinecap"
:stroke-linejoin="strokeLinejoin"
:stroke-width="strokeWidth"
/>
</template>
<script setup lang="ts">
import type { Icon } from '@icon-park/vue-next/lib/runtime';
defineProps<{
icon: Icon;
theme?: 'outline' | 'filled' | 'two-tone' | 'multi-color';
size?: number | string;
spin?: boolean;
fill?: string | string[];
strokeLinecap?: 'butt' | 'round' | 'square';
strokeLinejoin?: 'miter' | 'round' | 'bevel';
strokeWidth?: number;
}>();
</script>
+15
View File
@@ -108,7 +108,9 @@ import {
ROUTE_INDEX,
ROUTE_MIDJOURNEY_INDEX,
ROUTE_QRART_INDEX,
ROUTE_SUNO_INDEX,
ROUTE_QRART_HISTORY,
ROUTE_SUNO_HISTORY,
ROUTE_SITE_INDEX
} from '@/router/constants';
import LogoTiny from './LogoTiny.vue';
@@ -164,6 +166,7 @@ export default defineComponent({
});
}
/*
if (this.$store?.state?.site?.features?.chatdoc?.enabled) {
result.push({
route: {
@@ -174,6 +177,7 @@ export default defineComponent({
routes: [ROUTE_CHATDOC_INDEX, ROUTE_CHATDOC_CONVERSATION, ROUTE_CHATDOC_MANAGE, ROUTE_CHATDOC_SETTING]
});
}
*/
if (this.$store?.state?.site?.features?.qrart?.enabled) {
result.push({
@@ -185,6 +189,17 @@ export default defineComponent({
routes: [ROUTE_QRART_INDEX, ROUTE_QRART_HISTORY]
});
}
// Add suno's leftmost icon
if (this.$store?.state?.site?.features?.suno?.enabled) {
result.push({
route: {
name: ROUTE_SUNO_INDEX
},
displayName: this.$t('common.nav.suno'),
icon: 'fa-solid fa-music',
routes: [ROUTE_SUNO_INDEX, ROUTE_SUNO_HISTORY]
});
}
if (this.direction === 'row') {
result.push({
+1
View File
@@ -12,6 +12,7 @@
index="/midjourney"
></el-menu-item>
<el-menu-item v-if="site?.features?.qrart?.enabled" v-t="'index.title.qrart'" index="/qrart"></el-menu-item>
<el-menu-item v-if="site?.features?.suno?.enabled" v-t="'index.title.suno'" index="/suno"></el-menu-item>
</el-menu>
</el-col>
<el-col :md="4" :xs="11">