285285 @submit =" onNoteSubmit " />
286286 </template >
287287
288- <!-- external sharing via url (social...) -->
289- <ActionLink v-for =" ({icon , url , name }, index ) in externalActions "
288+ <!-- external actions -->
289+ <ExternalShareAction v-for =" action in externalLinkActions "
290+ :id =" action .id "
291+ :key =" action .id "
292+ :action =" action "
293+ :file-info =" fileInfo "
294+ :share =" share " />
295+
296+ <!-- external legacy sharing via url (social...) -->
297+ <ActionLink v-for =" ({icon , url , name }, index ) in externalLegacyLinkActions "
290298 :key =" index "
291299 :href =" url (shareLink )"
292300 :icon =" icon "
@@ -328,15 +336,16 @@ import Vue from 'vue'
328336
329337import ActionButton from ' @nextcloud/vue/dist/Components/ActionButton'
330338import ActionCheckbox from ' @nextcloud/vue/dist/Components/ActionCheckbox'
331- import ActionRadio from ' @nextcloud/vue/dist/Components/ActionRadio'
332339import ActionInput from ' @nextcloud/vue/dist/Components/ActionInput'
340+ import ActionLink from ' @nextcloud/vue/dist/Components/ActionLink'
341+ import ActionRadio from ' @nextcloud/vue/dist/Components/ActionRadio'
333342import ActionText from ' @nextcloud/vue/dist/Components/ActionText'
334343import ActionTextEditable from ' @nextcloud/vue/dist/Components/ActionTextEditable'
335- import ActionLink from ' @nextcloud/vue/dist/Components/ActionLink'
336344import Actions from ' @nextcloud/vue/dist/Components/Actions'
337345import Avatar from ' @nextcloud/vue/dist/Components/Avatar'
338346import Tooltip from ' @nextcloud/vue/dist/Directives/Tooltip'
339347
348+ import ExternalShareAction from ' ./ExternalShareAction'
340349import GeneratePassword from ' ../utils/GeneratePassword'
341350import Share from ' ../models/Share'
342351import SharesMixin from ' ../mixins/SharesMixin'
@@ -354,6 +363,7 @@ export default {
354363 ActionText,
355364 ActionTextEditable,
356365 Avatar,
366+ ExternalShareAction,
357367 },
358368
359369 directives: {
@@ -381,7 +391,8 @@ export default {
381391 publicUploadRValue: OC .PERMISSION_READ ,
382392 publicUploadWValue: OC .PERMISSION_CREATE ,
383393
384- ExternalLinkActions: OCA .Sharing .ExternalLinkActions .state ,
394+ ExternalLegacyLinkActions: OCA .Sharing .ExternalLinkActions .state ,
395+ ExternalShareActions: OCA .Sharing .ExternalShareActions .state ,
385396 }
386397 },
387398
@@ -621,11 +632,23 @@ export default {
621632 },
622633
623634 /**
624- * External aditionnal actions for the menu
635+ * External additionnai actions for the menu
636+ * @deprecated use OCA.Sharing.ExternalShareActions
637+ * @returns {Array}
638+ */
639+ externalLegacyLinkActions () {
640+ return this .ExternalLegacyLinkActions .actions
641+ },
642+
643+ /**
644+ * Additional actions for the menu
625645 * @returns {Array}
626646 */
627- externalActions () {
628- return this .ExternalLinkActions .actions
647+ externalLinkActions () {
648+ // filter only the registered actions for said link
649+ return this .ExternalShareActions .actions
650+ .filter (action => action .shareType .includes (OC .Share .SHARE_TYPE_LINK )
651+ || action .shareType .includes (OC .Share .SHARE_TYPE_EMAIL ))
629652 },
630653
631654 isPasswordPolicyEnabled () {
0 commit comments