git.iko.soy/typeable/octopod
on master help sign in
Moved the disabled state inside the three dots menu (#30)
commit876d9c13927bc1954c8a855bb077b1536c5de544 authoriko <ilyakooo0@gmail.com> dateFri 5 Feb 2021, 13:10 (6 years ago) parent6c6a4dc
1 file changed+4−7
octopod-frontend/src/Page/Deployments.hs+4−7
octopod-frontend/src/Page/Deployments.hs+4−7
@@ -295,18 +295,15 @@ activeDeploymentWidget clickedEv dDyn' = do
295295 text $ formatPosixToDate updatedAt
296296 el "td" $ do
297297 let
298− disabledAttr = if isPending status
299− then "disabled" =: ""
300− else mempty
298+ enabled = not $ isPending status
301299 elId = "deployment_row_" <> unDeploymentName dName
302300 btn = elAttr "button"
303301 ( "class" =: "drop__handler"
304302 <> "type" =: "button"
305− <> "id" =: elId
306− <> disabledAttr) $ text "Actions"
303+ <> "id" =: elId ) $ text "Actions"
307304 body = do
308− btnEditEv <- buttonClass "action action--edit" "Edit"
309− btnArcEv <- buttonClass "action action--archive" "Move to archive"
305+ btnEditEv <- buttonClassEnabled' "action action--edit" "Edit" (pure enabled) "action--disabled"
306+ btnArcEv <- buttonClassEnabled' "action action--archive" "Move to archive" (pure enabled) "action--disabled"
310307 url' <- kubeDashboardUrl (view #deployment <$> dDyn)
311308 void . dyn $ url' <&> maybe blank (\url ->
312309 void $ aButtonClass' "action action--logs" "Details"