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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
c5017917
Commit
c5017917
authored
Jul 16, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
merge, tested: ok
parents
4d011052
b689fd11
Pipeline
#1616
failed with stage
Changes
9
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
160 additions
and
16 deletions
+160
-16
default.nix
default.nix
+22
-0
index.html
dist/index.html
+0
-1
packages.dhall
packages.dhall
+5
-0
spago.dhall
spago.dhall
+1
-0
Frame.purs
src/Gargantext/Components/Nodes/Frame.purs
+51
-15
JitsiMeet.js
src/Gargantext/Utils/JitsiMeet.js
+10
-0
JitsiMeet.purs
src/Gargantext/Utils/JitsiMeet.purs
+21
-0
JitsiMeetAPI.js
src/external-deps/JitsiMeetAPI.js
+4
-0
yarn.lock
yarn.lock
+46
-0
No files found.
default.nix
0 → 100644
View file @
c5017917
with
(
import
<
nixpkgs
>
{});
let
nodejs-with-packages
=
with
nodePackages
;
[
bower
yarn
];
in
stdenv
.
mkDerivation
rec
{
name
=
"env"
;
env
=
buildEnv
{
name
=
name
;
paths
=
buildInputs
;
};
buildInputs
=
[
nodejs-with-packages
yarn
yarn2nix
];
builder
=
builtins
.
toFile
"builder.sh"
''
source $stdenv/setup
touch $out
''
;
}
dist/index.html
View file @
c5017917
...
...
@@ -14,6 +14,5 @@
<div
id=
"app"
class =
"container-fluid"
></div>
<div
id=
"portal"
></div>
<script
src=
"bundle.js"
></script>
<script
src=
'https://visio.gargantext.org/external_api.js'
></script>
<!-- FIXME to be removed -->
</body>
</html>
packages.dhall
View file @
c5017917
...
...
@@ -180,6 +180,11 @@ let additions =
, repo = "https://github.com/alpacaaa/purescript-simplecrypto"
, version = "v1.0.1"
}
, web-url =
{ dependencies = [ "prelude" ]
, repo = "https://github.com/mjepronk/purescript-web-url"
, version = "v1.0.2"
}
}
--let localPackages = {
...
...
spago.dhall
View file @
c5017917
...
...
@@ -91,6 +91,7 @@ to generate this file without the comments in this block.
, "web-file"
, "web-html"
, "web-storage"
, "web-url"
, "web-xhr"
]
, packages = ./packages.dhall
...
...
src/Gargantext/Components/Nodes/Frame.purs
View file @
c5017917
...
...
@@ -8,12 +8,15 @@ import Data.Eq.Generic (genericEq)
import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..))
import Data.Newtype (class Newtype)
import Data.Nullable (Nullable, null, toMaybe)
import Data.Show.Generic (genericShow)
import DOM.Simple as DOM
import Effect.Aff (Aff)
import Reactix as R
import Reactix.DOM.HTML as H
import Simple.JSON as JSON
import Toestand as T
import Web.URL as WURL
import Gargantext.Components.FolderView as FV
import Gargantext.Components.Node (NodePoly(..))
...
...
@@ -21,6 +24,7 @@ import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Sessions (Session, get, sessionId)
import Gargantext.Types (NodeType(..))
import Gargantext.Utils.JitsiMeet as JM
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
...
...
@@ -48,7 +52,6 @@ type KeyProps =
frameLayout :: R2.Leaf Props
frameLayout props = R.createElement frameLayoutCpt props []
frameLayoutCpt :: R.Component Props
frameLayoutCpt = here.component "frameLayout" cpt where
cpt { nodeId, nodeType, session } _ = do
...
...
@@ -58,7 +61,6 @@ frameLayoutCpt = here.component "frameLayout" cpt where
frameLayoutWithKey :: R2.Leaf KeyProps
frameLayoutWithKey props = R.createElement frameLayoutWithKeyCpt props []
frameLayoutWithKeyCpt :: R.Component KeyProps
frameLayoutWithKeyCpt = here.component "frameLayoutWithKey" cpt where
cpt { nodeId, session, nodeType} _ = do
...
...
@@ -85,29 +87,63 @@ hframeUrl NodeFrameCalc base frame_id = base <> "/" <> frame_id
hframeUrl NodeFrameVisio base frame_id = base <> "/" <> frame_id
hframeUrl _ base frame_id = base <> "/" <> frame_id <> "?view" -- "?both"
frameLayoutView :: Record ViewProps -> R.Element
frameLayoutView props = R.createElement frameLayoutViewCpt props []
frameLayoutView :: R2.Leaf ViewProps
frameLayoutView props = R.createElement frameLayoutViewCpt props []
frameLayoutViewCpt :: R.Component ViewProps
frameLayoutViewCpt = here.component "frameLayoutView" cpt
where
cpt { frame:
(NodePoly { hyperdata: Hyperdata { base, frame_id }})
cpt { frame:
NodePoly { hyperdata: Hyperdata { base, frame_id }}
, nodeId
, nodeType
, reload
, session } _ =
pure $ H.div{} [
FV.backButton
, FV.homeButton
, H.div { className : "frame"
, rows: "100%,*" }
, session } _ = do
case nodeType of
NodeFrameVisio ->
case WURL.fromAbsolute base of
Nothing -> pure $ H.div {} [ H.text $ "Wrong base url: " <> base ]
Just url -> pure $ nodeFrameVisio { frame_id, reload, url }
_ ->
pure $ H.div{} [
FV.backButton
, FV.homeButton
, H.div { className : "frame"
, rows: "100%,*" }
[ -- H.script { src: "https://visio.gargantext.org/external_api.js"} [],
H.iframe { src: hframeUrl nodeType base frame_id
H.iframe { src: hframeUrl nodeType base frame_id
, width: "100%"
, height: "100%"
} []
]
]
]
]
type NodeFrameVisioProps =
( frame_id :: String
, reload :: T2.ReloadS
, url :: WURL.URL
)
nodeFrameVisio :: R2.Leaf NodeFrameVisioProps
nodeFrameVisio props = R.createElement nodeFrameVisioCpt props []
nodeFrameVisioCpt :: R.Component NodeFrameVisioProps
nodeFrameVisioCpt = here.component "nodeFrameVisio" cpt
where
cpt { frame_id
, reload
, url } _ = do
-- api = new JitsiMeetExternalAPI("visio.gargantext.org", {roomName: frame_id})
api <- T.useBox (Nothing :: Maybe JM.JitsiMeet)
ref <- R.useRef (null :: Nullable DOM.Element)
R.useEffect' $ do
here.log2 "[nodeFrameVisio] ref" $ R.readRef ref
here.log2 "[nodeFrameVisio] JM.api" JM._api
case toMaybe (R.readRef ref) of
Nothing -> pure unit
Just r -> do
api <- JM.jitsiMeetAPI (WURL.host url) { parentNode: r, roomName: frame_id }
here.log2 "[nodeFrameVisio] api" api
pure $ H.div { ref } [ H.text $ WURL.host url ]
type LoadProps = ( nodeId :: Int
, session :: Session )
...
...
src/Gargantext/Utils/JitsiMeet.js
0 → 100644
View file @
c5017917
'use strict'
;
var
API
=
require
(
'../../src/external-deps/JitsiMeetAPI.js'
);
console
.
log
(
'API'
,
API
);
exports
.
_api
=
API
;
exports
.
_jitsiMeetAPI
=
function
(
host
,
options
)
{
return
new
API
(
host
,
options
);
};
src/Gargantext/Utils/JitsiMeet.purs
0 → 100644
View file @
c5017917
module Gargantext.Utils.JitsiMeet where
import Data.Function.Uncurried (Fn2, runFn2)
import DOM.Simple as DOM
import Effect (Effect)
import Effect.Uncurried (EffectFn2, runEffectFn2)
foreign import data JitsiMeet :: Type
type Jitsi =
{ parentNode :: DOM.Element
, roomName :: String }
foreign import _api :: JitsiMeet
foreign import _jitsiMeetAPI :: EffectFn2 String Jitsi JitsiMeet
jitsiMeetAPI :: String -> Jitsi -> Effect JitsiMeet
jitsiMeetAPI = runEffectFn2 _jitsiMeetAPI
--jitsiMeetAPIFn :: String -> Jitsi -> JitsiMeet
--jitsiMeetAPIFn = runFn2 _jitsiMeetAPI
src/external-deps/JitsiMeetAPI.js
0 → 100644
View file @
c5017917
This diff is collapsed.
Click to expand it.
yarn.lock
View file @
c5017917
...
...
@@ -1975,7 +1975,11 @@ bootstrap-dark@^1.0.3:
dependencies:
bootstrap ">=4.3"
<<<<<<< HEAD
bootstrap@>=4.3, bootstrap@^5.0.2:
=======
bootstrap@>=4.3, bootstrap@^5.0.1:
>>>>>>> b689fd11ba983d8a687df733a5dde6e37e42fa93
version "5.0.2"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.0.2.tgz#aff23d5e0e03c31255ad437530ee6556e78e728e"
integrity sha512-1Ge963tyEQWJJ+8qtXFU6wgmAVj9gweEjibUdbmcCEYsn38tVwRk8107rk2vzt6cfQcRr3SlZ8aQBqaD8aqf+Q==
...
...
@@ -2986,9 +2990,15 @@ ejs@^2.6.1:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
electron-to-chromium@^1.3.723:
<<<<<<< HEAD
version "1.3.778"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.778.tgz#bf01048736c95b78f2988e88005e0ebb385942a4"
integrity sha512-Lw04qJaPtWdq0d7qKHJTgkam+FhFi3hm/scf1EyqJWdjO3ZIGUJhNmZJRXWb7yb/bRYXQyVGSpa9RqVpjjWMQw==
=======
version "1.3.775"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.775.tgz#046517d1f2cea753e06fff549995b9dc45e20082"
integrity sha512-EGuiJW4yBPOTj2NtWGZcX93ZE8IGj33HJAx4d3ouE2zOfW2trbWU+t1e0yzLr1qQIw81++txbM3BH52QwSRE6Q==
>>>>>>> b689fd11ba983d8a687df733a5dde6e37e42fa93
elliptic@^6.5.2, elliptic@^6.5.3:
version "6.5.4"
...
...
@@ -3251,6 +3261,14 @@ fast-levenshtein@~2.0.6:
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
<<<<<<< HEAD
=======
fast-safe-stringify@^2.0.7:
version "2.0.8"
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz#dc2af48c46cf712b683e849b2bbd446b32de936f"
integrity sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag==
>>>>>>> b689fd11ba983d8a687df733a5dde6e37e42fa93
fast-url-parser@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d"
...
...
@@ -3708,7 +3726,11 @@ immer@^8.0.1:
resolved "https://registry.yarnpkg.com/immer/-/immer-8.0.4.tgz#3a21605a4e2dded852fb2afd208ad50969737b7a"
integrity sha512-jMfL18P+/6P6epANRvRk6q8t+3gGhqsJ9EuJ25AXE+9bNTYtssvzeYbEd0mXRYWCmmXSIbnlpz6vd6iJlmGGGQ==
<<<<<<< HEAD
immer@^9.0.5:
=======
immer@^9.0.3:
>>>>>>> b689fd11ba983d8a687df733a5dde6e37e42fa93
version "9.0.5"
resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.5.tgz#a7154f34fe7064f15f00554cc94c66cc0bf453ec"
integrity sha512-2WuIehr2y4lmYz9gaQzetPR2ECniCifk4ORaQbU3g5EalLt+0IVTosEPJ5BoYl/75ky2mivzdRzV8wWgQGOSYQ==
...
...
@@ -5351,6 +5373,16 @@ purescript-language-server@^0.15.2:
vscode-uri "^2.1.1"
which "^2.0.2"
<<<<<<< HEAD
=======
purescript@^0.14.2:
version "0.14.3"
resolved "https://registry.yarnpkg.com/purescript/-/purescript-0.14.3.tgz#8a725c5dc640afeebb1fe9e2512477827ca05ee8"
integrity sha512-lAzHU/tcmxF4n3YUwUTwG/sIwHzjUq1zsIOBNmaVpbm7hxM+RhOTKMJdwdbTeCjxlilyVPWOLUQ6Exll4DYuMA==
dependencies:
purescript-installer "^0.2.0"
>>>>>>> b689fd11ba983d8a687df733a5dde6e37e42fa93
purgecss@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/purgecss/-/purgecss-2.3.0.tgz#5327587abf5795e6541517af8b190a6fb5488bb3"
...
...
@@ -5781,7 +5813,21 @@ safe-regex@^1.1.0:
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
<<<<<<< HEAD
sass@^1.35.2:
=======
sander@^0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/sander/-/sander-0.5.1.tgz#741e245e231f07cafb6fdf0f133adfa216a502ad"
integrity sha1-dB4kXiMfB8r7b98PEzrfohalAq0=
dependencies:
es6-promise "^3.1.2"
graceful-fs "^4.1.3"
mkdirp "^0.5.1"
rimraf "^2.5.2"
sass@^1.23.7:
>>>>>>> b689fd11ba983d8a687df733a5dde6e37e42fa93
version "1.35.2"
resolved "https://registry.yarnpkg.com/sass/-/sass-1.35.2.tgz#b732314fcdaf7ef8d0f1698698adc378043cb821"
integrity sha512-jhO5KAR+AMxCEwIH3v+4zbB2WB0z67V1X0jbapfVwQQdjHZUGUyukpnoM6+iCMfsIUC016w9OPKQ5jrNOS9uXw==
...
...
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