+
@@ -46,20 +46,22 @@
:link-shares="linkShares"
:reshare="reshare"
:shares="shares"
- @add:share="addShare" />
+ @open-sharing-details="toggleShareDetailsView" />
+ :shares="linkShares"
+ @open-sharing-details="toggleShareDetailsView" />
+ :file-info="fileInfo"
+ @open-sharing-details="toggleShareDetailsView" />
@@ -74,6 +76,15 @@
:name="fileInfo.name" />
+
+
+
+
+
{}) {
+ addShare(share, resolve = () => { }) {
// only catching share type MAIL as link shares are added differently
// meaning: not from the ShareInput
if (share.type === this.SHARE_TYPES.SHARE_TYPE_EMAIL) {
@@ -331,7 +346,16 @@ export default {
}
this.awaitForShare(share, resolve)
},
-
+ /**
+ * Remove a share from the shares list
+ *
+ * @param {Share} share the share to remove
+ */
+ removeShare(share) {
+ const index = this.shares.findIndex(item => item.id === share.id)
+ // eslint-disable-next-line vue/no-mutating-props
+ this.shares.splice(index, 1)
+ },
/**
* Await for next tick and render after the list updated
* Then resolve with the matched vue component of the
@@ -355,6 +379,12 @@ export default {
}
})
},
+ toggleShareDetailsView(eventData) {
+ if (eventData) {
+ this.shareDetailsData = eventData
+ }
+ this.showSharingDetailsView = !this.showSharingDetailsView
+ },
},
}
@@ -368,6 +398,7 @@ export default {
&__content {
padding: 0 6px;
}
+
&__additionalContent {
margin: 44px 0;
}