mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 22:43:34 -07:00
disable buttons on submission
This commit is contained in:
parent
257d86fdc6
commit
8567a06642
2 changed files with 10 additions and 7 deletions
|
@ -6,12 +6,13 @@
|
||||||
<v-btn
|
<v-btn
|
||||||
color="error"
|
color="error"
|
||||||
:icon="$globals.icons.delete"
|
:icon="$globals.icons.delete"
|
||||||
|
:disabled="submitted"
|
||||||
@click="$emit('delete')"
|
@click="$emit('delete')"
|
||||||
/>
|
/>
|
||||||
<v-spacer />
|
<v-spacer />
|
||||||
<v-menu offset-y :close-on-content-click="false">
|
<v-menu offset-y :close-on-content-click="false">
|
||||||
<template #activator="{ props }">
|
<template #activator="{ props }">
|
||||||
<v-btn color="info" v-bind="props" :icon="$globals.icons.edit" />
|
<v-btn color="info" v-bind="props" :icon="$globals.icons.edit" :disabled="submitted" />
|
||||||
</template>
|
</template>
|
||||||
<v-list>
|
<v-list>
|
||||||
<template v-for="(row, keyRow) in controls" :key="keyRow">
|
<template v-for="(row, keyRow) in controls" :key="keyRow">
|
||||||
|
@ -19,16 +20,12 @@
|
||||||
<v-list-item
|
<v-list-item
|
||||||
v-for="(control, keyControl) in row"
|
v-for="(control, keyControl) in row"
|
||||||
:key="keyControl"
|
:key="keyControl"
|
||||||
|
:disabled="submitted"
|
||||||
@click="control.callback()"
|
@click="control.callback()"
|
||||||
>
|
>
|
||||||
<v-list-item-icon>
|
<v-list-item-icon>
|
||||||
<v-icon :color="control.color">
|
<v-icon :color="control.color" :icon="control.icon" />
|
||||||
{{ control.icon }}
|
|
||||||
</v-icon>
|
|
||||||
</v-list-item-icon>
|
</v-list-item-icon>
|
||||||
<v-list-item-content>
|
|
||||||
<!-- Optionally, you can add a label here if you want -->
|
|
||||||
</v-list-item-content>
|
|
||||||
</v-list-item>
|
</v-list-item>
|
||||||
</v-list-item-group>
|
</v-list-item-group>
|
||||||
</template>
|
</template>
|
||||||
|
@ -67,6 +64,10 @@ export default defineNuxtComponent({
|
||||||
type: String,
|
type: String,
|
||||||
default: undefined,
|
default: undefined,
|
||||||
},
|
},
|
||||||
|
submitted: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
emits: ["save", "delete"],
|
emits: ["save", "delete"],
|
||||||
setup(_, context) {
|
setup(_, context) {
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
:img="imageUrl"
|
:img="imageUrl"
|
||||||
cropper-height="100%"
|
cropper-height="100%"
|
||||||
cropper-width="100%"
|
cropper-width="100%"
|
||||||
|
:submitted="loading"
|
||||||
class="mt-4"
|
class="mt-4"
|
||||||
@save="(croppedImage) => updateUploadedImage(index, croppedImage)"
|
@save="(croppedImage) => updateUploadedImage(index, croppedImage)"
|
||||||
@delete="clearImage(index)"
|
@delete="clearImage(index)"
|
||||||
|
@ -130,6 +131,7 @@ export default defineNuxtComponent({
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateUploadedImage(index: number, croppedImage: Blob) {
|
function updateUploadedImage(index: number, croppedImage: Blob) {
|
||||||
|
console.log("Cropped image:", croppedImage);
|
||||||
uploadedImages.value[index] = croppedImage;
|
uploadedImages.value[index] = croppedImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue