diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-10-09 07:53:30 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2019-10-29 13:20:03 +0100 |
commit | 1c13c52acffeac59b0ef5d156a9a5bc36e611619 (patch) | |
tree | e140b7a2342d7ee396acc4b2abe24264f55d0549 /apps/files_sharing/src | |
parent | ae59edc6bfa7331636c7a0d0b144f292367ae5a3 (diff) | |
download | nextcloud-server-1c13c52acffeac59b0ef5d156a9a5bc36e611619.tar.gz nextcloud-server-1c13c52acffeac59b0ef5d156a9a5bc36e611619.zip |
Systemtags and external actions update
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing/src')
-rw-r--r-- | apps/files_sharing/src/components/SharingEntryLink.vue | 9 | ||||
-rw-r--r-- | apps/files_sharing/src/services/ExternalLinkActions.js | 4 | ||||
-rw-r--r-- | apps/files_sharing/src/views/SharingTab.vue | 8 |
3 files changed, 18 insertions, 3 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue index afeaee06bde..4501d67cbbb 100644 --- a/apps/files_sharing/src/components/SharingEntryLink.vue +++ b/apps/files_sharing/src/components/SharingEntryLink.vue @@ -247,7 +247,14 @@ @update:value="debounceQueueUpdate('note')" /> </template> - <components :is="action" v-for="(action, index) in externalActions" :key="index" /> + <!-- external sharing via url (social...) --> + <ActionLink v-for="({icon, url, name}, index) in externalActions" + :key="index" + :href="url(shareLink)" + :icon="icon" + target="_blank"> + {{ name }} + </ActionLink> <ActionButton icon="icon-delete" :disabled="saving" @click.prevent="onDelete"> {{ t('files_sharing', 'Delete share') }} diff --git a/apps/files_sharing/src/services/ExternalLinkActions.js b/apps/files_sharing/src/services/ExternalLinkActions.js index f67a1cb1155..35377d86764 100644 --- a/apps/files_sharing/src/services/ExternalLinkActions.js +++ b/apps/files_sharing/src/services/ExternalLinkActions.js @@ -52,11 +52,11 @@ export default class ExternalLinkActions { * @returns {boolean} */ registerAction(action) { - if (typeof action === 'object' && action.render && action.components) { + if (typeof action === 'object' && action.icon && action.name && action.url) { this.#state.actions.push(action) return true } - console.error(`Invalid action component provided`, action) + console.error(`Invalid action provided`, action) return false } diff --git a/apps/files_sharing/src/views/SharingTab.vue b/apps/files_sharing/src/views/SharingTab.vue index 4f16f4b2435..216b2e74ffc 100644 --- a/apps/files_sharing/src/views/SharingTab.vue +++ b/apps/files_sharing/src/views/SharingTab.vue @@ -69,6 +69,14 @@ :id="`${fileInfo.id}`" type="file" :name="fileInfo.name" /> + + <!-- additionnal entries, use it with cautious --> + <div v-for="(section, index) in sections" + :ref="'section-' + index" + :key="index" + class="sharingTab__additionalContent"> + <component :is="section($refs['section-'+index], fileInfo)" :file-info="fileInfo" /> + </div> </template> </Tab> </template> |