Skip to content

Commit 25d3817

Browse files
authored
Merge pull request #270 from nextcloud/fix/267/circles-support
Fix circle support
2 parents 9623140 + ef0f832 commit 25d3817

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

src/components/MultiselectWho.vue

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<span class="multiselect-name">
3333
{{ option.displayName }}
3434
</span>
35-
<span :class="{ icon: true, ['icon-' + option.type]: true, 'multiselect-icon': true }" />
35+
<span :class="{ icon: true, [typeIconClass[option.type]]: true, 'multiselect-icon': true }" />
3636
</div>
3737
</template>
3838
<template #selected-option="option">
@@ -47,7 +47,7 @@
4747
<span class="multiselect-name">
4848
{{ option.displayName }}
4949
</span>
50-
<span :class="{ icon: true, ['icon-' + option.type]: true, 'multiselect-icon': true }" />
50+
<span :class="{ icon: true, [typeIconClass[option.type]]: true, 'multiselect-icon': true }" />
5151
</template>
5252
<template #noOptions>
5353
{{ t('approval', 'No recommendations. Start typing.') }}
@@ -67,6 +67,12 @@ import axios from '@nextcloud/axios'
6767
import NcAvatar from '@nextcloud/vue/dist/Components/NcAvatar.js'
6868
import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
6969
70+
const typeIconClass = {
71+
user: 'icon-user',
72+
group: 'icon-group',
73+
circle: 'icon-circles',
74+
}
75+
7076
export default {
7177
name: 'MultiselectWho',
7278
@@ -86,8 +92,7 @@ export default {
8692
default: () => [
8793
0,
8894
1,
89-
// wait until new circle stuff is more stable
90-
// 7,
95+
7,
9196
],
9297
},
9398
placeholder: {
@@ -102,6 +107,7 @@ export default {
102107
103108
data() {
104109
return {
110+
typeIconClass,
105111
loadingSuggestions: false,
106112
suggestions: [],
107113
query: '',
@@ -266,12 +272,7 @@ export default {
266272
}
267273
.multiselect-icon {
268274
opacity: 0.5;
269-
}
270-
.icon-circle {
271-
background-image: var(--icon-contacts-circles-000);
272-
background-size: 100% 100%;
273-
background-repeat: no-repeat;
274-
background-position: center;
275+
margin-left: 4px;
275276
}
276277
.select-suggestion {
277278
display: flex;

src/components/RequestForm.vue

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default {
109109
if (entity.type === 'group') {
110110
return 'icon-group'
111111
} else if (entity.type === 'circle') {
112-
return 'icon-circle'
112+
return 'icon-circles'
113113
}
114114
return undefined
115115
},
@@ -186,13 +186,4 @@ export default {
186186
}
187187
}
188188
}
189-
190-
:deep(.user-bubble) {
191-
.icon-circle {
192-
background-image: var(--icon-circles-circles-000);
193-
background-size: 100% 100%;
194-
background-repeat: no-repeat;
195-
background-position: center;
196-
}
197-
}
198189
</style>

0 commit comments

Comments
 (0)