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
b94d7450
Commit
b94d7450
authored
Aug 31, 2020
by
Pedro Moreira da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate MR widget header components to GitLab UI
parent
88c27cb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
45 deletions
+42
-45
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
.../vue_merge_request_widget/components/mr_widget_header.vue
+42
-45
No files found.
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
View file @
b94d7450
...
@@ -2,7 +2,13 @@
...
@@ -2,7 +2,13 @@
/* eslint-disable vue/no-v-html */
/* eslint-disable vue/no-v-html */
import
Mousetrap
from
'
mousetrap
'
;
import
Mousetrap
from
'
mousetrap
'
;
import
{
escape
}
from
'
lodash
'
;
import
{
escape
}
from
'
lodash
'
;
import
{
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
GlButton
,
GlNewDropdown
as
GlDropdown
,
GlNewDropdownHeader
as
GlDropdownHeader
,
GlNewDropdownItem
as
GlDropdownItem
,
GlTooltipDirective
,
}
from
'
@gitlab/ui
'
;
import
{
n__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
n__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
mergeUrlParams
,
webIDEUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
mergeUrlParams
,
webIDEUrl
}
from
'
~/lib/utils/url_utility
'
;
import
clipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
import
clipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
...
@@ -13,13 +19,16 @@ import MrWidgetIcon from './mr_widget_icon.vue';
...
@@ -13,13 +19,16 @@ import MrWidgetIcon from './mr_widget_icon.vue';
export
default
{
export
default
{
name
:
'
MRWidgetHeader
'
,
name
:
'
MRWidgetHeader
'
,
components
:
{
components
:
{
GlIcon
,
clipboardButton
,
clipboardButton
,
TooltipOnTruncate
,
TooltipOnTruncate
,
MrWidgetIcon
,
MrWidgetIcon
,
GlButton
,
GlDropdown
,
GlDropdownHeader
,
GlDropdownItem
,
},
},
directives
:
{
directives
:
{
tooltip
,
GlTooltip
:
GlTooltipDirective
,
},
},
props
:
{
props
:
{
mr
:
{
mr
:
{
...
@@ -125,63 +134,51 @@ export default {
...
@@ -125,63 +134,51 @@ export default {
<div
class=
"branch-actions d-flex"
>
<div
class=
"branch-actions d-flex"
>
<template
v-if=
"mr.isOpen"
>
<template
v-if=
"mr.isOpen"
>
<
a
<
gl-button
v-if=
"!mr.sourceBranchRemoved"
v-if=
"!mr.sourceBranchRemoved"
v-tooltip
v-
gl-
tooltip
:href=
"webIdePath"
:href=
"webIdePath"
:title=
"ideButtonTitle"
:title=
"ideButtonTitle"
:class=
"
{ disabled: !mr.canPushToSourceBranch }"
:disabled=
"!mr.canPushToSourceBranch"
class="btn btn-default js-web-ide d-none d-md-inline-block gl-mr-3"
class=
"js-web-ide d-none d-md-inline-block gl-mr-3"
data-placement="bottom"
tabindex=
"0"
tabindex=
"0"
role=
"button"
role=
"button"
data-qa-selector=
"open_in_web_ide_button"
data-qa-selector=
"open_in_web_ide_button"
>
>
{{
s__
(
'
mrWidget|Open in Web IDE
'
)
}}
{{
s__
(
'
mrWidget|Open in Web IDE
'
)
}}
</
a
>
</
gl-button
>
<button
<
gl-
button
:disabled=
"mr.sourceBranchRemoved"
:disabled=
"mr.sourceBranchRemoved"
data-target=
"#modal_merge_info"
data-target=
"#modal_merge_info"
data-toggle=
"modal"
data-toggle=
"modal"
class=
"btn btn-default js-check-out-branch gl-mr-3"
class=
"js-check-out-branch gl-mr-3"
type=
"button"
>
>
{{
s__
(
'
mrWidget|Check out branch
'
)
}}
{{
s__
(
'
mrWidget|Check out branch
'
)
}}
</button>
</
gl-
button>
</
template
>
</
template
>
<span
class=
"dropdown"
>
<gl-dropdown
<button
v-gl-tooltip
type=
"button"
:title=
"__('Download as')"
class=
"btn dropdown-toggle qa-dropdown-toggle"
:aria-label=
"__('Download as')"
data-toggle=
"dropdown"
icon=
"download"
:aria-label=
"__('Download as')"
right
aria-haspopup=
"true"
>
aria-expanded=
"false"
<gl-dropdown-header>
{{ s__('Download as') }}
</gl-dropdown-header>
<gl-dropdown-item
:href=
"mr.emailPatchesPath"
class=
"js-download-email-patches qa-download-email-patches"
download
>
>
<gl-icon
name=
"download"
/>
{{ s__('mrWidget|Email patches') }}
<gl-icon
name=
"chevron-down"
aria-hidden=
"true"
/>
</gl-dropdown-item>
</button>
<gl-dropdown-item
<ul
class=
"dropdown-menu dropdown-menu-right"
>
:href=
"mr.plainDiffPath"
<li>
class=
"js-download-plain-diff qa-download-plain-diff"
<a
download
:href=
"mr.emailPatchesPath"
>
class=
"js-download-email-patches qa-download-email-patches"
{{ s__('mrWidget|Plain diff') }}
download
</gl-dropdown-item>
>
</gl-dropdown>
{{ s__('mrWidget|Email patches') }}
</a>
</li>
<li>
<a
:href=
"mr.plainDiffPath"
class=
"js-download-plain-diff qa-download-plain-diff"
download
>
{{ s__('mrWidget|Plain diff') }}
</a>
</li>
</ul>
</span>
</div>
</div>
</div>
</div>
</div>
</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