mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Copy shareable link when you enable sharing for task [SCI-8986]
This commit is contained in:
parent
9a55889264
commit
84233506c0
1 changed files with 4 additions and 3 deletions
|
@ -71,7 +71,7 @@
|
|||
:disabled="true"
|
||||
/>
|
||||
<button class="btn btn-primary share-link-copy"
|
||||
@click="copy"
|
||||
@click="copy($refs.clone.value)"
|
||||
:disabled="!sharedEnabled">{{ i18n.t('shareable_links.modal.copy_button') }}
|
||||
</button>
|
||||
</div>
|
||||
|
@ -158,8 +158,8 @@
|
|||
hideModal() {
|
||||
$(this.$refs.modal).modal('hide');
|
||||
},
|
||||
copy() {
|
||||
navigator.clipboard.writeText(this.$refs.clone.value);
|
||||
copy(value) {
|
||||
navigator.clipboard.writeText(value);
|
||||
HelperModule.flashAlertMsg(this.i18n.t('shareable_links.modal.copy_success'), 'success');
|
||||
},
|
||||
saveDescription() {
|
||||
|
@ -198,6 +198,7 @@
|
|||
$.post(this.shareableLinkUrl, { description: this.description }, (result) => {
|
||||
this.shareableData = result.data;
|
||||
this.$emit('enable');
|
||||
this.copy(this.shareableData.attributes.shareable_url);
|
||||
});
|
||||
} else {
|
||||
this.hideModal();
|
||||
|
|
Loading…
Reference in a new issue