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
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
Grégoire Locqueville
purescript-gargantext
Commits
a9618110
Commit
a9618110
authored
Mar 02, 2020
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tree] add dashboard view for Folder, Private, Shared, Public
parent
3b8f6267
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
App.purs
src/Gargantext/Components/App.purs
+5
-1
Router.purs
src/Gargantext/Router.purs
+3
-0
Routes.purs
src/Gargantext/Routes.purs
+9
-0
No files found.
src/Gargantext/Components/App.purs
View file @
a9618110
...
@@ -57,7 +57,11 @@ appCpt = R.hooksComponent "G.C.App.app" cpt where
...
@@ -57,7 +57,11 @@ appCpt = R.hooksComponent "G.C.App.app" cpt where
case fst route of
case fst route of
Home -> forested $ homeLayout LL_EN
Home -> forested $ homeLayout LL_EN
Login -> login { sessions, backends, visible: showLogin }
Login -> login { sessions, backends, visible: showLogin }
Folder sid _ -> withSession sid $ \_ -> forested (folder {})
--Folder sid _ -> withSession sid $ \_ -> forested (folder {})
Folder sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
FolderPrivate sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
FolderPublic sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
FolderShared sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
Corpus sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
Corpus sid nodeId -> withSession sid $ \session -> forested $ corpusLayout { nodeId, session }
Texts sid nodeId -> withSession sid $ \session -> forested $ textsLayout { nodeId, session, frontends }
Texts sid nodeId -> withSession sid $ \session -> forested $ textsLayout { nodeId, session, frontends }
Lists sid nodeId -> withSession sid $ \session -> forested $ listsLayout { nodeId, session }
Lists sid nodeId -> withSession sid $ \session -> forested $ listsLayout { nodeId, session }
...
...
src/Gargantext/Router.purs
View file @
a9618110
...
@@ -11,6 +11,9 @@ router :: Match AppRoute
...
@@ -11,6 +11,9 @@ router :: Match AppRoute
router = oneOf
router = oneOf
[ Login <$ route "login"
[ Login <$ route "login"
, Folder <$> (route "folder" *> sid) <*> int
, Folder <$> (route "folder" *> sid) <*> int
, FolderPrivate <$> (route "folderPrivate" *> sid) <*> int
, FolderPublic <$> (route "folderPublic" *> sid) <*> int
, FolderShared <$> (route "folderShared" *> sid) <*> int
, CorpusDocument <$> (route "corpus" *> sid) <*> int
, CorpusDocument <$> (route "corpus" *> sid) <*> int
<*> (lit "list" *> int)
<*> (lit "list" *> int)
<*> (lit "document" *> int)
<*> (lit "document" *> int)
...
...
src/Gargantext/Routes.purs
View file @
a9618110
...
@@ -8,6 +8,9 @@ data AppRoute
...
@@ -8,6 +8,9 @@ data AppRoute
= Home
= Home
| Login
| Login
| Folder SessionId Int
| Folder SessionId Int
| FolderPrivate SessionId Int
| FolderPublic SessionId Int
| FolderShared SessionId Int
| Corpus SessionId Int
| Corpus SessionId Int
| Document SessionId Int Int
| Document SessionId Int Int
| CorpusDocument SessionId Int Int Int
| CorpusDocument SessionId Int Int Int
...
@@ -40,6 +43,9 @@ instance showAppRoute :: Show AppRoute where
...
@@ -40,6 +43,9 @@ instance showAppRoute :: Show AppRoute where
show Home = "Home"
show Home = "Home"
show Login = "Login"
show Login = "Login"
show (Folder s i) = "Folder" <> show i <> " (" <> show s <> ")"
show (Folder s i) = "Folder" <> show i <> " (" <> show s <> ")"
show (FolderPrivate s i) = "FolderPrivate" <> show i <> " (" <> show s <> ")"
show (FolderPublic s i) = "FolderPublic" <> show i <> " (" <> show s <> ")"
show (FolderShared s i) = "FolderShared" <> show i <> " (" <> show s <> ")"
show (Corpus s i) = "Corpus" <> show i <> " (" <> show s <> ")"
show (Corpus s i) = "Corpus" <> show i <> " (" <> show s <> ")"
show (Document _ s i) = "Document" <> show i <> " (" <> show s <> ")"
show (Document _ s i) = "Document" <> show i <> " (" <> show s <> ")"
show (CorpusDocument s _ _ i) = "CorpusDocument" <> show i <> " (" <> show s <> ")"
show (CorpusDocument s _ _ i) = "CorpusDocument" <> show i <> " (" <> show s <> ")"
...
@@ -55,6 +61,9 @@ appPath :: AppRoute -> String
...
@@ -55,6 +61,9 @@ appPath :: AppRoute -> String
appPath Home = ""
appPath Home = ""
appPath Login = "login"
appPath Login = "login"
appPath (Folder s i) = "folder/" <> show s <> "/" <> show i
appPath (Folder s i) = "folder/" <> show s <> "/" <> show i
appPath (FolderPrivate s i) = "folderPrivate/" <> show s <> "/" <> show i
appPath (FolderPublic s i) = "folderPublic/" <> show s <> "/" <> show i
appPath (FolderShared s i) = "folderShared/" <> show s <> "/" <> show i
appPath (CorpusDocument s c l i) = "corpus/" <> show s <> "/" <> show c <> "/list/" <> show l <> "/document/" <> show i
appPath (CorpusDocument s c l i) = "corpus/" <> show s <> "/" <> show c <> "/list/" <> show l <> "/document/" <> show i
appPath (Corpus s i) = "corpus/" <> show s <> "/" <> show i
appPath (Corpus s i) = "corpus/" <> show s <> "/" <> show i
appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> "/document/" <> show i
appPath (Document s l i) = "list/" <> show s <> "/" <> show l <> "/document/" <> show i
...
...
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