Commit 060194b9 authored by Phil Hughes's avatar Phil Hughes

Merge branch '37197-approved-gap' into 'master'

Removes the gap in approvers in the MR widget

Closes #3329

See merge request !2825
parents c2865f7e 7e43ca99
...@@ -724,7 +724,14 @@ ...@@ -724,7 +724,14 @@
.approvers-list { .approvers-list {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 5px; }
.approvers-list {
.link-to-member-avatar:not(:first-child) {
img {
margin-left: 0;
}
}
} }
.unapprove-btn { .unapprove-btn {
......
---
title: Fix the gap in approvals in merge request widget
merge_request:
author:
type: fixed
...@@ -59,43 +59,48 @@ export default { ...@@ -59,43 +59,48 @@ export default {
}) })
.catch(() => { .catch(() => {
this.unapproving = false; this.unapproving = false;
new Flash('An error occured while removing your approval.'); // eslint-disable-line Flash('An error occured while removing your approval.');
}); });
}, },
}, },
template: ` template: `
<div v-if="approvedBy.length" class="approved-by-users approvals-footer clearfix mr-info-list"> <div
<div class="approvers-prefix space-children"> v-if="approvedBy.length"
class="approved-by-users approvals-footer clearfix mr-info-list">
<div class="approvers-prefix">
<p>Approved by</p> <p>Approved by</p>
<div class="approvers-list"> <div class="approvers-list">
<span v-for="approver in approvedBy">
<link-to-member-avatar <link-to-member-avatar
:avatarSize="20" v-for="(approver, index) in approvedBy"
:key="index"
:avatar-size="20"
:avatar-url="approver.user.avatar_url" :avatar-url="approver.user.avatar_url"
extra-link-class="approver-avatar" extra-link-class="approver-avatar"
:display-name="approver.user.name" :display-name="approver.user.name"
:profile-url="approver.user.web_url" :profile-url="approver.user.web_url"
:show-tooltip="true" /> :show-tooltip="true"
</span> />
<span class="potential-approvers-list" v-for="n in approvalsLeft">
<link-to-member-avatar <link-to-member-avatar
:avatarSize="20" v-for="n in approvalsLeft"
:key="n"
:avatar-size="20"
:clickable="false" :clickable="false"
:show-tooltip="false" /> :show-tooltip="false"
</span> />
</div> </div>
<span class="unapprove-btn-wrap" v-if="showUnapproveButton">
<button <button
v-if="showUnapproveButton"
type="button"
:disabled="unapproving" :disabled="unapproving"
@click="unapproveMergeRequest" @click="unapproveMergeRequest"
class="btn btn-xs"> class="btn btn-small unapprove-btn-wrap">
<i <i
v-if="unapproving" v-if="unapproving"
class="fa fa-spinner fa-spin" class="fa fa-spinner fa-spin"
aria-hidden="true" /> aria-hidden="true">
</i>
Remove your approval Remove your approval
</button> </button>
</span>
</div> </div>
</div> </div>
`, `,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment