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
@@ -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>
|
||||
Reference in new issue
Block a user