mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 06:06:56 +08:00
6c11c6641b
* Fix double request for editing item card name [SCI-9771] * Set repository cell to nil after deleting repository cell in row update service [SCI-9771]
31 lines
946 B
Vue
31 lines
946 B
Vue
<template>
|
|
<inline-edit v-if="editable" class="item-name my-auto text-xl font-semibold" :value="name" :characterLimit="255"
|
|
:characterMinLimit="0" :allowBlank="false" :smartAnnotation="false"
|
|
:preventLeavingUntilFilled="true"
|
|
:attributeName="`${i18n.t('repositories.item_card.header_title')}`" :singleLine="true"
|
|
@editingEnabled="editingName = true" @editingDisabled="editingName = false" @update="updateName" @delete="handleDelete"></inline-edit>
|
|
<h4 v-else class="item-name my-auto truncate text-xl" :title="name">
|
|
{{ name }}
|
|
</h4>
|
|
</template>
|
|
|
|
<script>
|
|
import InlineEdit from "../shared/inline_edit.vue";
|
|
|
|
export default {
|
|
name: "RepositoryItemSidebarTitle",
|
|
components: {
|
|
"inline-edit": InlineEdit
|
|
},
|
|
emits: ['update'],
|
|
props: {
|
|
editable: Boolean,
|
|
name: String,
|
|
},
|
|
methods: {
|
|
updateName(name) {
|
|
this.$emit('update', { 'repository_row': { name: name } });
|
|
},
|
|
},
|
|
};
|
|
</script>
|