Add price for model (#249)
This commit is contained in:
1 parent
a6b4cecb5d
commit
f8ca20981c
15 files changed
+231
-227
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<div v-if="value !== null && value !== undefined" class="text-center text-[var(--el-text-color-secondary)] mb-1">
|
||||
<font-awesome-icon icon="fa-solid fa-coins" class="text-xs mr-1" />
|
||||
<span class="text-xs">
|
||||
{{ value }}
|
||||
{{ $t(`service.unit.${service?.unit || 'credits'}`) }}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import { IService } from '@/models';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Consumption',
|
||||
components: {
|
||||
FontAwesomeIcon
|
||||
},
|
||||
props: {
|
||||
value: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: null
|
||||
},
|
||||
service: {
|
||||
type: Object as () => IService | undefined,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -1,15 +1,16 @@
|
||||
<template>
|
||||
<div class="panel">
|
||||
<div class="config">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 overflow-y-auto p-[15px]">
|
||||
<prompt-input class="mb-4" />
|
||||
<model-selector class="mb-4" />
|
||||
<count-selector class="mb-4" />
|
||||
<div class="actions">
|
||||
<el-button type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('flux.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center px-[15px] pb-[15px]">
|
||||
<consumption :value="consumption" :service="service" />
|
||||
<el-button type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('flux.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -21,6 +22,8 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import ModelSelector from './config/ModelSelector.vue';
|
||||
import CountSelector from './config/CountSelector.vue';
|
||||
import PromptInput from './config/PromptInput.vue';
|
||||
import Consumption from '../common/Consumption.vue';
|
||||
import { getConsumption } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'PresetPanel',
|
||||
@@ -29,12 +32,19 @@ export default defineComponent({
|
||||
FontAwesomeIcon,
|
||||
PromptInput,
|
||||
ModelSelector,
|
||||
CountSelector
|
||||
CountSelector,
|
||||
Consumption
|
||||
},
|
||||
emits: ['generate'],
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.flux?.config;
|
||||
},
|
||||
consumption() {
|
||||
return getConsumption(this.config, this.service?.metadata?.price);
|
||||
},
|
||||
service() {
|
||||
return this.$store.state.flux?.service;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -44,27 +54,3 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel {
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
height: calc(100% - 40px);
|
||||
.config {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
flex: 1;
|
||||
}
|
||||
.actions {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.btn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,25 +1,26 @@
|
||||
<template>
|
||||
<div class="panel">
|
||||
<div class="config">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 overflow-y-auto p-[15px]">
|
||||
<prompt-input class="mb-4" />
|
||||
<model-selector class="mb-4" />
|
||||
<start-image-url-input v-if="config?.model === 'minimax-i2v'" class="mb-2" />
|
||||
<div class="actions">
|
||||
<el-button
|
||||
v-if="config?.video_url !== undefined || config?.custom"
|
||||
type="primary"
|
||||
class="btn w-full"
|
||||
round
|
||||
@click="onGenerate"
|
||||
>
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('hailuo.button.extend') }}
|
||||
</el-button>
|
||||
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('hailuo.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center px-[15px] pb-[15px]">
|
||||
<consumption :value="consumption" :service="service" />
|
||||
<el-button
|
||||
v-if="config?.video_url !== undefined || config?.custom"
|
||||
type="primary"
|
||||
class="btn w-full"
|
||||
round
|
||||
@click="onGenerate"
|
||||
>
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('hailuo.button.extend') }}
|
||||
</el-button>
|
||||
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('hailuo.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -31,6 +32,9 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import ModelSelector from './config/ModelSelector.vue';
|
||||
import StartImageUrlInput from './config/StartImageUrlInput.vue';
|
||||
import PromptInput from './config/PromptInput.vue';
|
||||
import Consumption from '../common/Consumption.vue';
|
||||
import { getConsumption } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'PresetPanel',
|
||||
components: {
|
||||
@@ -38,12 +42,19 @@ export default defineComponent({
|
||||
FontAwesomeIcon,
|
||||
PromptInput,
|
||||
StartImageUrlInput,
|
||||
ModelSelector
|
||||
ModelSelector,
|
||||
Consumption
|
||||
},
|
||||
emits: ['generate'],
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.hailuo?.config;
|
||||
},
|
||||
consumption() {
|
||||
return getConsumption(this.config, this.service?.metadata?.price);
|
||||
},
|
||||
service() {
|
||||
return this.$store.state.hailuo?.service;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -53,28 +64,3 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel {
|
||||
height: 100%;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
height: calc(100% - 40px);
|
||||
.config {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
flex: 1;
|
||||
}
|
||||
.actions {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.btn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="panel">
|
||||
<div class="config">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 overflow-y-auto p-[15px]">
|
||||
<prompt-input class="mb-4" />
|
||||
<model-selector class="mb-4" />
|
||||
<ratio-selector class="mb-4" />
|
||||
@@ -10,22 +10,23 @@
|
||||
<mode-selector class="mb-4" />
|
||||
<cfg-scale-selector class="mb-4" />
|
||||
<negative-prompt-input class="mb-4" />
|
||||
<div class="actions">
|
||||
<el-button
|
||||
v-if="config?.video_url !== undefined || config?.custom"
|
||||
type="primary"
|
||||
class="btn w-full"
|
||||
round
|
||||
@click="onGenerate"
|
||||
>
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('kling.button.extend') }}
|
||||
</el-button>
|
||||
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('kling.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center px-[15px] pb-[15px]">
|
||||
<consumption :value="consumption" :service="service" />
|
||||
<el-button
|
||||
v-if="config?.video_url !== undefined || config?.custom"
|
||||
type="primary"
|
||||
class="btn w-full"
|
||||
round
|
||||
@click="onGenerate"
|
||||
>
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('kling.button.extend') }}
|
||||
</el-button>
|
||||
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('kling.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -40,14 +41,17 @@ import DurationSelector from './config/DurationSelector.vue';
|
||||
import RatioSelector from './config/RatioSelector.vue';
|
||||
import StartImage from './config/StartImage.vue';
|
||||
import EndImage from './config/EndImage.vue';
|
||||
import Consumption from '../common/Consumption.vue';
|
||||
import CfgScaleSelector from './config/CfgScaleSelector.vue';
|
||||
import PromptInput from './config/PromptInput.vue';
|
||||
import NegativePromptInput from './config/NegativePromptInput.vue';
|
||||
import { getConsumption } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ConfigPanel',
|
||||
components: {
|
||||
ElButton,
|
||||
Consumption,
|
||||
FontAwesomeIcon,
|
||||
PromptInput,
|
||||
NegativePromptInput,
|
||||
@@ -63,6 +67,12 @@ export default defineComponent({
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.kling?.config;
|
||||
},
|
||||
consumption() {
|
||||
return getConsumption(this.config, this.service?.metadata?.price);
|
||||
},
|
||||
service() {
|
||||
return this.$store.state.kling?.service;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -72,28 +82,3 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel {
|
||||
height: 100%;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
height: calc(100% - 40px);
|
||||
.config {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
flex: 1;
|
||||
}
|
||||
.actions {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.btn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -89,7 +89,7 @@ export default defineComponent({
|
||||
width: 30%;
|
||||
}
|
||||
.value {
|
||||
width: 80px;
|
||||
width: 120px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="panel">
|
||||
<div class="config">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 overflow-y-auto p-[15px]">
|
||||
<extend-from-input v-if="config?.video_id || config?.video_url" class="mb-4" />
|
||||
<prompt-input class="mb-4" />
|
||||
<custom-selector v-if="!config?.video_id" class="mb-4" />
|
||||
@@ -9,22 +9,23 @@
|
||||
<end-image-input class="mb-4" />
|
||||
<enhancement-selector class="mb-4" />
|
||||
<loop-selector class="mb-4" />
|
||||
<div class="actions">
|
||||
<el-button
|
||||
v-if="config?.video_url !== undefined || config?.custom"
|
||||
type="primary"
|
||||
class="btn w-full"
|
||||
round
|
||||
@click="onGenerate"
|
||||
>
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('luma.button.extend') }}
|
||||
</el-button>
|
||||
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('luma.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center px-[15px] pb-[15px]">
|
||||
<consumption :value="consumption" :service="service" />
|
||||
<el-button
|
||||
v-if="config?.video_url !== undefined || config?.custom"
|
||||
type="primary"
|
||||
class="btn w-full"
|
||||
round
|
||||
@click="onGenerate"
|
||||
>
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('luma.button.extend') }}
|
||||
</el-button>
|
||||
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('luma.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -42,6 +43,8 @@ import StartImageInput from './config/StartImageInput.vue';
|
||||
import UploadVideo from './config/UploadVideo.vue';
|
||||
import PromptInput from './config/PromptInput.vue';
|
||||
import ExtendFromInput from './config/ExtendFromInput.vue';
|
||||
import Consumption from '../common/Consumption.vue';
|
||||
import { getConsumption } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ConfigPanel',
|
||||
@@ -55,12 +58,19 @@ export default defineComponent({
|
||||
PromptInput,
|
||||
ExtendFromInput,
|
||||
CustomSelector,
|
||||
UploadVideo
|
||||
UploadVideo,
|
||||
Consumption
|
||||
},
|
||||
emits: ['generate'],
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.luma?.config;
|
||||
},
|
||||
consumption() {
|
||||
return getConsumption(this.config, this.service?.metadata?.price);
|
||||
},
|
||||
service() {
|
||||
return this.$store.state.luma?.service;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -70,28 +80,3 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel {
|
||||
height: 100%;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
height: calc(100% - 40px);
|
||||
.config {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
flex: 1;
|
||||
}
|
||||
.actions {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.btn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="panel flex flex-col">
|
||||
<div class="flex-1 overflow-y-scroll p-4">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 overflow-y-auto p-[15px]">
|
||||
<is-videos-selector class="mb-2" />
|
||||
<model-selector v-if="!config.is_videos" class="mb-2" />
|
||||
<prompt-input class="mb-2" />
|
||||
@@ -17,7 +17,8 @@
|
||||
<image-weight-selector v-show="config.advanced" class="mb-2" />
|
||||
<style-selector v-show="config.advanced" class="mb-2" />
|
||||
</div>
|
||||
<div class="h-12 px-4">
|
||||
<div class="flex flex-col px-[15px] pb-[15px]">
|
||||
<consumption :value="consumption" :service="service" />
|
||||
<div class="flex gap-1">
|
||||
<mode-selector />
|
||||
<el-button v-if="config.action === 'extend'" type="primary" class="btn w-full" round @click="$emit('generate')">
|
||||
@@ -50,6 +51,8 @@ import ModeSelector from './config/ModeSelector2.vue';
|
||||
import PromptInput from './config/PromptInput.vue';
|
||||
import ReferenceImage from './config/ReferenceImage.vue';
|
||||
import { ElButton } from 'element-plus';
|
||||
import Consumption from '../common/Consumption.vue';
|
||||
import { getConsumption } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ConfigPanel',
|
||||
@@ -70,20 +73,20 @@ export default defineComponent({
|
||||
ImageWeightSelector,
|
||||
ReferenceImage,
|
||||
IsVideosSelector,
|
||||
ImageUrlInput
|
||||
ImageUrlInput,
|
||||
Consumption
|
||||
},
|
||||
emits: ['generate'],
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.midjourney.config;
|
||||
},
|
||||
consumption() {
|
||||
return getConsumption(this.config, this.service?.metadata?.price);
|
||||
},
|
||||
service() {
|
||||
return this.$store.state.midjourney?.service;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel {
|
||||
flex: 1;
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="panel">
|
||||
<div class="config">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 overflow-y-auto p-[15px]">
|
||||
<prompt-input class="mb-4" />
|
||||
<model-selector class="mb-4" />
|
||||
<style-selector class="mb-4" />
|
||||
@@ -10,12 +10,13 @@
|
||||
<start-image class="mb-2" />
|
||||
<seed-selector class="mb-4" />
|
||||
<duration-selector class="mb-4" />
|
||||
<div class="actions">
|
||||
<el-button type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('pixverse.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center px-[15px] pb-[15px]">
|
||||
<consumption :value="consumption" :service="service" />
|
||||
<el-button type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('pixverse.button.generate') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -33,6 +34,8 @@ import DurationSelector from './config/DurationSelector.vue';
|
||||
import RatioSelector from './config/RatioSelector.vue';
|
||||
import StartImage from './config/StartImage.vue';
|
||||
import PromptInput from './config/PromptInput.vue';
|
||||
import Consumption from '../common/Consumption.vue';
|
||||
import { getConsumption } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ConfigPanel',
|
||||
@@ -47,12 +50,19 @@ export default defineComponent({
|
||||
DurationSelector,
|
||||
StartImage,
|
||||
SeedSelector,
|
||||
RatioSelector
|
||||
RatioSelector,
|
||||
Consumption
|
||||
},
|
||||
emits: ['generate'],
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.pixverse?.config;
|
||||
},
|
||||
consumption() {
|
||||
return getConsumption(this.config, this.service?.metadata?.price);
|
||||
},
|
||||
service() {
|
||||
return this.$store.state.pixverse?.service;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -62,28 +72,3 @@ export default defineComponent({
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.panel {
|
||||
height: 100%;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
height: calc(100% - 40px);
|
||||
.config {
|
||||
width: 100%;
|
||||
height: calc(100% - 50px);
|
||||
flex: 1;
|
||||
}
|
||||
.actions {
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.btn {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="panel">
|
||||
<div class="config">
|
||||
<div class="flex flex-col h-full">
|
||||
<div class="flex-1 overflow-y-auto p-[15px]">
|
||||
<type-selector class="mb-4" />
|
||||
<upload-audio class="mb-4" />
|
||||
<prompt-input v-if="!config?.custom" class="mb-4" />
|
||||
@@ -9,16 +9,17 @@
|
||||
<title-input v-if="config?.custom" class="mb-4" />
|
||||
<extend-from-input v-if="config?.action === 'extend'" class="mb-4" />
|
||||
<cover-from-input v-if="config?.action === 'cover'" class="mb-4" />
|
||||
<div class="actions">
|
||||
<el-button v-if="config?.action !== 'extend'" type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('suno.button.generate') }}
|
||||
</el-button>
|
||||
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('suno.button.extend') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col items-center justify-center px-[15px] pb-[15px]">
|
||||
<consumption :value="consumption" :service="service" />
|
||||
<el-button v-if="config?.action !== 'extend'" type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('suno.button.generate') }}
|
||||
</el-button>
|
||||
<el-button v-else type="primary" class="btn w-full" round @click="onGenerate">
|
||||
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
|
||||
{{ $t('suno.button.extend') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -35,6 +36,8 @@ import TitleInput from './config/TitleInput.vue';
|
||||
import ExtendFromInput from './config/ExtendFromInput.vue';
|
||||
import CoverFromInput from './config/CoverFromInput.vue';
|
||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||
import Consumption from '../common/Consumption.vue';
|
||||
import { getConsumption } from '@/utils';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'PresetPanel',
|
||||
@@ -48,12 +51,19 @@ export default defineComponent({
|
||||
CoverFromInput,
|
||||
UploadAudio,
|
||||
FontAwesomeIcon,
|
||||
ElButton
|
||||
ElButton,
|
||||
Consumption
|
||||
},
|
||||
emits: ['generate'],
|
||||
computed: {
|
||||
config() {
|
||||
return this.$store.state.suno?.config;
|
||||
},
|
||||
consumption() {
|
||||
return getConsumption(this.config, this.service?.metadata?.price);
|
||||
},
|
||||
service() {
|
||||
return this.$store.state.suno?.service;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in new issue
Block a user