Commit aefaa024 authored by Karen Konou's avatar Karen Konou

[Teams folders] Deactivate up button to shared or teams

parent 29314b69
Pipeline #3370 failed with stage
in 0 seconds
......@@ -126,7 +126,7 @@ folderViewMainCpt = here.component "folderViewMainCpt" cpt where
}
]
where
disabled { node_type } = if node_type == GT.FolderShared then true else false
disabled { node_type } = node_type == GT.FolderShared || node_type == GT.Team
makeParentFolder _ Nothing _ = []
sortFolders :: TreeNode-> TreeNode -> Ordering
......@@ -166,6 +166,11 @@ folderCpt = here.component "folderCpt" cpt where
boxes <- AppStore.use
isBoxVisible <- T.useBox false
-- | Hooks
-- |
{ goToRoute } <- useLinkHandler
-- | Computed
-- |
......@@ -180,9 +185,10 @@ folderCpt = here.component "folderCpt" cpt where
H.div
{ className: "folder-view-item" }
[
H.a
H.button
{ className: "folder-view-item__body"
, href: "/#/" <> href linkId rootId linkNodeType sid
, disabled: disabled
, on: { click: goToRoute $ href linkId rootId linkNodeType sid }
}
[
B.ripple
......@@ -235,10 +241,10 @@ folderCpt = here.component "folderCpt" cpt where
]
]
href :: Int -> Int -> NodeType -> SessionId -> String
href :: Int -> Int -> NodeType -> SessionId -> AppRoute
href lId rootId nType sId
| rootId == lId = appPath Home
| otherwise = appPath $ getFolderPath nType sId lId
| rootId == lId = Home
| otherwise = getFolderPath nType sId lId
icon :: FolderStyle -> GT.NodeType -> String
icon FolderUp _ = "folder-open"
......
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