Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
84568997
Commit
84568997
authored
Jul 31, 2017
by
kushalpandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use GroupIdenticon for missing avatars
parent
b535be35
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
app/assets/javascripts/groups/components/group_item.vue
app/assets/javascripts/groups/components/group_item.vue
+13
-0
app/assets/javascripts/groups/index.js
app/assets/javascripts/groups/index.js
+2
-0
No files found.
app/assets/javascripts/groups/components/group_item.vue
View file @
84568997
...
@@ -92,6 +92,13 @@ export default {
...
@@ -92,6 +92,13 @@ export default {
hasGroups
()
{
hasGroups
()
{
return
Object
.
keys
(
this
.
group
.
subGroups
).
length
>
0
;
return
Object
.
keys
(
this
.
group
.
subGroups
).
length
>
0
;
},
},
hasAvatar
()
{
if
(
this
.
group
.
avatarUrl
)
{
return
this
.
group
.
avatarUrl
.
indexOf
(
'
/assets/no_group_avatar
'
)
===
-
1
;
}
else
{
return
false
;
}
},
},
},
};
};
</
script
>
</
script
>
...
@@ -194,9 +201,15 @@ export default {
...
@@ -194,9 +201,15 @@ export default {
<a
<a
:href=
"group.groupPath"
>
:href=
"group.groupPath"
>
<img
<img
v-if=
"hasAvatar"
class=
"avatar s40"
class=
"avatar s40"
:src=
"group.avatarUrl"
:src=
"group.avatarUrl"
/>
/>
<group-identicon
v-else
:id=
group.id
:name=
"group.name"
/>
</a>
</a>
</div>
</div>
<div
<div
...
...
app/assets/javascripts/groups/index.js
View file @
84568997
...
@@ -5,6 +5,7 @@ import GroupFilterableList from './groups_filterable_list';
...
@@ -5,6 +5,7 @@ import GroupFilterableList from './groups_filterable_list';
import
GroupsComponent
from
'
./components/groups.vue
'
;
import
GroupsComponent
from
'
./components/groups.vue
'
;
import
GroupFolder
from
'
./components/group_folder.vue
'
;
import
GroupFolder
from
'
./components/group_folder.vue
'
;
import
GroupItem
from
'
./components/group_item.vue
'
;
import
GroupItem
from
'
./components/group_item.vue
'
;
import
GroupIdenticon
from
'
./components/group_identicon.vue
'
;
import
GroupsStore
from
'
./stores/groups_store
'
;
import
GroupsStore
from
'
./stores/groups_store
'
;
import
GroupsService
from
'
./services/groups_service
'
;
import
GroupsService
from
'
./services/groups_service
'
;
import
eventHub
from
'
./event_hub
'
;
import
eventHub
from
'
./event_hub
'
;
...
@@ -21,6 +22,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -21,6 +22,7 @@ document.addEventListener('DOMContentLoaded', () => {
Vue
.
component
(
'
groups-component
'
,
GroupsComponent
);
Vue
.
component
(
'
groups-component
'
,
GroupsComponent
);
Vue
.
component
(
'
group-folder
'
,
GroupFolder
);
Vue
.
component
(
'
group-folder
'
,
GroupFolder
);
Vue
.
component
(
'
group-item
'
,
GroupItem
);
Vue
.
component
(
'
group-item
'
,
GroupItem
);
Vue
.
component
(
'
group-identicon
'
,
GroupIdenticon
);
// eslint-disable-next-line no-new
// eslint-disable-next-line no-new
new
Vue
({
new
Vue
({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment