2019-10-24 02:15:55 +00:00
|
|
|
<template>
|
2021-05-18 16:09:55 +00:00
|
|
|
<SmartModal v-if="show" @close="$emit('hide-modal')">
|
2021-06-30 08:46:02 +00:00
|
|
|
<template #header>
|
2021-08-02 15:27:18 +00:00
|
|
|
<h3 class="heading">{{ $t("folder.edit") }}</h3>
|
2021-06-30 08:46:02 +00:00
|
|
|
<div>
|
2021-07-03 13:14:58 +00:00
|
|
|
<ButtonSecondary icon="close" @click.native="hideModal" />
|
2020-12-11 10:29:03 +00:00
|
|
|
</div>
|
2021-06-30 08:46:02 +00:00
|
|
|
</template>
|
|
|
|
|
<template #body>
|
2021-07-17 17:40:28 +00:00
|
|
|
<div class="flex flex-col px-2">
|
2021-07-25 20:03:32 +00:00
|
|
|
<label for="selectLabelEditFolder" class="font-semibold px-4 pb-4">{{
|
|
|
|
|
$t("label")
|
|
|
|
|
}}</label>
|
2021-07-09 17:19:45 +00:00
|
|
|
<input
|
|
|
|
|
id="selectLabelEditFolder"
|
|
|
|
|
v-model="name"
|
|
|
|
|
class="input"
|
|
|
|
|
type="text"
|
|
|
|
|
@keyup.enter="editFolder"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2021-06-30 08:46:02 +00:00
|
|
|
</template>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span>
|
2021-07-03 13:14:58 +00:00
|
|
|
<ButtonPrimary :label="$t('save')" @click.native="editFolder" />
|
2021-07-09 17:19:45 +00:00
|
|
|
<ButtonSecondary :label="$t('cancel')" @click.native="hideModal" />
|
2021-06-30 08:46:02 +00:00
|
|
|
</span>
|
|
|
|
|
</template>
|
2021-03-01 03:58:14 +00:00
|
|
|
</SmartModal>
|
2019-10-24 02:15:55 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2019-11-02 05:32:21 +00:00
|
|
|
export default {
|
|
|
|
|
props: {
|
|
|
|
|
show: Boolean,
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2021-05-20 08:54:14 +00:00
|
|
|
name: null,
|
2020-02-24 18:44:50 +00:00
|
|
|
}
|
2019-11-02 05:32:21 +00:00
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
editFolder() {
|
2021-05-07 00:46:29 +00:00
|
|
|
this.$emit("submit", this.name)
|
2021-05-20 08:54:14 +00:00
|
|
|
this.hideModal()
|
2019-10-24 02:15:55 +00:00
|
|
|
},
|
2019-11-02 05:32:21 +00:00
|
|
|
hideModal() {
|
2021-05-20 08:54:14 +00:00
|
|
|
this.name = null
|
2020-02-25 02:06:23 +00:00
|
|
|
this.$emit("hide-modal")
|
2020-02-24 18:44:50 +00:00
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
2019-10-24 02:15:55 +00:00
|
|
|
</script>
|