*/
davPath() {
const user = OC.getCurrentUser().uid
- return OC.linkToRemote(`dav/files/${user}${encodeURIComponent(this.file)}`)
+ return OC.linkToRemote(`dav/files/${user}${this.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') }}
* @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
}
: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>
_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()
}
})
}
}
}
+.systemTagsInfoView,
.systemtags-select2-container {
width: 100%;
+
.select2-choices .select2-search-choice.select2-locked .label {
opacity: 0.5;
}