mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 18:38:26 +00:00
Manage notification channels separately and migrate
It's more convenient to manage notification channels separately, as it is done with email settings. Notification hook and other forms are adopted to only select channels. Hooks can now use more than one channel.
This commit is contained in:
@ -11,6 +11,7 @@ import Comp.ChangePasswordForm
|
||||
import Comp.DueItemsTaskManage
|
||||
import Comp.EmailSettingsManage
|
||||
import Comp.ImapSettingsManage
|
||||
import Comp.NotificationChannelManage
|
||||
import Comp.NotificationHookManage
|
||||
import Comp.OtpSetup
|
||||
import Comp.PeriodicQueryTaskManage
|
||||
@ -77,7 +78,7 @@ viewSidebar texts visible _ _ model =
|
||||
, menuEntryActive model NotificationTab
|
||||
, class S.sidebarLink
|
||||
]
|
||||
[ i [ class "fa fa-bullhorn" ] []
|
||||
[ i [ class "fa fa-comment font-thin" ] []
|
||||
, span
|
||||
[ class "ml-3" ]
|
||||
[ text texts.notifications ]
|
||||
@ -121,6 +122,17 @@ viewSidebar texts visible _ _ model =
|
||||
]
|
||||
]
|
||||
]
|
||||
, a
|
||||
[ href "#"
|
||||
, onClick (SetTab ChannelTab)
|
||||
, menuEntryActive model ChannelTab
|
||||
, class S.sidebarLink
|
||||
]
|
||||
[ i [ class "fa fa-bullhorn" ] []
|
||||
, span
|
||||
[ class "ml-3" ]
|
||||
[ text texts.channelSettings ]
|
||||
]
|
||||
, a
|
||||
[ href "#"
|
||||
, onClick (SetTab ScanMailboxTab)
|
||||
@ -217,6 +229,9 @@ viewContent texts flags settings model =
|
||||
Just OtpTab ->
|
||||
viewOtpSetup texts settings model
|
||||
|
||||
Just ChannelTab ->
|
||||
viewChannels texts settings model
|
||||
|
||||
Nothing ->
|
||||
[]
|
||||
)
|
||||
@ -235,6 +250,26 @@ menuEntryActive model tab =
|
||||
class ""
|
||||
|
||||
|
||||
viewChannels : Texts -> UiSettings -> Model -> List (Html Msg)
|
||||
viewChannels texts settings model =
|
||||
[ h2
|
||||
[ class S.header1
|
||||
, class "inline-flex items-center"
|
||||
]
|
||||
[ i [ class "fa fa-bell" ] []
|
||||
, div [ class "ml-3" ]
|
||||
[ text texts.channels
|
||||
]
|
||||
]
|
||||
, Markdown.toHtml [ class "opacity-80 text-lg mb-3 markdown-preview" ] texts.channelInfoText
|
||||
, Html.map ChannelMsg
|
||||
(Comp.NotificationChannelManage.view texts.channelManage
|
||||
settings
|
||||
model.channelModel
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
viewOtpSetup : Texts -> UiSettings -> Model -> List (Html Msg)
|
||||
viewOtpSetup texts _ model =
|
||||
[ h2
|
||||
|
Reference in New Issue
Block a user