2019-10-01 22:20:23 +00:00
|
|
|
<template>
|
2021-03-01 03:58:14 +00:00
|
|
|
<SmartModal v-if="show" @close="hideModal">
|
2021-06-30 08:46:02 +00:00
|
|
|
<template #header>
|
|
|
|
|
<h3 class="heading">{{ $t("new_collection") }}</h3>
|
|
|
|
|
<div>
|
|
|
|
|
<button class="icon button" @click="hideModal">
|
|
|
|
|
<i class="material-icons">close</i>
|
|
|
|
|
</button>
|
2020-12-11 10:29:03 +00:00
|
|
|
</div>
|
2021-06-30 08:46:02 +00:00
|
|
|
</template>
|
|
|
|
|
<template #body>
|
2020-12-11 10:29:03 +00:00
|
|
|
<label for="selectLabel">{{ $t("label") }}</label>
|
|
|
|
|
<input
|
|
|
|
|
id="selectLabel"
|
|
|
|
|
v-model="name"
|
2021-06-25 23:44:27 +00:00
|
|
|
class="input"
|
2021-05-18 16:09:55 +00:00
|
|
|
type="text"
|
2020-12-11 10:29:03 +00:00
|
|
|
:placeholder="$t('my_new_collection')"
|
|
|
|
|
@keyup.enter="addNewCollection"
|
|
|
|
|
/>
|
2021-06-30 08:46:02 +00:00
|
|
|
</template>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<span></span>
|
|
|
|
|
<span>
|
|
|
|
|
<button class="icon button" @click="hideModal">
|
|
|
|
|
{{ $t("cancel") }}
|
|
|
|
|
</button>
|
|
|
|
|
<button class="icon button primary" @click="addNewCollection">
|
|
|
|
|
{{ $t("save") }}
|
|
|
|
|
</button>
|
|
|
|
|
</span>
|
|
|
|
|
</template>
|
2021-03-01 03:58:14 +00:00
|
|
|
</SmartModal>
|
2019-10-01 22:20:23 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2019-11-02 05:32:21 +00:00
|
|
|
export default {
|
|
|
|
|
props: {
|
2020-02-24 18:44:50 +00:00
|
|
|
show: Boolean,
|
2019-11-02 05:32:21 +00:00
|
|
|
},
|
|
|
|
|
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: {
|
|
|
|
|
addNewCollection() {
|
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-01 22:20:23 +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-22 12:02:26 +00:00
|
|
|
</script>
|