Skip to content

Commit 5fbb182

Browse files
opt luma (#122)
1 parent 548beee commit 5fbb182

File tree

9 files changed

+63
-186
lines changed

9 files changed

+63
-186
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "opt luma",
4+
"packageName": "@acedatacloud/nexior",
5+
"email": "1348977728@qq.com",
6+
"dependentChangeType": "patch"
7+
}

src/components/luma/OperationPanel.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="actions">
88
<el-button type="primary" class="btn w-full" round @click="onGenerate">
99
<font-awesome-icon icon="fa-solid fa-magic" class="mr-2" />
10-
{{ $t('qrart.button.generate') }}
10+
{{ $t('luma.button.generate') }}
1111
</el-button>
1212
</div>
1313
</el-card>

src/components/luma/config/PromptInput.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@ export default defineComponent({
2929
ElInput,
3030
InfoIcon
3131
},
32-
data() {
33-
return {};
34-
},
3532
computed: {
3633
prompt: {
3734
get() {
@@ -60,11 +57,15 @@ export default defineComponent({
6057
display: flex;
6158
flex-direction: row;
6259
align-items: center;
60+
justify-content: space-between; // Add this line to move the icon to the right
6361
position: relative;
6462
.title {
6563
font-size: 14px;
6664
margin-bottom: 10px;
6765
}
6866
}
67+
.info {
68+
margin-left: auto; // Ensure the icon stays on the right
69+
}
6970
}
7071
</style>

src/components/luma/task/Detail.vue

-176
This file was deleted.

src/components/luma/task/Preview.vue

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div class="preview">
33
<div class="left">
4-
<el-image src="https://cdn.acedata.cloud/yu04pc.png" class="avatar" />
4+
<el-image src="https://cdn.acedata.cloud/ahjfwi.png" class="avatar" />
55
</div>
66
<div class="main">
77
<div class="bot">
@@ -70,7 +70,14 @@
7070
</el-alert>
7171
</div>
7272
<!-- Display error message -->
73-
<div v-if="!modelValue?.response" :class="{ content: true }">
73+
<div
74+
v-if="
75+
!modelValue?.response ||
76+
modelValue?.response?.data?.state === 'processing' ||
77+
modelValue?.response?.data?.state === 'pending'
78+
"
79+
:class="{ content: true }"
80+
>
7481
<el-alert :closable="false" class="info">
7582
<template #template>
7683
<font-awesome-icon icon="fa-solid fa-exclamation-triangle" class="mr-1" />
@@ -182,7 +189,7 @@ $left-width: 70px;
182189
.left {
183190
width: $left-width;
184191
.avatar {
185-
background-color: white;
192+
background-color: rgb(0, 0, 0);
186193
padding: 2px;
187194
width: 50px;
188195
height: 50px;

src/constants/luma.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const LUMA_SERVICE_ID = 'dff45a0d-2858-4936-8e2b-3d49c52aff11';
22

3-
export const LUMA_DEFAULT_ENHANCEMENT = false;
3+
export const LUMA_DEFAULT_ENHANCEMENT = true;
44
export const LUMA_DEFAULT_LOOP = false;
55
export const LUMA_DEFAULT_CUSTOM = false;

src/i18n/zh-CN/index.json

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@
4747
"message": "支持多种音乐风格,轻松生成你想要的音乐,并支持灵活的长度扩展选项。",
4848
"description": "AI 音乐章节标题"
4949
},
50+
"subtitle.luma": {
51+
"message": "对接最新的 Luma 模型,一键生成自定义的视频,并支持灵活的视频扩展选项。",
52+
"description": "AI 音乐章节标题"
53+
},
5054
"subtitle.comments": {
5155
"message": "我们很高兴能够帮助这些客户,他们对我们的服务给予了很高的评价。",
5256
"description": "客户评价章节标题"

src/i18n/zh-CN/luma.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"description": "要生成的 QR 码的高级设置"
8181
},
8282
"name.custom": {
83-
"message": "自定义扩展",
83+
"message": "自定义视频扩展",
8484
"description": "自定义扩展视频"
8585
},
8686
"name.extend": {

src/pages/index/Index.vue

+35-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<el-col
5050
v-for="(capability, capabilityIndex) in capabilities"
5151
:key="capabilityIndex"
52-
:md="24 / capabilities.length"
52+
:md="6"
5353
:xs="24"
5454
class="mb-4"
5555
>
@@ -166,6 +166,31 @@
166166
</el-row>
167167
</div>
168168
</div>
169+
<div
170+
id="luma"
171+
class="block"
172+
@click="
173+
$router.push({
174+
path: '/luma'
175+
})
176+
"
177+
>
178+
<div class="container">
179+
<el-row>
180+
<el-col :md="16" :xs="24" class="preview">
181+
<img src="https://cdn.acedata.cloud/gyogar.png" class="image desktop" />
182+
<img src="https://cdn.acedata.cloud/5kunm0.png" class="image mobile" />
183+
</el-col>
184+
<el-col :md="8" :xs="24" class="info">
185+
<h2 class="title">{{ $t('index.title.luma') }}</h2>
186+
<p class="subtitle">{{ $t('index.subtitle.luma') }}</p>
187+
<el-button type="primary" round class="btn-try">
188+
{{ $t('index.button.try') }}
189+
</el-button>
190+
</el-col>
191+
</el-row>
192+
</div>
193+
</div>
169194
<div id="comments">
170195
<div class="container">
171196
<el-row class="mb-6">
@@ -287,6 +312,15 @@ export default defineComponent({
287312
icon: 'fa-solid fa-music'
288313
}
289314
]
315+
: []),
316+
...(this.site?.features?.luma?.enabled
317+
? [
318+
{
319+
title: this.$t('index.title.luma'),
320+
subtitle: this.$t('index.subtitle.luma'),
321+
icon: 'fa-solid fa-film'
322+
}
323+
]
290324
: [])
291325
];
292326
}

0 commit comments

Comments
 (0)