Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
form-creator-ui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simmctic
form-creator
form-creator-ui
Commits
e8d14df7
Commit
e8d14df7
authored
3 years ago
by
Richard Fernando Heise Ferreira
Browse files
Options
Downloads
Plain Diff
Merge branch 'issue/55' into 'development'
Issue
#55
: Add copy to clipboard feature on share. See merge request
!59
parents
30021ddb
a07b99ce
No related branches found
No related tags found
1 merge request
!59
Issue #55: Add copy to clipboard feature on share.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/fieldsListForms/ShareButton.jsx
+16
-1
16 additions, 1 deletion
src/components/fieldsListForms/ShareButton.jsx
with
16 additions
and
1 deletion
src/components/fieldsListForms/ShareButton.jsx
+
16
−
1
View file @
e8d14df7
import
React
from
"
react
"
;
import
Dialog
from
"
@material-ui/core/Dialog
"
;
import
ShareOutlinedIcon
from
"
@material-ui/icons/ShareOutlined
"
;
import
FileCopyIcon
from
"
@material-ui/icons/FileCopy
"
;
import
IconButton
from
"
@material-ui/core/IconButton
"
;
import
Button
from
"
@material-ui/core/Button
"
;
import
Tooltip
from
"
@material-ui/core/Tooltip
"
;
import
Grid
from
"
@material-ui/core/Grid
"
;
import
DialogContent
from
"
@material-ui/core/DialogContent
"
;
import
DialogContentText
from
"
@material-ui/core/DialogContentText
"
;
import
DialogTitle
from
"
@material-ui/core/DialogTitle
"
;
import
{
useTheme
}
from
"
@material-ui/core/styles
"
;
import
{
DialogActions
}
from
"
@material-ui/core
"
;
function
ShareButton
(
props
)
{
const
[
open
,
setOpen
]
=
React
.
useState
(
false
);
...
...
@@ -21,6 +24,8 @@ function ShareButton(props) {
setOpen
(
false
);
};
const
form_link
=
`https://genforms.c3sl.ufpr.br/#/answer/
${
props
.
id
}
`
;
return
(
<>
<
Tooltip
title
=
"Compartilhar"
arrow
>
...
...
@@ -40,8 +45,18 @@ function ShareButton(props) {
</
DialogTitle
>
<
DialogContent
>
<
DialogContentText
id
=
"alert-dialog-description"
>
https://genforms.c3sl.ufpr.br/#/answer/
{
props
.
id
}
{
form_link
}
</
DialogContentText
>
<
DialogActions
disableSpacing
>
<
Button
variant
=
"outlined"
onClick
=
{
()
=>
{
navigator
.
clipboard
.
writeText
(
form_link
);
}
}
>
<
FileCopyIcon
/>
</
Button
>
</
DialogActions
>
</
DialogContent
>
</
Dialog
>
</>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment