Skip to content

Commit 6cd5ee6

Browse files
committed
UX: Display file errors as alert in edit dialog to enhance visibility
1 parent 5908ba7 commit 6cd5ee6

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

frontend/src/dialog/photo/files.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
<v-card>
1111
<v-card-text class="white pa-0">
1212
<v-container fluid class="pa-0">
13+
<v-alert
14+
:value="file.Error"
15+
type="error" class="my-0 text-capitalize"
16+
>{{ file.Error }}</v-alert>
1317
<v-layout row wrap fill-height
1418
align-center
1519
justify-center>
@@ -41,13 +45,13 @@
4145
@click.stop.prevent="downloadFile(file)">
4246
<translate>Download</translate>
4347
</v-btn>
44-
<v-btn v-if="features.edit && file.Type === 'jpg' && file.Error !== '' && !file.Primary" small depressed dark
48+
<v-btn v-if="features.edit && file.Type === 'jpg' && !file.Error && !file.Primary" small depressed dark
4549
color="primary-button"
4650
class="ma-0 action-primary"
4751
@click.stop.prevent="primaryFile(file)">
4852
<translate>Primary</translate>
4953
</v-btn>
50-
<v-btn v-if="features.edit && !file.Sidecar && file.Error !== '' && !file.Primary && file.Root === '/'" small
54+
<v-btn v-if="features.edit && !file.Sidecar && !file.Error && !file.Primary && file.Root === '/'" small
5155
depressed dark color="primary-button"
5256
class="ma-0 action-unstack"
5357
@click.stop.prevent="unstackFile(file)">
@@ -66,12 +70,6 @@
6670
</td>
6771
<td>{{ file.UID | uppercase }}</td>
6872
</tr>
69-
<tr v-if="file.Error">
70-
<td>
71-
<translate>Error</translate>
72-
</td>
73-
<td><span class="body-2">{{ file.Error | uppercase }}</span></td>
74-
</tr>
7573
<tr v-if="file.InstanceID" title="XMP">
7674
<td>
7775
<translate>Instance ID</translate>
@@ -162,7 +160,7 @@
162160
</td>
163161
<td>{{ file.MainColor | capitalize }}</td>
164162
</tr>
165-
<tr v-if="file.Type === 'jpg'">
163+
<tr v-if="file.Chroma">
166164
<td>
167165
<translate>Chroma</translate>
168166
</td>

0 commit comments

Comments
 (0)