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