feat: 提交身份图片任务后关闭弹窗
This commit is contained in:
1 parent
6e6af5e9bb
commit
37a97217f3
1 file changed
+13
-2
@@ -149,6 +149,17 @@ function refreshDirectory() {
|
|||||||
void Promise.all([catalog.refresh(), castingQuery.refresh()])
|
void Promise.all([catalog.refresh(), castingQuery.refresh()])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Character 使用确认选角事务;Scene / Prop 保留普通母版切换。 */
|
||||||
|
async function submitIdentityImage(input: Parameters<typeof generateImage>[0]) {
|
||||||
|
await generateImage(input)
|
||||||
|
if (!operation.value.error) imageOpen.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
async function submitCastingCandidate(input: Parameters<typeof generateCastingCandidate>[0]) {
|
||||||
|
await generateCastingCandidate(input)
|
||||||
|
if (!operation.value.error) castingOpen.value = false
|
||||||
|
}
|
||||||
|
|
||||||
/** Character 使用确认选角事务;Scene / Prop 保留普通母版切换。 */
|
/** Character 使用确认选角事务;Scene / Prop 保留普通母版切换。 */
|
||||||
function chooseAnchor(imageId: string) {
|
function chooseAnchor(imageId: string) {
|
||||||
if (subject.value?.module === 'character') void confirmCasting(imageId)
|
if (subject.value?.module === 'character') void confirmCasting(imageId)
|
||||||
@@ -854,7 +865,7 @@ watch(
|
|||||||
:catalog="generationModelsQuery.data.value"
|
:catalog="generationModelsQuery.data.value"
|
||||||
:profile="profileQuery.data.value.profile"
|
:profile="profileQuery.data.value.profile"
|
||||||
:disabled="!canGenerateImage"
|
:disabled="!canGenerateImage"
|
||||||
@generate="generateImage" />
|
@generate="submitIdentityImage" />
|
||||||
<CastingCandidateDialog
|
<CastingCandidateDialog
|
||||||
v-if="subject?.module === 'character' && profileQuery.data.value?.profile && generationModelsQuery.data.value"
|
v-if="subject?.module === 'character' && profileQuery.data.value?.profile && generationModelsQuery.data.value"
|
||||||
v-model:open="castingOpen"
|
v-model:open="castingOpen"
|
||||||
@@ -863,7 +874,7 @@ watch(
|
|||||||
:catalog="generationModelsQuery.data.value"
|
:catalog="generationModelsQuery.data.value"
|
||||||
:profile="profileQuery.data.value.profile"
|
:profile="profileQuery.data.value.profile"
|
||||||
:disabled="!canGenerateCandidate"
|
:disabled="!canGenerateCandidate"
|
||||||
@generate="generateCastingCandidate"
|
@generate="submitCastingCandidate"
|
||||||
/></WorkspacePage>
|
/></WorkspacePage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user