edit-meta: disable when processing

Signed-off-by: Varun Patil <radialapps@gmail.com>
dexie
Varun Patil 2023-10-01 10:36:20 -07:00
parent a3f327ed36
commit f6ba121c40
5 changed files with 41 additions and 6 deletions

View File

@ -13,6 +13,7 @@
:label="t('memories', 'Year')"
:label-visible="true"
:placeholder="t('memories', 'Year')"
:disabled="disabled"
@input="newestChange()"
/>
<NcTextField
@ -21,6 +22,7 @@
:label="t('memories', 'Month')"
:label-visible="true"
:placeholder="t('memories', 'Month')"
:disabled="disabled"
@input="newestChange()"
/>
<NcTextField
@ -29,6 +31,7 @@
:label="t('memories', 'Day')"
:label-visible="true"
:placeholder="t('memories', 'Day')"
:disabled="disabled"
@input="newestChange()"
/>
<NcTextField
@ -37,6 +40,7 @@
:label="t('memories', 'Time')"
:label-visible="true"
:placeholder="t('memories', 'Hour')"
:disabled="disabled"
@input="newestChange(true)"
/>
<NcTextField
@ -44,6 +48,7 @@
:value.sync="minute"
:label="t('memories', 'Minute')"
:placeholder="t('memories', 'Minute')"
:disabled="disabled"
@input="newestChange(true)"
/>
</div>
@ -62,6 +67,7 @@
:label="t('memories', 'Year')"
:label-visible="true"
:placeholder="t('memories', 'Year')"
:disabled="disabled"
@input="oldestChange()"
/>
<NcTextField
@ -70,6 +76,7 @@
:label="t('memories', 'Month')"
:label-visible="true"
:placeholder="t('memories', 'Month')"
:disabled="disabled"
@input="oldestChange()"
/>
<NcTextField
@ -78,6 +85,7 @@
:label="t('memories', 'Day')"
:label-visible="true"
:placeholder="t('memories', 'Day')"
:disabled="disabled"
@input="oldestChange()"
/>
<NcTextField
@ -86,6 +94,7 @@
:label="t('memories', 'Time')"
:label-visible="true"
:placeholder="t('memories', 'Hour')"
:disabled="disabled"
@input="oldestChange()"
/>
<NcTextField
@ -93,6 +102,7 @@
:value.sync="minuteLast"
:label="t('memories', 'Minute')"
:placeholder="t('memories', 'Minute')"
:disabled="disabled"
@input="oldestChange()"
/>
</div>
@ -119,6 +129,10 @@ export default defineComponent({
type: Array<IPhoto>,
required: true,
},
disabled: {
type: Boolean,
default: false,
},
},
data: () => ({

View File

@ -7,6 +7,7 @@
<NcTextField
class="field"
:id="'exif-field-' + field.field"
:disabled="disabled"
:label-outside="true"
:value.sync="exif[field.field]"
:placeholder="placeholder(field)"
@ -43,6 +44,10 @@ export default defineComponent({
type: Array<IPhoto>,
required: true,
},
disabled: {
type: Boolean,
default: false,
},
},
data: () => ({

View File

@ -7,12 +7,17 @@
<div class="action">
<NcActions :inline="2">
<NcActionButton v-if="dirty" :aria-label="t('memories', 'Reset')" @click="reset()">
<NcActionButton v-if="dirty" :aria-label="t('memories', 'Reset')" @click="reset()" :disabled="disabled">
{{ t('memories', 'Reset') }}
<template #icon> <UndoIcon :size="20" /> </template>
</NcActionButton>
<NcActionButton v-if="lat && lon" :aria-label="t('memories', 'Remove location')" @click="clear()">
<NcActionButton
v-if="lat && lon"
:aria-label="t('memories', 'Remove location')"
@click="clear()"
:disabled="disabled"
>
{{ t('memories', 'Remove location') }}
<template #icon> <CloseIcon :size="20" /> </template>
</NcActionButton>
@ -23,6 +28,7 @@
<NcTextField
:value.sync="searchBar"
:placeholder="t('memories', 'Search location / landmark')"
:disabled="disabled"
trailing-button-icon="arrowRight"
:show-trailing-button="searchBar.length > 0 && !loading"
@trailing-button-click="search"
@ -45,6 +51,7 @@
<li
v-for="option in options"
:key="option.osm_id"
:disabled="disabled"
@click="select(option)"
@keypress.enter="select(option)"
tabindex="0"
@ -96,6 +103,10 @@ export default defineComponent({
type: Array<IPhoto>,
required: true,
},
disabled: {
type: Boolean,
default: false,
},
},
data: () => ({

View File

@ -15,14 +15,14 @@
<div class="title-text">
{{ t('memories', 'Date / Time') }}
</div>
<EditDate ref="editDate" :photos="photos" />
<EditDate ref="editDate" :photos="photos" :disabled="processing" />
</div>
<div v-if="config.systemtags_enabled && sections.includes(2)">
<div class="title-text">
{{ t('memories', 'Collaborative Tags') }}
</div>
<EditTags ref="editTags" :photos="photos" />
<EditTags ref="editTags" :photos="photos" :disabled="processing" />
<div class="tag-padding" v-if="sections.length === 1"></div>
</div>
@ -30,14 +30,14 @@
<div class="title-text">
{{ t('memories', 'EXIF Fields') }}
</div>
<EditExif ref="editExif" :photos="photos" @save="save" />
<EditExif ref="editExif" :photos="photos" :disabled="processing" @save="save" />
</div>
<div v-if="sections.includes(4)">
<div class="title-text">
{{ t('memories', 'Geolocation') }}
</div>
<EditLocation ref="editLocation" :photos="photos" />
<EditLocation ref="editLocation" :photos="photos" :disabled="processing" />
</div>
</div>

View File

@ -4,6 +4,7 @@
ref="selectTags"
class="nc-comp"
v-model="tagSelection"
:disabled="disabled"
:limit="null"
:options-filter="tagFilter"
:get-option-label="tagLabel"
@ -32,6 +33,10 @@ export default defineComponent({
type: Array<IPhoto>,
required: true,
},
disabled: {
type: Boolean,
default: false,
},
},
data: () => ({