mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-19 23:40:07 +00:00
fix: image edit dialog apply button (#527)
This commit is contained in:
parent
0d4df4b269
commit
4b70c6b3e7
1 changed files with 6 additions and 2 deletions
|
@ -10,13 +10,17 @@ const props = withDefaults(defineProps<{
|
||||||
removable: true,
|
removable: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
defineEmits<{
|
const emit = defineEmits<{
|
||||||
(evt: 'remove'): void
|
(evt: 'remove'): void
|
||||||
(evt: 'setDescription', description: string): void
|
(evt: 'setDescription', description: string): void
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const isEditDialogOpen = ref(false)
|
const isEditDialogOpen = ref(false)
|
||||||
const description = ref(props.attachment.description ?? '')
|
const description = ref(props.attachment.description ?? '')
|
||||||
|
const toggleApply = () => {
|
||||||
|
isEditDialogOpen.value = false
|
||||||
|
emit('setDescription', unref(description))
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -52,7 +56,7 @@ const description = ref(props.attachment.description ?? '')
|
||||||
</h1>
|
</h1>
|
||||||
<div flex flex-col gap-2>
|
<div flex flex-col gap-2>
|
||||||
<textarea v-model="description" p-3 h-50 bg-base rounded-2 border-strong border-1 md:w-100 />
|
<textarea v-model="description" p-3 h-50 bg-base rounded-2 border-strong border-1 md:w-100 />
|
||||||
<button btn-outline @click="$emit('setDescription', description)">
|
<button btn-outline @click="toggleApply">
|
||||||
{{ $t('action.apply') }}
|
{{ $t('action.apply') }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue