Improve main view in home page

This commit is contained in:
eikek 2021-08-16 17:00:57 +02:00
parent 7070371cf7
commit cf10f63af4
2 changed files with 29 additions and 27 deletions

View File

@ -51,11 +51,7 @@ viewContent texts flags settings model =
] ]
(searchStats texts flags settings model (searchStats texts flags settings model
++ itemsBar texts flags settings model ++ itemsBar texts flags settings model
++ [ div [ class "sm:relative" ] ++ mainView texts flags settings model
(itemMergeView texts settings model
++ itemCardList texts flags settings model
)
]
++ confirmModal texts model ++ confirmModal texts model
) )
@ -64,26 +60,37 @@ viewContent texts flags settings model =
--- Helpers --- Helpers
itemMergeView : Texts -> UiSettings -> Model -> List (Html Msg) mainView : Texts -> Flags -> UiSettings -> Model -> List (Html Msg)
itemMergeView texts settings model = mainView texts flags settings model =
case model.viewMode of let
SelectView svm -> mergeView =
case svm.action of case model.viewMode of
MergeSelected -> SelectView svm ->
[ div case svm.action of
[ class S.dimmerMerge MergeSelected ->
, class "mt-10 sm:mt-0" Just svm
]
[ Html.map MergeItemsMsg _ ->
(Comp.ItemMerge.view texts.itemMerge settings svm.mergeModel) Nothing
]
]
_ -> _ ->
[] Nothing
in
case mergeView of
Just svm ->
[ div [ class "sm:relative mb-2" ]
(itemMergeView texts settings svm)
]
_ -> Nothing ->
[] itemCardList texts flags settings model
itemMergeView : Texts -> UiSettings -> SelectViewModel -> List (Html Msg)
itemMergeView texts settings svm =
[ Html.map MergeItemsMsg
(Comp.ItemMerge.view texts.itemMerge settings svm.mergeModel)
]
confirmModal : Texts -> Model -> List (Html Msg) confirmModal : Texts -> Model -> List (Html Msg)

View File

@ -343,11 +343,6 @@ dimmerCard =
" absolute top-0 left-0 w-full h-full bg-black bg-opacity-60 dark:bg-lightblue-900 dark:bg-opacity-60 z-30 flex flex-col items-center justify-center px-4 py-2 " " absolute top-0 left-0 w-full h-full bg-black bg-opacity-60 dark:bg-lightblue-900 dark:bg-opacity-60 z-30 flex flex-col items-center justify-center px-4 py-2 "
dimmerMerge : String
dimmerMerge =
" absolute top-0 left-0 w-full h-full bg-white bg-opacity-100 dark:bg-bluegray-800 dark:bg-opacity-100 z-40 flex flex-col"
tableMain : String tableMain : String
tableMain = tableMain =
"border-collapse table w-full" "border-collapse table w-full"