mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-01 13:02:51 +00:00
commit
c7c2be9bb7
@ -10,6 +10,7 @@ module Api exposing
|
|||||||
, changeFolderName
|
, changeFolderName
|
||||||
, changePassword
|
, changePassword
|
||||||
, checkCalEvent
|
, checkCalEvent
|
||||||
|
, confirmMultiple
|
||||||
, createImapSettings
|
, createImapSettings
|
||||||
, createMailSettings
|
, createMailSettings
|
||||||
, createNewFolder
|
, createNewFolder
|
||||||
@ -107,6 +108,7 @@ module Api exposing
|
|||||||
, startReIndex
|
, startReIndex
|
||||||
, submitNotifyDueItems
|
, submitNotifyDueItems
|
||||||
, toggleTags
|
, toggleTags
|
||||||
|
, unconfirmMultiple
|
||||||
, updateNotifyDueItems
|
, updateNotifyDueItems
|
||||||
, updateScanMailbox
|
, updateScanMailbox
|
||||||
, upload
|
, upload
|
||||||
@ -1284,6 +1286,34 @@ getJobQueueStateTask flags =
|
|||||||
--- Item (Mulit Edit)
|
--- Item (Mulit Edit)
|
||||||
|
|
||||||
|
|
||||||
|
confirmMultiple :
|
||||||
|
Flags
|
||||||
|
-> Set String
|
||||||
|
-> (Result Http.Error BasicResult -> msg)
|
||||||
|
-> Cmd msg
|
||||||
|
confirmMultiple flags ids receive =
|
||||||
|
Http2.authPut
|
||||||
|
{ url = flags.config.baseUrl ++ "/api/v1/sec/items/confirm"
|
||||||
|
, account = getAccount flags
|
||||||
|
, body = Http.jsonBody (Api.Model.IdList.encode (IdList (Set.toList ids)))
|
||||||
|
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unconfirmMultiple :
|
||||||
|
Flags
|
||||||
|
-> Set String
|
||||||
|
-> (Result Http.Error BasicResult -> msg)
|
||||||
|
-> Cmd msg
|
||||||
|
unconfirmMultiple flags ids receive =
|
||||||
|
Http2.authPut
|
||||||
|
{ url = flags.config.baseUrl ++ "/api/v1/sec/items/unconfirm"
|
||||||
|
, account = getAccount flags
|
||||||
|
, body = Http.jsonBody (Api.Model.IdList.encode (IdList (Set.toList ids)))
|
||||||
|
, expect = Http.expectJson receive Api.Model.BasicResult.decoder
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
setTagsMultiple :
|
setTagsMultiple :
|
||||||
Flags
|
Flags
|
||||||
-> ItemsAndRefs
|
-> ItemsAndRefs
|
||||||
|
@ -81,6 +81,7 @@ type Msg
|
|||||||
| UpdateThrottle
|
| UpdateThrottle
|
||||||
| RemoveDueDate
|
| RemoveDueDate
|
||||||
| RemoveDate
|
| RemoveDate
|
||||||
|
| ConfirmMsg Bool
|
||||||
| FolderDropdownMsg (Comp.Dropdown.Msg IdName)
|
| FolderDropdownMsg (Comp.Dropdown.Msg IdName)
|
||||||
| TagDropdownMsg (Comp.Dropdown.Msg Tag)
|
| TagDropdownMsg (Comp.Dropdown.Msg Tag)
|
||||||
| DirDropdownMsg (Comp.Dropdown.Msg Direction)
|
| DirDropdownMsg (Comp.Dropdown.Msg Direction)
|
||||||
@ -201,6 +202,9 @@ resultNone model =
|
|||||||
update : Flags -> Msg -> Model -> UpdateResult
|
update : Flags -> Msg -> Model -> UpdateResult
|
||||||
update flags msg model =
|
update flags msg model =
|
||||||
case msg of
|
case msg of
|
||||||
|
ConfirmMsg flag ->
|
||||||
|
resultNoCmd (ConfirmChange flag) model
|
||||||
|
|
||||||
TagDropdownMsg m ->
|
TagDropdownMsg m ->
|
||||||
let
|
let
|
||||||
( m2, _ ) =
|
( m2, _ ) =
|
||||||
@ -553,7 +557,26 @@ renderEditForm cfg settings model =
|
|||||||
in
|
in
|
||||||
div [ class cfg.menuClass ]
|
div [ class cfg.menuClass ]
|
||||||
[ div [ class "ui form warning" ]
|
[ div [ class "ui form warning" ]
|
||||||
[ optional [ Data.Fields.Tag ] <|
|
[ div [ class "field" ]
|
||||||
|
[ div
|
||||||
|
[ class "ui fluid buttons"
|
||||||
|
]
|
||||||
|
[ button
|
||||||
|
[ class "ui primary button"
|
||||||
|
, onClick (ConfirmMsg True)
|
||||||
|
]
|
||||||
|
[ text "Confirm"
|
||||||
|
]
|
||||||
|
, div [ class "or" ] []
|
||||||
|
, button
|
||||||
|
[ class "ui secondary button"
|
||||||
|
, onClick (ConfirmMsg False)
|
||||||
|
]
|
||||||
|
[ text "Unconfirm"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
, optional [ Data.Fields.Tag ] <|
|
||||||
div [ class "field" ]
|
div [ class "field" ]
|
||||||
[ label []
|
[ label []
|
||||||
[ Icons.tagsIcon "grey"
|
[ Icons.tagsIcon "grey"
|
||||||
|
@ -30,6 +30,7 @@ type FormChange
|
|||||||
| ItemDateChange (Maybe Int)
|
| ItemDateChange (Maybe Int)
|
||||||
| DueDateChange (Maybe Int)
|
| DueDateChange (Maybe Int)
|
||||||
| NameChange String
|
| NameChange String
|
||||||
|
| ConfirmChange Bool
|
||||||
|
|
||||||
|
|
||||||
multiUpdate :
|
multiUpdate :
|
||||||
@ -114,5 +115,12 @@ multiUpdate flags ids change receive =
|
|||||||
in
|
in
|
||||||
Api.setConcEquipmentMultiple flags data receive
|
Api.setConcEquipmentMultiple flags data receive
|
||||||
|
|
||||||
|
ConfirmChange flag ->
|
||||||
|
if flag then
|
||||||
|
Api.confirmMultiple flags ids receive
|
||||||
|
|
||||||
|
else
|
||||||
|
Api.unconfirmMultiple flags ids receive
|
||||||
|
|
||||||
NoFormChange ->
|
NoFormChange ->
|
||||||
Cmd.none
|
Cmd.none
|
||||||
|
@ -59,7 +59,7 @@ view flags settings model =
|
|||||||
, onClick ToggleSearchMenu
|
, onClick ToggleSearchMenu
|
||||||
, title "Hide menu"
|
, title "Hide menu"
|
||||||
]
|
]
|
||||||
[ i [ class "ui angle left icon" ] []
|
[ i [ class "chevron left icon" ] []
|
||||||
]
|
]
|
||||||
, div [ class "right floated menu" ]
|
, div [ class "right floated menu" ]
|
||||||
[ a
|
[ a
|
||||||
@ -303,13 +303,9 @@ viewSearchBar flags model =
|
|||||||
[ class "search-menu-toggle ui blue icon button"
|
[ class "search-menu-toggle ui blue icon button"
|
||||||
, onClick ToggleSearchMenu
|
, onClick ToggleSearchMenu
|
||||||
, href "#"
|
, href "#"
|
||||||
, if model.searchTypeForm == ContentOnlySearch then
|
, title "Open search menu"
|
||||||
title "Search menu disabled"
|
|
||||||
|
|
||||||
else
|
|
||||||
title "Open search menu"
|
|
||||||
]
|
]
|
||||||
[ i [ class "angle right icon" ] []
|
[ i [ class "filter icon" ] []
|
||||||
]
|
]
|
||||||
, div [ class "item" ]
|
, div [ class "item" ]
|
||||||
[ div [ class "ui left icon right action input" ]
|
[ div [ class "ui left icon right action input" ]
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 143 KiB |
Binary file not shown.
Before Width: | Height: | Size: 136 KiB After Width: | Height: | Size: 139 KiB |
Loading…
x
Reference in New Issue
Block a user