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
34b45db4
Commit
34b45db4
authored
Dec 19, 2016
by
Bryce Johnson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shush eslint.
parent
53a5ef60
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
17 deletions
+18
-17
app/assets/javascripts/merge_request_widget/approvals/approvals_store.js.es6
...pts/merge_request_widget/approvals/approvals_store.js.es6
+5
-5
app/assets/javascripts/merge_request_widget/approvals/components/approvals_body.js.es6
...request_widget/approvals/components/approvals_body.js.es6
+9
-8
app/assets/javascripts/vue_common_component/link_to_member_avatar.js.es6
...scripts/vue_common_component/link_to_member_avatar.js.es6
+3
-3
spec/javascripts/approvals/approvals_body_spec.js.es6
spec/javascripts/approvals/approvals_body_spec.js.es6
+1
-1
No files found.
app/assets/javascripts/merge_request_widget/approvals/approvals_store.js.es6
View file @
34b45db4
...
...
@@ -40,23 +40,23 @@
fetch() {
return this.api.fetchApprovals()
.then(res => this.assignToRootStore('approvals', res.data))
.then(data => this.maybeDisableAcceptance(data.approvals
_l
eft));
.then(data => this.maybeDisableAcceptance(data.approvals
L
eft));
}
approve() {
return this.api.approveMergeRequest()
.then(res => this.assignToRootStore('approvals', res.data))
.then(data => this.maybeDisableAcceptance(data.approvals
_l
eft));
.then(data => this.maybeDisableAcceptance(data.approvals
L
eft));
}
unapprove() {
return this.api.unapproveMergeRequest()
.then(res => this.assignToRootStore('approvals', res.data))
.then(data => this.maybeDisableAcceptance(data.approvals
_l
eft));
.then(data => this.maybeDisableAcceptance(data.approvals
L
eft));
}
maybeDisableAcceptance(approvals
_l
eft) {
return this.rootStore.assignToData('disableAcceptance', !!approvals
_l
eft);
maybeDisableAcceptance(approvals
L
eft) {
return this.rootStore.assignToData('disableAcceptance', !!approvals
L
eft);
}
assignToRootStore(key, data) {
...
...
app/assets/javascripts/merge_request_widget/approvals/components/approvals_body.js.es6
View file @
34b45db4
...
...
@@ -20,16 +20,17 @@
return approvers.length === 1 ? approvers[0].name :
approvers.reduce((memo, curr, index) => {
const nextMemo = `${memo}${curr.name}`;
if (index === approvers.length - 2) { // second to last index
return `${nextMemo} or `;
} else if (index === approvers.length - 1) { // last index
return nextMemo;
}
const nextMemo = `${memo}${curr.name}`;
return `${nextMemo}, `;
}, '');
if (index === approvers.length - 2) { // second to last index
return `${nextMemo} or `;
} else if (index === approvers.length - 1) { // last index
return nextMemo;
}
return `${nextMemo}, `;
}, '');
},
showApproveButton() {
return this.userCanApprove && !this.userHasApproved;
...
...
app/assets/javascripts/vue_common_component/link_to_member_avatar.js.es6
View file @
34b45db4
...
...
@@ -50,7 +50,7 @@
type: Number,
required: false,
default: 32,
}
}
,
},
data() {
return {
...
...
@@ -74,7 +74,7 @@
return !this.clickable ? 'disabled' : '';
},
linkClass() {
return `author_link ${this.tooltipClass} ${this.extraLinkClass} ${this.disabledClass}`
return `author_link ${this.tooltipClass} ${this.extraLinkClass} ${this.disabledClass}`
;
},
tooltipContainerAttr() {
return this.tooltipContainer || 'body';
...
...
@@ -87,6 +87,6 @@
<img :class='avatarClass' :src='avatarUrl' :width='size' :height='size' :alt='displayName'/>
</a>
</div>
`
`
,
});
})();
spec/javascripts/approvals/approvals_body_spec.js.es6
View file @
34b45db4
...
...
@@ -22,7 +22,7 @@
`);
this.initialData = {
suggestedApprovers: [
{ name: 'Approver 1' }],
suggestedApprovers: [{ name: 'Approver 1' }],
userCanApprove: false,
userHasApproved: true,
approvedBy: [],
...
...
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