Systemtags and external actions update
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
ae59edc6bf
commit
1c13c52acf
|
@ -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}`)
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -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') }}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
_rendered: false,
|
||||
|
||||
className: 'systemTagsInfoView hidden',
|
||||
className: 'systemTagsInfoView',
|
||||
|
||||
/**
|
||||
* @type OC.SystemTags.SystemTagsInputField
|
||||
|
@ -123,11 +123,7 @@
|
|||
var appliedTags = collection.map(modelToSelection)
|
||||
self._inputView.setData(appliedTags)
|
||||
|
||||
if (appliedTags.length !== 0) {
|
||||
self.show()
|
||||
} else {
|
||||
self.hide()
|
||||
}
|
||||
self.show()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -69,8 +69,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.systemTagsInfoView,
|
||||
.systemtags-select2-container {
|
||||
width: 100%;
|
||||
|
||||
.select2-choices .select2-search-choice.select2-locked .label {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue