Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Systemtags and external actions update
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv authored and danxuliu committed Oct 29, 2019
commit 1c13c52acffeac59b0ef5d156a9a5bc36e611619
2 changes: 1 addition & 1 deletion apps/files/src/views/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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}`)
},

/**
Expand Down
9 changes: 8 additions & 1 deletion apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
4 changes: 2 additions & 2 deletions apps/files_sharing/src/services/ExternalLinkActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
8 changes: 8 additions & 0 deletions apps/files_sharing/src/views/SharingTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 2 additions & 6 deletions apps/systemtags/src/systemtagsinfoview.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

_rendered: false,

className: 'systemTagsInfoView hidden',
className: 'systemTagsInfoView',

/**
* @type OC.SystemTags.SystemTagsInputField
Expand Down Expand Up @@ -123,11 +123,7 @@
var appliedTags = collection.map(modelToSelection)
self._inputView.setData(appliedTags)

if (appliedTags.length !== 0) {
self.show()
} else {
self.hide()
}
self.show()
}
})
}
Expand Down
2 changes: 2 additions & 0 deletions core/css/systemtags.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@
}
}

.systemTagsInfoView,
.systemtags-select2-container {
width: 100%;

.select2-choices .select2-search-choice.select2-locked .label {
opacity: 0.5;
}
Expand Down