Skip to content

Commit

Permalink
Fix drawai reveal (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyf-github-user authored Nov 15, 2024
1 parent d6c4465 commit ba0101d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix drawai reveal",
"packageName": "@acedatacloud/nexior",
"email": "[email protected]",
"dependentChangeType": "patch"
}
26 changes: 16 additions & 10 deletions src/components/headshots/task/Preview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,7 @@
<p v-if="modelValue?.request?.template" class="prompt mt-2">
{{ modelValue?.request?.template }}
<span v-if="!modelValue?.response"> - ({{ $t('headshots.status.pending') }}) </span>
<!-- <span
v-if="
modelValue?.response?.data?.state === 'processing' ||
modelValue?.response?.data?.state === 'pending' ||
modelValue?.response?.data?.state === 'completed'
"
>
- ({{ $t('headshots.status.processing') }})
</span> -->
<span v-if="modelValue?.response?.status === 'unknown'"> - ({{ $t('headshots.status.processing') }}) </span>
</p>
</div>
<!-- Display success message -->
Expand Down Expand Up @@ -81,6 +73,20 @@
</p>
</el-alert>
</div>
<div v-if="modelValue?.response?.status === 'unknown'" :class="{ content: true }">
<el-alert :closable="false" class="info">
<template #template>
<font-awesome-icon icon="fa-solid fa-exclamation-triangle" class="mr-1" />
{{ $t('headshots.name.failure') }}
</template>
<p class="description">
<font-awesome-icon icon="fa-solid fa-magic" class="mr-1" />
{{ $t('headshots.name.taskId') }}:
{{ modelValue?.id }}
<copy-to-clipboard :content="modelValue?.id!" class="btn-copy" />
</p>
</el-alert>
</div>
</div>
</div>
</template>
Expand Down Expand Up @@ -163,7 +169,7 @@ $left-width: 70px;
.left {
width: $left-width;
.avatar {
background-color: rgb(0, 0, 0);
background-color: rgb(64, 119, 188);
padding: 2px;
width: 50px;
height: 50px;
Expand Down
1 change: 1 addition & 0 deletions src/models/headshots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface IHeadshotsPicture {

export interface IHeadshotsGenerateResponse {
success?: boolean;
status?: string;
task_id: string;
trace_id: string;
error?: {
Expand Down

0 comments on commit ba0101d

Please sign in to comment.