mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-04-04 10:29:34 +00:00
Remove more unused client code
This commit is contained in:
parent
74db2d39a7
commit
e4527400ca
@ -104,11 +104,7 @@ init key url flags_ settings =
|
||||
Page.Dashboard.Data.init flags
|
||||
|
||||
searchViewMode =
|
||||
if settings.sideMenuVisible then
|
||||
Page.Search.Data.SearchView
|
||||
|
||||
else
|
||||
Page.Search.Data.SimpleView
|
||||
Page.Search.Data.SearchView
|
||||
in
|
||||
( { flags = flags
|
||||
, key = key
|
||||
|
@ -109,8 +109,7 @@ initSelectViewModel flags =
|
||||
|
||||
|
||||
type ViewMode
|
||||
= SimpleView
|
||||
| SearchView
|
||||
= SearchView
|
||||
| SelectView SelectViewModel
|
||||
| PublishView Comp.PublishItems.Model
|
||||
|
||||
@ -149,9 +148,6 @@ init flags viewMode =
|
||||
menuCollapsed : Model -> Bool
|
||||
menuCollapsed model =
|
||||
case model.viewMode of
|
||||
SimpleView ->
|
||||
True
|
||||
|
||||
SearchView ->
|
||||
False
|
||||
|
||||
@ -165,9 +161,6 @@ menuCollapsed model =
|
||||
selectActive : Model -> Bool
|
||||
selectActive model =
|
||||
case model.viewMode of
|
||||
SimpleView ->
|
||||
False
|
||||
|
||||
SearchView ->
|
||||
False
|
||||
|
||||
@ -181,9 +174,6 @@ selectActive model =
|
||||
editActive : Model -> Bool
|
||||
editActive model =
|
||||
case model.viewMode of
|
||||
SimpleView ->
|
||||
False
|
||||
|
||||
SearchView ->
|
||||
False
|
||||
|
||||
@ -203,7 +193,6 @@ type Msg
|
||||
| ItemSearchResp Bool (Result Http.Error ItemLightList)
|
||||
| ItemSearchAddResp (Result Http.Error ItemLightList)
|
||||
| DoSearch SearchType
|
||||
| ToggleSearchMenu
|
||||
| ToggleSelectView
|
||||
| LoadMore
|
||||
| SetBasicSearch String
|
||||
|
@ -276,34 +276,10 @@ update bookmarkId mId key flags texts settings msg model =
|
||||
else
|
||||
doSearch param model
|
||||
|
||||
ToggleSearchMenu ->
|
||||
let
|
||||
nextView =
|
||||
case model.viewMode of
|
||||
SimpleView ->
|
||||
SearchView
|
||||
|
||||
SearchView ->
|
||||
SimpleView
|
||||
|
||||
SelectView _ ->
|
||||
SimpleView
|
||||
|
||||
PublishView q ->
|
||||
PublishView q
|
||||
in
|
||||
withSub
|
||||
( { model | viewMode = nextView }
|
||||
, Cmd.none
|
||||
)
|
||||
|
||||
ToggleSelectView ->
|
||||
let
|
||||
( nextView, cmd ) =
|
||||
case model.viewMode of
|
||||
SimpleView ->
|
||||
( SelectView <| initSelectViewModel flags, loadEditModel flags )
|
||||
|
||||
SearchView ->
|
||||
( SelectView <| initSelectViewModel flags, loadEditModel flags )
|
||||
|
||||
@ -644,11 +620,7 @@ update bookmarkId mId key flags texts settings msg model =
|
||||
SelectView { svm | mergeModel = result.model }
|
||||
|
||||
Comp.ItemMerge.OutcomeMerged ->
|
||||
if settings.sideMenuVisible then
|
||||
SearchView
|
||||
|
||||
else
|
||||
SimpleView
|
||||
SearchView
|
||||
|
||||
model_ =
|
||||
{ model | viewMode = nextView }
|
||||
@ -836,17 +808,10 @@ update bookmarkId mId key flags texts settings msg model =
|
||||
UiSettingsUpdated ->
|
||||
let
|
||||
defaultViewMode =
|
||||
if settings.sideMenuVisible then
|
||||
SearchView
|
||||
|
||||
else
|
||||
SimpleView
|
||||
SearchView
|
||||
|
||||
viewMode =
|
||||
case model.viewMode of
|
||||
SimpleView ->
|
||||
defaultViewMode
|
||||
|
||||
SearchView ->
|
||||
defaultViewMode
|
||||
|
||||
|
@ -93,9 +93,6 @@ mainView texts flags settings model =
|
||||
(publishResults texts settings flags model pm)
|
||||
]
|
||||
|
||||
SimpleView ->
|
||||
Nothing
|
||||
|
||||
SearchView ->
|
||||
Nothing
|
||||
in
|
||||
@ -109,7 +106,7 @@ mainView texts flags settings model =
|
||||
|
||||
|
||||
bookmarkQueryWidget : Texts -> UiSettings -> Flags -> Model -> List (Html Msg)
|
||||
bookmarkQueryWidget texts settings flags model =
|
||||
bookmarkQueryWidget texts _ _ model =
|
||||
case model.topWidgetModel of
|
||||
BookmarkQuery m ->
|
||||
[ div [ class "px-2 mb-4 border-l border-r border-b dark:border-slate-600" ]
|
||||
@ -136,7 +133,7 @@ itemMergeView texts settings svm =
|
||||
|
||||
|
||||
publishResults : Texts -> UiSettings -> Flags -> Model -> Comp.PublishItems.Model -> List (Html Msg)
|
||||
publishResults texts settings flags model pm =
|
||||
publishResults texts settings flags _ pm =
|
||||
[ Html.map PublishViewMsg
|
||||
(Comp.PublishItems.view texts.publishItems settings flags pm)
|
||||
]
|
||||
@ -188,9 +185,6 @@ confirmModal texts model =
|
||||
itemsBar : Texts -> Flags -> UiSettings -> Model -> List (Html Msg)
|
||||
itemsBar texts flags settings model =
|
||||
case model.viewMode of
|
||||
SimpleView ->
|
||||
[ defaultMenuBar texts flags settings model ]
|
||||
|
||||
SearchView ->
|
||||
[ defaultMenuBar texts flags settings model ]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user