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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
7e69e708
Commit
7e69e708
authored
Dec 19, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up link_to_member_avatar computeds.
parent
c0574309
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
app/assets/javascripts/vue_common_component/link_to_member_avatar.js.es6
...scripts/vue_common_component/link_to_member_avatar.js.es6
+5
-11
No files found.
app/assets/javascripts/vue_common_component/link_to_member_avatar.js.es6
View file @
7e69e708
...
...
@@ -5,7 +5,8 @@
props: {
avatarUrl: {
type: String,
required: true,
required: false,
default: '/assets/no_avatar.png',
},
profileUrl: {
type: String,
...
...
@@ -52,7 +53,6 @@
},
data() {
return {
noAvatarUrl: '/assets/no_avatar.png',
defaultAvatarClass: 'avatar avatar-inline',
};
},
...
...
@@ -63,12 +63,6 @@
avatarHtmlClass() {
return `${this.avatarSizeClass} ${this.defaultAvatarClass}`;
},
avatarElemId() {
return this.username ? `${this.username}-avatar-link` : 'non-user-avatar-link';
},
preppedAvatarUrl() {
return this.avatarUrl || this.noAvatarUrl;
},
tooltipClass() {
return this.showTooltip ? 'has-tooltip' : '';
},
...
...
@@ -82,14 +76,14 @@
return `author_link ${this.tooltipClass} ${this.extraLinkClass} ${this.disabledClass}`
},
tooltipContainerAttr() {
return this.tooltipContainer ||
`#${this.avatarElemId}`
;
return this.tooltipContainer ||
'body'
;
},
},
template: `
<div class='link-to-member-avatar'
:id='avatarElemId'
>
<div class='link-to-member-avatar'>
<a :href='profileUrl' :class='linkClass' :data-original-title='displayName' :data-container='tooltipContainerAttr'>
<svg v-if='avatarHtml' v-html='avatarHtml' :class='avatarHtmlClass' :width='size' :height='size' :alt='displayName'></svg>
<img :class='avatarClass' :src='
preppedA
vatarUrl' :width='size' :height='size' :alt='displayName'/>
<img :class='avatarClass' :src='
a
vatarUrl' :width='size' :height='size' :alt='displayName'/>
</a>
</div>
`
...
...
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