Commit e4dcc134 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/452-dev-teams-security' into dev-merge

parents e0420b68 94387db7
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
"clean": "rm -Rf output node_modules", "clean": "rm -Rf output node_modules",
"clean-js": "rm -Rf node_modules", "clean-js": "rm -Rf node_modules",
"clean-ps": "rm -Rf output", "clean-ps": "rm -Rf output",
"server": "serve dist", "server": "serve -l 8000 dist",
"server-ssl": "ssl-serve --ssl dist", "server-ssl": "ssl-serve --ssl dist",
"build": "spago build && pulp browserify --skip-compile -t dist/bundle.js --src-path output", "build": "spago bundle-app --main Main --to dist/bundle.js",
"prod": "yarn prod:compile && yarn prod:dce && yarn prod:bundle && yarn prod:pack", "prod": "yarn prod:compile && yarn prod:dce && yarn prod:bundle && yarn prod:pack",
"prod:compile": "pulp build -- -g corefn", "prod:compile": "pulp build -- -g corefn",
"prod:dce": "zephyr -f Main.main", "prod:dce": "zephyr -f Main.main",
......
...@@ -105,6 +105,7 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where ...@@ -105,6 +105,7 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where
, session: props.session , session: props.session
, style: FolderChild , style: FolderChild
, text: node.name , text: node.name
, disabled: false
} }
makeParentFolder :: TreeNode -> Maybe TreeNode -> Record FolderViewProps -> Array R.Element makeParentFolder :: TreeNode -> Maybe TreeNode -> Record FolderViewProps -> Array R.Element
...@@ -120,9 +121,12 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where ...@@ -120,9 +121,12 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where
, reload: props.reload , reload: props.reload
, session: props.session , session: props.session
, style: FolderUp , style: FolderUp
, text: root.name , text: "..."
, disabled: disabled parent
} }
] ]
where
disabled { node_type } = if node_type == GT.FolderShared then true else false
makeParentFolder _ Nothing _ = [] makeParentFolder _ Nothing _ = []
sortFolders :: TreeNode-> TreeNode -> Ordering sortFolders :: TreeNode-> TreeNode -> Ordering
...@@ -139,6 +143,7 @@ type FolderProps = ...@@ -139,6 +143,7 @@ type FolderProps =
, boxes :: Boxes , boxes :: Boxes
, parentId :: Int , parentId :: Int
, reload :: T.Box T2.Reload , reload :: T.Box T2.Reload
, disabled :: Boolean
) )
folder :: R2.Leaf FolderProps folder :: R2.Leaf FolderProps
...@@ -155,6 +160,7 @@ folderCpt = here.component "folderCpt" cpt where ...@@ -155,6 +160,7 @@ folderCpt = here.component "folderCpt" cpt where
, session , session
, style , style
, text , text
, disabled
} _ = do } _ = do
-- States -- States
isBoxVisible <- T.useBox false isBoxVisible <- T.useBox false
...@@ -197,6 +203,7 @@ folderCpt = here.component "folderCpt" cpt where ...@@ -197,6 +203,7 @@ folderCpt = here.component "folderCpt" cpt where
H.button H.button
{ className: "btn btn-primary fv btn" { className: "btn btn-primary fv btn"
, on: { click: \_ -> goToRoute $ route linkId rootId linkNodeType sid } , on: { click: \_ -> goToRoute $ route linkId rootId linkNodeType sid }
, disabled: disabled
} }
[ [
H.i H.i
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment