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
a51135fb
Commit
a51135fb
authored
Feb 25, 2020
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch merge button to GlButton
parent
3c76175f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
...merge_request_widget/components/states/ready_to_merge.vue
+12
-16
No files found.
app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue
View file @
a51135fb
<
script
>
import
_
from
'
underscore
'
;
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
GlButton
}
from
'
@gitlab/ui
'
;
import
successSvg
from
'
icons/_icon_status_success.svg
'
;
import
warningSvg
from
'
icons/_icon_status_warning.svg
'
;
import
readyToMergeMixin
from
'
ee_else_ce/vue_merge_request_widget/mixins/ready_to_merge
'
;
...
...
@@ -26,6 +26,7 @@ export default {
CommitEdit
,
CommitMessageDropdown
,
GlIcon
,
GlButton
,
MergeImmediatelyConfirmationDialog
:
()
=>
import
(
'
ee_component/vue_merge_request_widget/components/merge_immediately_confirmation_dialog.vue
'
...
...
@@ -67,18 +68,13 @@ export default {
return
'
success
'
;
},
mergeButtonClass
()
{
const
defaultClass
=
'
btn btn-sm btn-success accept-merge-request
'
;
const
failedClass
=
`
${
defaultClass
}
btn-danger`
;
const
inActionClass
=
`
${
defaultClass
}
btn-info`
;
mergeButtonVariant
()
{
if
(
this
.
status
===
'
failed
'
)
{
return
failedClass
;
return
'
danger
'
;
}
else
if
(
this
.
status
===
'
pending
'
)
{
return
inActionClass
;
return
'
info
'
;
}
return
defaultClass
;
return
'
success
'
;
},
iconClass
()
{
if
(
...
...
@@ -267,16 +263,16 @@ export default {
<div
class=
"media-body"
>
<div
class=
"mr-widget-body-controls media space-children"
>
<span
class=
"btn-group"
>
<button
<gl-button
size=
"sm"
class=
"qa-merge-button accept-merge-request"
:variant=
"mergeButtonVariant"
:disabled=
"isMergeButtonDisabled"
:class=
"mergeButtonClass"
type=
"button"
class=
"qa-merge-button"
:loading=
"isMakingRequest"
@
click=
"handleMergeButtonClick(isAutoMergeAvailable)"
>
<i
v-if=
"isMakingRequest"
class=
"fa fa-spinner fa-spin"
aria-hidden=
"true"
></i>
{{
mergeButtonText
}}
</button>
</
gl-
button>
<button
v-if=
"shouldShowMergeImmediatelyDropdown"
:disabled=
"isMergeButtonDisabled"
...
...
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