Skip to content
Open

fix: #17

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions custom/VisionAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@
<div
class="bulk-vision-table flex flex-col gap-3 w-full"
:class="{
'h-[830px]': popupMode === 'generation',
'h-auto max-h-[720px]': popupMode !== 'generation'
'h-[calc(100vh_-_200px)] max-h-[830px]': popupMode === 'generation',
'h-auto': popupMode !== 'generation'
}"
:style="popupMode !== 'generation' ? { maxHeight: 'min(720px, calc(100vh - 200px))' } : {}"
>
<template v-if="recordsList.length && popupMode === 'generation'" >
<div class="w-full min-w-[980px]">
Expand Down Expand Up @@ -113,7 +114,7 @@
</div>

<ProgressBar
class="progress-bar w-full"
class="w-full"
:class="isGenerationPaused ? 'opacity-80' : ''"
:current-value="Math.floor((displayedProcessedCount / totalRecords) * 100)"
:max-value="100"
Expand Down Expand Up @@ -567,6 +568,7 @@ const handleBeforeCancel = async () => {
message: t('Are you sure you want to close without saving?'),
yes: t('Yes'),
no: t('Cancel'),
dangerous: true,
});

if (confirmed) {
Expand Down
10 changes: 2 additions & 8 deletions custom/VisionTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,6 @@
@click="() => zoomImage(item.data?.[n])"
style="image-rendering: auto;"
/>
<p
v-if="isImageHasPreviewUrl[n]"
class="text-xs text-blue-500 hover:underline cursor-pointer transition-opacity"
:class="{ 'opacity-0': !isHovered(item.id, n) }"
@click="() => { item.openImageCompare[n] = true }"
>
{{ $t('old image') }}
</p>
</div>
<div v-else>
<div class="text-gray-400 dark:text-gray-500 flex flex-col items-center justify-center w-full h-[258px] bg-gray-50 dark:bg-gray-700 border border-dashed border-gray-200 dark:border-gray-600">
Expand Down Expand Up @@ -342,6 +334,8 @@ function regenerateRecord(recordId: any) {
}

function canRegenerate(item: any): boolean {
if (item.status === 'processing') return false;
if (item.status === 'completed' || item.status === 'failed') return true;
if (props.overwriteExistingValues) return true;
for (const n of props.customFieldNames) {
const val = item.data?.[n];
Expand Down