Skip to content

Commit

Permalink
Use avatar component in collaborators views
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincent Petry committed Jan 7, 2020
1 parent 6e659dc commit a30c6f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/files/src/components/Collaborators/AutocompleteItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<div class="uk-flex uk-flex-middle">
<oc-spinner v-if="loading" uk-spinner="ratio:1.6" class="uk-margin-small-right" :aria-label="$gettext('Loading avatar')" />
<template v-else>
<oc-avatar v-if="avatar" :src="avatar" class="uk-margin-small-right" width=50 height=50 :userName="item.label" />
<oc-avatar v-if="item.value.shareType === 0" :src="avatar" class="uk-margin-small-right" :width="50" :userName="item.label" />
<template v-else>
<oc-icon v-if="item.value.shareType === 1" class="uk-margin-small-right" name="group" size="large" />
<oc-icon v-else class="uk-margin-small-right" name="person" size="large" />
</template>
</template>
<div>
<div class="files-collaborators-autocomplete-user-text">
<div
class="uk-text-bold files-collaborators-autocomplete-username"
v-text="item.label"
Expand Down
4 changes: 2 additions & 2 deletions apps/files/src/components/Collaborators/Collaborator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<div class="files-collaborators-collaborator-information uk-flex uk-flex-wrap uk-flex-middle">
<oc-spinner v-if="loading" key="collaborator-avatar-spinner" uk-spinner="ratio:1.6" class="uk-margin-small-right" :aria-label="$gettext('Loading')"/>
<div v-else key="collaborator-avatar-loaded">
<oc-avatar v-if="avatar" :src="avatar" class="uk-margin-small-right" width=50 height=50 :userName="collaborator.displayName" />
<oc-avatar v-if="collaborator.info.share_type === '0'" :src="avatar" class="uk-margin-small-right" :width="50" :userName="collaborator.displayName" />
<div v-else key="collaborator-avatar-placeholder">
<oc-icon v-if="collaborator.info.share_type === '1'" class="uk-margin-small-right" name="group" size="large" />
<oc-icon v-else class="uk-margin-small-right" name="person" size="large" />
</div>
</div>
<div class="uk-flex uk-flex-column uk-flex-center">
<div class="uk-flex uk-flex-column uk-flex-center files-collaborators-collaborator-information-text">
<div class="oc-text">
<span class="files-collaborators-collaborator-name uk-text-bold">{{ collaborator.displayName }}</span>
<span v-if="parseInt(collaborator.info.share_type, 10) === 0 && collaborator.info.share_with_additional_info.length > 0" class="uk-text-meta">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ module.exports = {
selector: '#oc-sharing-autocomplete .oc-autocomplete-suggestion-list'
},
sharingAutoCompleteDropDownElements: {
selector: '#oc-sharing-autocomplete .oc-autocomplete-suggestion'
selector: '#oc-sharing-autocomplete .oc-autocomplete-suggestion .files-collaborators-autocomplete-user-text'
},
sharingAutoCompleteShowAllResultsButton: {
selector: '.oc-autocomplete-suggestion-overflow'
Expand All @@ -496,7 +496,7 @@ module.exports = {
},
collaboratorsInformation: {
// addresses users and groups
selector: '.files-collaborators-collaborator .files-collaborators-collaborator-information'
selector: '.files-collaborators-collaborator .files-collaborators-collaborator-information-text'
},
collaboratorInformationByCollaboratorName: {
selector: '//*[contains(@class, "files-collaborators-collaborator-name") and .="%s"]/ancestor::div[contains(concat(" ", @class, " "), " files-collaborators-collaborator ")]',
Expand Down

0 comments on commit a30c6f8

Please sign in to comment.