Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
purescript-gargantext
Commits
1617d817
Commit
1617d817
authored
Jun 18, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '719-dev-clipboard-copy-improvements' into 'dev'
Resolve "Share link copy to clipboard" See merge request
!512
parents
5491ae2b
6fc48dda
Pipeline
#7689
passed with stages
in 30 minutes and 30 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
11 deletions
+48
-11
bootstrap-darkster.css
dist/styles/bootstrap-darkster.css
+4
-0
bootstrap-default.css
dist/styles/bootstrap-default.css
+4
-0
bootstrap-greyson.css
dist/styles/bootstrap-greyson.css
+4
-0
bootstrap-herbie.css
dist/styles/bootstrap-herbie.css
+4
-0
bootstrap-monotony.css
dist/styles/bootstrap-monotony.css
+4
-0
Share.purs
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
+24
-11
_styles.scss
src/sass/_legacy/_styles.scss
+4
-0
No files found.
dist/styles/bootstrap-darkster.css
View file @
1617d817
...
@@ -11126,6 +11126,10 @@ select.form-control {
...
@@ -11126,6 +11126,10 @@ select.form-control {
margin
:
0.33em
;
margin
:
0.33em
;
}
}
.copy-btn
{
margin-left
:
0.5em
;
}
.table
tr
td
{
.table
tr
td
{
height
:
48px
;
height
:
48px
;
}
}
...
...
dist/styles/bootstrap-default.css
View file @
1617d817
...
@@ -10932,6 +10932,10 @@ select.form-control {
...
@@ -10932,6 +10932,10 @@ select.form-control {
margin
:
0.33em
;
margin
:
0.33em
;
}
}
.copy-btn
{
margin-left
:
0.5em
;
}
.table
tr
td
{
.table
tr
td
{
height
:
48px
;
height
:
48px
;
}
}
...
...
dist/styles/bootstrap-greyson.css
View file @
1617d817
...
@@ -10777,6 +10777,10 @@ select.form-control {
...
@@ -10777,6 +10777,10 @@ select.form-control {
margin
:
0.33em
;
margin
:
0.33em
;
}
}
.copy-btn
{
margin-left
:
0.5em
;
}
.table
tr
td
{
.table
tr
td
{
height
:
48px
;
height
:
48px
;
}
}
...
...
dist/styles/bootstrap-herbie.css
View file @
1617d817
...
@@ -11002,6 +11002,10 @@ select.form-control {
...
@@ -11002,6 +11002,10 @@ select.form-control {
margin
:
0.33em
;
margin
:
0.33em
;
}
}
.copy-btn
{
margin-left
:
0.5em
;
}
.table
tr
td
{
.table
tr
td
{
height
:
48px
;
height
:
48px
;
}
}
...
...
dist/styles/bootstrap-monotony.css
View file @
1617d817
...
@@ -11075,6 +11075,10 @@ select.form-control {
...
@@ -11075,6 +11075,10 @@ select.form-control {
margin
:
0.33em
;
margin
:
0.33em
;
}
}
.copy-btn
{
margin-left
:
0.5em
;
}
.table
tr
td
{
.table
tr
td
{
height
:
48px
;
height
:
48px
;
}
}
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Share.purs
View file @
1617d817
module Gargantext.Components.Forest.Tree.Node.Action.Share where
module Gargantext.Components.Forest.Tree.Node.Action.Share where
import Gargantext.Prelude
import Data.Array (filter, nub)
import Data.Array (filter, nub)
import Data.Either (Either(..))
import Data.Either (Either(..))
import Data.Generic.Rep (class Generic)
import Data.Generic.Rep (class Generic)
...
@@ -9,6 +11,7 @@ import Data.String (Pattern(..), contains)
...
@@ -9,6 +11,7 @@ import Data.String (Pattern(..), contains)
import Data.Tuple.Nested ((/\))
import Data.Tuple.Nested ((/\))
import Effect.Aff (launchAff_)
import Effect.Aff (launchAff_)
import Effect.Class (liftEffect)
import Effect.Class (liftEffect)
import Effect.Timer (setTimeout)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (Elevation(Level1))
import Gargantext.Components.Bootstrap.Types (Elevation(Level1))
import Gargantext.Components.Forest.Tree.Node.Action.Types as Action
import Gargantext.Components.Forest.Tree.Node.Action.Types as Action
...
@@ -17,14 +20,13 @@ import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (subTreeView, SubTre
...
@@ -17,14 +20,13 @@ import Gargantext.Components.Forest.Tree.Node.Tools.SubTree (subTreeView, SubTre
import Gargantext.Components.InputWithAutocomplete (inputWithAutocomplete)
import Gargantext.Components.InputWithAutocomplete (inputWithAutocomplete)
import Gargantext.Config.REST (AffRESTError)
import Gargantext.Config.REST (AffRESTError)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Prelude
import Gargantext.Routes as GR
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, get, post)
import Gargantext.Sessions (Session, get, post)
import Gargantext.Types (ID, NodeID, NodeType)
import Gargantext.Types (ID, NodeID, NodeType)
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Utils.Clipboard (modalClipboard)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.SimpleJSON as GUSJ
import Gargantext.Utils.SimpleJSON as GUSJ
import Gargantext.Utils.Clipboard (modalClipboard)
import Reactix as R
import Reactix as R
import Reactix.DOM.HTML as H
import Reactix.DOM.HTML as H
import Simple.JSON as JSON
import Simple.JSON as JSON
...
@@ -197,23 +199,31 @@ shareURLcpt :: R.Component ShareURL
...
@@ -197,23 +199,31 @@ shareURLcpt :: R.Component ShareURL
shareURLcpt = R2.hereComponent here "shareURL" hCpt
shareURLcpt = R2.hereComponent here "shareURL" hCpt
where
where
hCpt hp { nodeType, id, session } _ = do
hCpt hp { nodeType, id, session } _ = do
copied <- T.useBox false
useLoader
useLoader
{ errorHandler: Just errorHandler
{ errorHandler: Just errorHandler
, herePrefix: hp
, herePrefix: hp
, loader: loadUrl
, loader: loadUrl
, path: { nodeType, id, session }
, path: { nodeType, id, session }
, render: \url -> shareURLInner { url } []
, render: \url -> shareURLInner { url
, copied
} []
}
}
errorHandler err = here.warn2 "[ShareURL] RESTError" err
errorHandler err = here.warn2 "[ShareURL] RESTError" err
shareURLInner :: R2.Component (url :: String)
type ShareURLInnerProps =
( url :: String
, copied :: T.Box Boolean
)
shareURLInner :: R2.Component ShareURLInnerProps
shareURLInner = R.createElement shareURLInnercpt
shareURLInner = R.createElement shareURLInnercpt
shareURLInnercpt :: R.Component
(url :: String)
shareURLInnercpt :: R.Component
ShareURLInnerProps
shareURLInnercpt = here.component "shareURLInner" cpt
shareURLInnercpt = here.component "shareURLInner" cpt
where
where
cpt { url } _ = do
cpt { url
, copied
} _ = do
R.useEffect' $ modalClipboard ".copy" url
R.useEffect' $ modalClipboard ".copy" url
copied' <- T.useLive T.unequal copied
pure $ Tools.panelNoFooter
pure $ Tools.panelNoFooter
{ mError: Nothing
{ mError: Nothing
...
@@ -221,12 +231,15 @@ shareURLInnercpt = here.component "shareURLInner" cpt
...
@@ -221,12 +231,15 @@ shareURLInnercpt = here.component "shareURLInner" cpt
, textTitle: "Share the node (URL)"
, textTitle: "Share the node (URL)"
}
}
[ H.div {}
[ H.div {}
[ H.
text url
[ H.
a { href: url } [ H.text url ]
, B.iconButton
, B.iconButton
{ name: "clone"
{ name: if copied' then "check" else "copy"
, title: "Copy to clipboard"
, title: if copied' then "Copied" else "Copy to clipboard"
, className: "copy"
, className: "copy copy-btn"
, callback: \_ -> pure unit
, callback: \_ -> do
T.write_ true copied
_ <- setTimeout 2000 (T.write_ false copied)
pure unit
}
}
]
]
]
]
...
...
src/sass/_legacy/_styles.scss
View file @
1617d817
...
@@ -503,3 +503,7 @@ select.form-control {
...
@@ -503,3 +503,7 @@ select.form-control {
margin
:
0
.33em
;
margin
:
0
.33em
;
}
}
}
}
.copy-btn
{
margin-left
:
0
.5em
;
}
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