folder-share: refresh sidebar on link change

pull/474/head
Varun Patil 2023-03-10 12:27:15 -08:00
parent c74ef0766c
commit af6c142db2
1 changed files with 10 additions and 1 deletions

View File

@ -34,7 +34,7 @@
<ul>
<NcListItem
v-for="share of shares"
:title="share.label || share.token"
:title="share.label || t('memories', 'Share link')"
:key="share.id"
:bold="false"
@click="copy(share.url)"
@ -193,6 +193,7 @@ export default defineComponent({
this.loading = false;
}
this.refreshUrls();
this.refreshSidebar();
},
async deleteLink(share: IShare) {
@ -203,12 +204,20 @@ export default defineComponent({
this.loading = false;
}
this.refreshUrls();
this.refreshSidebar();
},
copy(url: string) {
window.navigator.clipboard.writeText(url);
showSuccess(this.t("memories", "Link copied to clipboard"));
},
refreshSidebar() {
globalThis.mSidebar.close();
globalThis.mSidebar.open({
filename: this.folderPath,
} as any);
},
},
});
</script>