]> source.dussan.org Git - nextcloud-server.git/commitdiff
Systemtags and external actions update
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Wed, 9 Oct 2019 05:53:30 +0000 (07:53 +0200)
committerDaniel Calviño Sánchez <danxuliu@gmail.com>
Tue, 29 Oct 2019 12:20:03 +0000 (13:20 +0100)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
apps/files/src/views/Sidebar.vue
apps/files_sharing/src/components/SharingEntryLink.vue
apps/files_sharing/src/services/ExternalLinkActions.js
apps/files_sharing/src/views/SharingTab.vue
apps/systemtags/src/systemtagsinfoview.js
core/css/systemtags.scss

index 9a00df173772d9d8f3d68def31cf7f491e1d9bf9..e99389de75f28c91f6429fb55483b5d72a8c41e2 100644 (file)
@@ -113,7 +113,7 @@ export default {
                 */
                davPath() {
                        const user = OC.getCurrentUser().uid
-                       return OC.linkToRemote(`dav/files/${user}${encodeURIComponent(this.file)}`)
+                       return OC.linkToRemote(`dav/files/${user}${this.file}`)
                },
 
                /**
index afeaee06bde82cd327df02415369557f1d1d8649..4501d67cbbbde921bc0bfbb5479552debc80a05c 100644 (file)
                                                @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') }}
index f67a1cb11552cd0f033aeb4937646bc0eecce46f..35377d86764534a01fabe3629a1db733ee4fe468 100644 (file)
@@ -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
        }
 
index 4f16f4b243574d83464b0950d51bec5cc3ab4560..216b2e74ffcdd6cb21894852419d9341b229e622 100644 (file)
                                :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>
index 548a147591cbe0245295b80f057483dc4325c1b6..2ec1ba0fef4fe02de32dce4967b5bd91ededa40c 100644 (file)
@@ -30,7 +30,7 @@
 
                        _rendered: false,
 
-                       className: 'systemTagsInfoView hidden',
+                       className: 'systemTagsInfoView',
 
                        /**
                         * @type OC.SystemTags.SystemTagsInputField
                                                        var appliedTags = collection.map(modelToSelection)
                                                        self._inputView.setData(appliedTags)
 
-                                                       if (appliedTags.length !== 0) {
-                                                               self.show()
-                                                       } else {
-                                                               self.hide()
-                                                       }
+                                                       self.show()
                                                }
                                        })
                                }
index bffafe101e3f31f87244eda1da237e468056cff1..e2b587fcc79f32e1095e3d00558327a33cca70b0 100644 (file)
        }
 }
 
+.systemTagsInfoView,
 .systemtags-select2-container {
        width: 100%;
+       
        .select2-choices .select2-search-choice.select2-locked .label {
                opacity: 0.5;
        }