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
d4cb2b77
Commit
d4cb2b77
authored
Sep 30, 2020
by
Marcia Ramos
Committed by
Nicolò Maria Mezzopera
Sep 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate button in modal_copy_button.vue
parent
b07ee32e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
16 deletions
+10
-16
app/assets/javascripts/vue_shared/components/modal_copy_button.vue
...s/javascripts/vue_shared/components/modal_copy_button.vue
+5
-16
changelogs/unreleased/okr-modal-copy-button.yml
changelogs/unreleased/okr-modal-copy-button.yml
+5
-0
No files found.
app/assets/javascripts/vue_shared/components/modal_copy_button.vue
View file @
d4cb2b77
<
script
>
import
$
from
'
jquery
'
;
import
{
Gl
DeprecatedButton
,
GlTooltipDirective
,
GlIcon
}
from
'
@gitlab/ui
'
;
import
{
Gl
Button
,
GlTooltipDirective
}
from
'
@gitlab/ui
'
;
import
Clipboard
from
'
clipboard
'
;
import
{
__
}
from
'
~/locale
'
;
export
default
{
components
:
{
GlDeprecatedButton
,
GlIcon
,
GlButton
,
},
directives
:
{
GlTooltip
:
GlTooltipDirective
,
},
props
:
{
text
:
{
type
:
String
,
...
...
@@ -55,15 +52,12 @@ export default {
default
:
null
,
},
},
copySuccessText
:
__
(
'
Copied
'
),
computed
:
{
modalDomId
()
{
return
this
.
modalId
?
`#
${
this
.
modalId
}
`
:
''
;
},
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
clipboard
=
new
Clipboard
(
this
.
$el
,
{
...
...
@@ -83,13 +77,11 @@ export default {
.
on
(
'
error
'
,
e
=>
this
.
$emit
(
'
error
'
,
e
));
});
},
destroyed
()
{
if
(
this
.
clipboard
)
{
this
.
clipboard
.
destroy
();
}
},
methods
:
{
updateTooltip
(
target
)
{
const
$target
=
$
(
target
);
...
...
@@ -112,15 +104,12 @@ export default {
};
</
script
>
<
template
>
<gl-
deprecated-
button
<gl-button
v-gl-tooltip=
"
{ placement: tooltipPlacement, container: tooltipContainer }"
:class="cssClasses"
:data-clipboard-target="target"
:data-clipboard-text="text"
:title="title"
>
<slot>
<gl-icon
name=
"copy-to-clipboard"
/>
</slot>
</gl-deprecated-button>
icon="copy-to-clipboard"
/>
</
template
>
changelogs/unreleased/okr-modal-copy-button.yml
0 → 100644
View file @
d4cb2b77
---
title
:
Update button in modal_copy_button.vue to use GlButton from GitLab UI
merge_request
:
43714
author
:
type
:
other
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