Commit 94387db7 authored by Karen Konou's avatar Karen Konou

[Folder view] Disable up folder when returning to shared

parent 2a8cc139
......@@ -105,6 +105,7 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where
, session: props.session
, style: FolderChild
, text: node.name
, disabled: false
}
makeParentFolder :: TreeNode -> Maybe TreeNode -> Record FolderViewProps -> Array R.Element
......@@ -120,9 +121,12 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where
, reload: props.reload
, session: props.session
, style: FolderUp
, text: root.name
, text: "..."
, disabled: disabled parent
}
]
where
disabled { node_type } = if node_type == GT.FolderShared then true else false
makeParentFolder _ Nothing _ = []
sortFolders :: TreeNode-> TreeNode -> Ordering
......@@ -139,6 +143,7 @@ type FolderProps =
, boxes :: Boxes
, parentId :: Int
, reload :: T.Box T2.Reload
, disabled :: Boolean
)
folder :: R2.Leaf FolderProps
......@@ -155,6 +160,7 @@ folderCpt = here.component "folderCpt" cpt where
, session
, style
, text
, disabled
} _ = do
-- States
isBoxVisible <- T.useBox false
......@@ -197,6 +203,7 @@ folderCpt = here.component "folderCpt" cpt where
H.button
{ className: "btn btn-primary fv btn"
, on: { click: \_ -> goToRoute $ route linkId rootId linkNodeType sid }
, disabled: disabled
}
[
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