Add support for more generic notification

This is a start to have different kinds of notifications. It is
possible to be notified via e-mail, matrix or gotify. It also extends
the current "periodic query" for due items by allowing notification
over different channels. A "generic periodic query" variant is added
as well.
This commit is contained in:
eikek
2021-11-22 00:22:51 +01:00
parent 93a828720c
commit 4ffc8d1f14
175 changed files with 13041 additions and 599 deletions

View File

@ -0,0 +1,47 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.ChannelForm exposing
( Texts
, de
, gb
)
import Messages.Basics
import Messages.Comp.NotificationGotifyForm
import Messages.Comp.NotificationHttpForm
import Messages.Comp.NotificationMailForm
import Messages.Comp.NotificationMatrixForm
type alias Texts =
{ basics : Messages.Basics.Texts
, matrixForm : Messages.Comp.NotificationMatrixForm.Texts
, gotifyForm : Messages.Comp.NotificationGotifyForm.Texts
, mailForm : Messages.Comp.NotificationMailForm.Texts
, httpForm : Messages.Comp.NotificationHttpForm.Texts
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, matrixForm = Messages.Comp.NotificationMatrixForm.gb
, gotifyForm = Messages.Comp.NotificationGotifyForm.gb
, mailForm = Messages.Comp.NotificationMailForm.gb
, httpForm = Messages.Comp.NotificationHttpForm.gb
}
de : Texts
de =
{ basics = Messages.Basics.de
, matrixForm = Messages.Comp.NotificationMatrixForm.de
, gotifyForm = Messages.Comp.NotificationGotifyForm.de
, mailForm = Messages.Comp.NotificationMailForm.de
, httpForm = Messages.Comp.NotificationHttpForm.de
}

View File

@ -5,7 +5,7 @@
-}
module Messages.Comp.NotificationForm exposing
module Messages.Comp.DueItemsTaskForm exposing
( Texts
, de
, gb
@ -14,25 +14,23 @@ module Messages.Comp.NotificationForm exposing
import Http
import Messages.Basics
import Messages.Comp.CalEventInput
import Messages.Comp.ChannelForm
import Messages.Comp.HttpError
import Messages.Data.ChannelType
type alias Texts =
{ basics : Messages.Basics.Texts
, calEventInput : Messages.Comp.CalEventInput.Texts
, httpError : Http.Error -> String
, channelForm : Messages.Comp.ChannelForm.Texts
, reallyDeleteTask : String
, startOnce : String
, startTaskNow : String
, selectConnection : String
, deleteThisTask : String
, enableDisable : String
, summary : String
, summaryInfo : String
, sendVia : String
, sendViaInfo : String
, recipients : String
, recipientsInfo : String
, tagsInclude : String
, tagsIncludeInfo : String
, tagsExclude : String
@ -48,6 +46,9 @@ type alias Texts =
, invalidCalEvent : String
, remindDaysRequired : String
, recipientsRequired : String
, queryLabel : String
, channelRequired : String
, channelHeader : Messages.Data.ChannelType.Texts
}
@ -56,18 +57,14 @@ gb =
{ basics = Messages.Basics.gb
, calEventInput = Messages.Comp.CalEventInput.gb
, httpError = Messages.Comp.HttpError.gb
, channelForm = Messages.Comp.ChannelForm.gb
, reallyDeleteTask = "Really delete this notification task?"
, startOnce = "Start Once"
, startTaskNow = "Start this task now"
, selectConnection = "Select connection..."
, deleteThisTask = "Delete this task"
, enableDisable = "Enable or disable this task."
, summary = "Summary"
, summaryInfo = "Some human readable name, only for displaying"
, sendVia = "Send via"
, sendViaInfo = "The SMTP connection to use when sending notification mails."
, recipients = "Recipient(s)"
, recipientsInfo = "One or more mail addresses, confirm each by pressing 'Return'."
, tagsInclude = "Tags Include (and)"
, tagsIncludeInfo = "Items must have all the tags specified here."
, tagsExclude = "Tags Exclude (or)"
@ -87,6 +84,9 @@ gb =
, invalidCalEvent = "The calendar event is not valid."
, remindDaysRequired = "Remind-Days is required."
, recipientsRequired = "At least one recipient is required."
, queryLabel = "Query"
, channelRequired = "A valid channel must be given."
, channelHeader = \ct -> "Connection details for " ++ Messages.Data.ChannelType.gb ct
}
@ -95,18 +95,14 @@ de =
{ basics = Messages.Basics.de
, calEventInput = Messages.Comp.CalEventInput.de
, httpError = Messages.Comp.HttpError.de
, channelForm = Messages.Comp.ChannelForm.gb
, reallyDeleteTask = "Diesen Benachrichtigungsauftrag wirklich löschen?"
, startOnce = "Jetzt starten"
, startTaskNow = "Starte den Auftrag sofort"
, selectConnection = "Verbindung auswählen"
, deleteThisTask = "Den Auftrag löschen"
, enableDisable = "Auftrag aktivieren oder deaktivieren"
, summary = "Kurzbeschreibung"
, summaryInfo = "Eine kurze lesbare Zusammenfassung, nur für die Anzeige"
, sendVia = "Senden via"
, sendViaInfo = "Die SMTP-Verbindung, die zum Senden der Benachrichtigungs-E-Mails verwendet werden soll."
, recipients = "Empfänger"
, recipientsInfo = "Eine oder mehrere E-Mail-Adressen, jede mit 'Eingabe' bestätigen."
, tagsInclude = "Tags verknüpft (&&)"
, tagsIncludeInfo = "Dokumente müssen alle diese Tags haben."
, tagsExclude = "Tags nicht verknüpft (||)"
@ -126,4 +122,7 @@ de =
, invalidCalEvent = "Das Kalenderereignis ist nicht gültig."
, remindDaysRequired = "'Fällig in Tagen' ist erforderlich."
, recipientsRequired = "Mindestens ein Empfänger muss angegeben werden."
, queryLabel = "Abfrage"
, channelRequired = "Ein Versandkanal muss angegeben werden."
, channelHeader = \ct -> "Details für " ++ Messages.Data.ChannelType.de ct
}

View File

@ -5,7 +5,7 @@
-}
module Messages.Comp.NotificationTable exposing
module Messages.Comp.DueItemsTaskList exposing
( Texts
, de
, gb

View File

@ -5,7 +5,7 @@
-}
module Messages.Comp.NotificationManage exposing
module Messages.Comp.DueItemsTaskManage exposing
( Texts
, de
, gb
@ -13,16 +13,18 @@ module Messages.Comp.NotificationManage exposing
import Http
import Messages.Basics
import Messages.Comp.DueItemsTaskForm
import Messages.Comp.DueItemsTaskList
import Messages.Comp.HttpError
import Messages.Comp.NotificationForm
import Messages.Comp.NotificationTable
import Messages.Data.ChannelType
type alias Texts =
{ basics : Messages.Basics.Texts
, notificationForm : Messages.Comp.NotificationForm.Texts
, notificationTable : Messages.Comp.NotificationTable.Texts
, notificationForm : Messages.Comp.DueItemsTaskForm.Texts
, notificationTable : Messages.Comp.DueItemsTaskList.Texts
, httpError : Http.Error -> String
, channelType : Messages.Data.ChannelType.Texts
, newTask : String
, createNewTask : String
, taskCreated : String
@ -35,9 +37,10 @@ type alias Texts =
gb : Texts
gb =
{ basics = Messages.Basics.gb
, notificationForm = Messages.Comp.NotificationForm.gb
, notificationTable = Messages.Comp.NotificationTable.gb
, notificationForm = Messages.Comp.DueItemsTaskForm.gb
, notificationTable = Messages.Comp.DueItemsTaskList.gb
, httpError = Messages.Comp.HttpError.gb
, channelType = Messages.Data.ChannelType.gb
, newTask = "New Task"
, createNewTask = "Create a new notification task"
, taskCreated = "Task created."
@ -50,9 +53,10 @@ gb =
de : Texts
de =
{ basics = Messages.Basics.de
, notificationForm = Messages.Comp.NotificationForm.de
, notificationTable = Messages.Comp.NotificationTable.de
, notificationForm = Messages.Comp.DueItemsTaskForm.de
, notificationTable = Messages.Comp.DueItemsTaskList.de
, httpError = Messages.Comp.HttpError.de
, channelType = Messages.Data.ChannelType.de
, newTask = "Neuer Auftrag"
, createNewTask = "Erstelle einen neuen Benachrichtigungsauftrag"
, taskCreated = "Auftrag erstellt."

View File

@ -0,0 +1,40 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.EventSample exposing
( Texts
, de
, gb
)
import Data.EventType exposing (EventType)
import Http
import Messages.Comp.HttpError
import Messages.Data.EventType
type alias Texts =
{ eventType : EventType -> Messages.Data.EventType.Texts
, httpError : Http.Error -> String
, selectEvent : String
}
gb : Texts
gb =
{ eventType = Messages.Data.EventType.gb
, httpError = Messages.Comp.HttpError.gb
, selectEvent = "Select event"
}
de : Texts
de =
{ eventType = Messages.Data.EventType.de
, httpError = Messages.Comp.HttpError.de
, selectEvent = "Ereignis wählen"
}

View File

@ -0,0 +1,37 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.NotificationGotifyForm exposing
( Texts
, de
, gb
)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, gotifyUrl : String
, appKey : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, gotifyUrl = "Gotify URL"
, appKey = "App Key"
}
de : Texts
de =
{ basics = Messages.Basics.de
, gotifyUrl = "Gotify URL"
, appKey = "App Key"
}

View File

@ -0,0 +1,75 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.NotificationHookForm exposing
( Texts
, de
, gb
)
import Data.EventType exposing (EventType)
import Messages.Basics
import Messages.Comp.ChannelForm
import Messages.Comp.EventSample
import Messages.Data.ChannelType
import Messages.Data.EventType
type alias Texts =
{ basics : Messages.Basics.Texts
, channelForm : Messages.Comp.ChannelForm.Texts
, eventType : EventType -> Messages.Data.EventType.Texts
, eventSample : Messages.Comp.EventSample.Texts
, channelHeader : Messages.Data.ChannelType.Texts
, enableDisable : String
, eventsInfo : String
, selectEvents : String
, events : String
, samplePayload : String
, toggleAllEvents : String
, eventFilter : String
, eventFilterInfo : String
, eventFilterClickForHelp : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, channelForm = Messages.Comp.ChannelForm.gb
, eventType = Messages.Data.EventType.gb
, eventSample = Messages.Comp.EventSample.gb
, channelHeader = Messages.Data.ChannelType.gb
, enableDisable = "Enabled / Disabled"
, eventsInfo = "Select events that trigger this webhook"
, selectEvents = "Select"
, events = "Events"
, samplePayload = "Sample Payload"
, toggleAllEvents = "Notify on all events"
, eventFilter = "Event Filter Expression"
, eventFilterInfo = "Optional specify an expression to filter events based on their JSON structure."
, eventFilterClickForHelp = "Click here for help"
}
de : Texts
de =
{ basics = Messages.Basics.de
, channelForm = Messages.Comp.ChannelForm.de
, eventType = Messages.Data.EventType.de
, eventSample = Messages.Comp.EventSample.de
, channelHeader = Messages.Data.ChannelType.de
, enableDisable = "Aktiviert / Deaktivert"
, eventsInfo = "Wähle die Ereignisse, die diesen webhook auslösen"
, selectEvents = "Wähle"
, events = "Ereignisse"
, samplePayload = "Beispieldaten"
, toggleAllEvents = "Bei allen Ereignissen"
, eventFilter = "Ereignisfilter"
, eventFilterInfo = "Optionaler Ausdruck zum filtern von Ereignissen auf Basis ihrer JSON Struktur."
, eventFilterClickForHelp = "Klicke für Hilfe"
}

View File

@ -0,0 +1,106 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.NotificationHookManage exposing
( Texts
, de
, gb
)
import Html exposing (Html, text)
import Http
import Messages.Basics
import Messages.Comp.HttpError
import Messages.Comp.NotificationHookForm
import Messages.Comp.NotificationHookTable
import Messages.Data.ChannelType
type alias Texts =
{ basics : Messages.Basics.Texts
, notificationForm : Messages.Comp.NotificationHookForm.Texts
, notificationTable : Messages.Comp.NotificationHookTable.Texts
, httpError : Http.Error -> String
, channelType : Messages.Data.ChannelType.Texts
, newHook : String
, matrix : String
, gotify : String
, email : String
, httpRequest : String
, hookCreated : String
, hookUpdated : String
, hookStarted : String
, hookDeleted : String
, deleteThisHook : String
, reallyDeleteHook : String
, formInvalid : String
, invalidJsonFilter : String -> String
, integrate : String
, intoDocspell : String
, postRequestInfo : String
, updateWebhook : String
, addWebhook : String
, notifyEmailInfo : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, notificationForm = Messages.Comp.NotificationHookForm.gb
, notificationTable = Messages.Comp.NotificationHookTable.gb
, httpError = Messages.Comp.HttpError.gb
, channelType = Messages.Data.ChannelType.gb
, newHook = "New Webhook"
, matrix = "Matrix"
, gotify = "Gotify"
, email = "E-Mail"
, httpRequest = "HTTP Request"
, hookCreated = "Webhook created"
, hookUpdated = "Webhook updated"
, hookStarted = "Webhook executed"
, hookDeleted = "Webhook deleted"
, deleteThisHook = "Delete this webhook"
, reallyDeleteHook = "Really delete this webhook?"
, formInvalid = "Please fill in all required fields"
, invalidJsonFilter = \m -> "Event filter invalid: " ++ m
, integrate = "Integrate"
, intoDocspell = "into Docspell"
, postRequestInfo = "Docspell will send POST requests with JSON payload."
, updateWebhook = "Update webhook"
, addWebhook = "Add new webhook"
, notifyEmailInfo = "Get notified via e-mail."
}
de : Texts
de =
{ basics = Messages.Basics.de
, notificationForm = Messages.Comp.NotificationHookForm.de
, notificationTable = Messages.Comp.NotificationHookTable.de
, httpError = Messages.Comp.HttpError.de
, channelType = Messages.Data.ChannelType.de
, newHook = "Neuer Webhook"
, matrix = "Matrix"
, gotify = "Gotify"
, email = "E-Mail"
, httpRequest = "HTTP Request"
, hookCreated = "Webhook erstellt"
, hookUpdated = "Webhook aktualisiert"
, hookStarted = "Webhook ausgeführt"
, hookDeleted = "Webhook gelöscht"
, deleteThisHook = "Diesen Webhook löschen"
, reallyDeleteHook = "Den webhook wirklich löschen?"
, formInvalid = "Bitte alle erforderlichen Felder ausfüllen"
, invalidJsonFilter = \m -> "Ereignisfilter ist falsch: " ++ m
, integrate = "Integriere"
, intoDocspell = "in Docspell"
, postRequestInfo = "Docspell wird JSON POST requests senden."
, updateWebhook = "Webhook aktualisieren"
, addWebhook = "Neuen Webhook hinzufügen"
, notifyEmailInfo = "Werde per E-Mail benachrichtigt."
}

View File

@ -0,0 +1,45 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.NotificationHookTable exposing
( Texts
, de
, gb
)
import Data.EventType exposing (EventType)
import Messages.Basics
import Messages.Data.EventType
type alias Texts =
{ basics : Messages.Basics.Texts
, eventType : EventType -> Messages.Data.EventType.Texts
, enabled : String
, channel : String
, events : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, eventType = Messages.Data.EventType.gb
, enabled = "Enabled"
, channel = "Channel"
, events = "Events"
}
de : Texts
de =
{ basics = Messages.Basics.de
, eventType = Messages.Data.EventType.de
, enabled = "Aktiv"
, channel = "Kanal"
, events = "Ereignisse"
}

View File

@ -0,0 +1,34 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.NotificationHttpForm exposing
( Texts
, de
, gb
)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, httpUrl : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, httpUrl = "Http URL"
}
de : Texts
de =
{ basics = Messages.Basics.de
, httpUrl = "URL"
}

View File

@ -0,0 +1,49 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.NotificationMailForm exposing
( Texts
, de
, gb
)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, selectConnection : String
, sendVia : String
, sendViaInfo : String
, recipients : String
, recipientsInfo : String
, recipientsRequired : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, selectConnection = "Select connection..."
, sendVia = "Send via"
, sendViaInfo = "The SMTP connection to use when sending notification mails."
, recipients = "Recipient(s)"
, recipientsInfo = "One or more mail addresses, confirm each by pressing 'Return'."
, recipientsRequired = "At least one recipient is required."
}
de : Texts
de =
{ basics = Messages.Basics.de
, selectConnection = "Verbindung auswählen"
, sendVia = "Senden via"
, sendViaInfo = "Die SMTP-Verbindung, die zum Senden der Benachrichtigungs-E-Mails verwendet werden soll."
, recipients = "Empfänger"
, recipientsInfo = "Eine oder mehrere E-Mail-Adressen, jede mit 'Eingabe' bestätigen."
, recipientsRequired = "Mindestens ein Empfänger muss angegeben werden."
}

View File

@ -0,0 +1,40 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.NotificationMatrixForm exposing
( Texts
, de
, gb
)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, homeServer : String
, roomId : String
, accessKey : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, homeServer = "Homeserver URL"
, roomId = "Room ID"
, accessKey = "Access Token"
}
de : Texts
de =
{ basics = Messages.Basics.de
, homeServer = "Homeserver URL"
, roomId = "Room ID"
, accessKey = "Access Token"
}

View File

@ -0,0 +1,99 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.PeriodicQueryTaskForm exposing
( Texts
, de
, gb
)
import Data.ChannelType exposing (ChannelType)
import Http
import Messages.Basics
import Messages.Comp.CalEventInput
import Messages.Comp.ChannelForm
import Messages.Comp.HttpError
import Messages.Data.ChannelType
type alias Texts =
{ basics : Messages.Basics.Texts
, calEventInput : Messages.Comp.CalEventInput.Texts
, channelForm : Messages.Comp.ChannelForm.Texts
, httpError : Http.Error -> String
, reallyDeleteTask : String
, startOnce : String
, startTaskNow : String
, deleteThisTask : String
, enableDisable : String
, summary : String
, summaryInfo : String
, schedule : String
, scheduleClickForHelp : String
, scheduleInfo : String
, queryLabel : String
, invalidCalEvent : String
, channelRequired : String
, queryStringRequired : String
, channelHeader : ChannelType -> String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, calEventInput = Messages.Comp.CalEventInput.gb
, channelForm = Messages.Comp.ChannelForm.gb
, httpError = Messages.Comp.HttpError.gb
, reallyDeleteTask = "Really delete this notification task?"
, startOnce = "Start Once"
, startTaskNow = "Start this task now"
, deleteThisTask = "Delete this task"
, enableDisable = "Enable or disable this task."
, summary = "Summary"
, summaryInfo = "Some human readable name, only for displaying"
, schedule = "Schedule"
, scheduleClickForHelp = "Click here for help"
, scheduleInfo =
"Specify how often and when this task should run. "
++ "Use English 3-letter weekdays. Either a single value, "
++ "a list (ex. 1,2,3), a range (ex. 1..3) or a '*' (meaning all) "
++ "is allowed for each part."
, invalidCalEvent = "The calendar event is not valid."
, queryLabel = "Query"
, channelRequired = "A valid channel must be given."
, queryStringRequired = "A query string must be supplied"
, channelHeader = \ct -> "Connection details for " ++ Messages.Data.ChannelType.gb ct
}
de : Texts
de =
{ basics = Messages.Basics.de
, calEventInput = Messages.Comp.CalEventInput.de
, channelForm = Messages.Comp.ChannelForm.de
, httpError = Messages.Comp.HttpError.de
, reallyDeleteTask = "Diesen Benachrichtigungsauftrag wirklich löschen?"
, startOnce = "Jetzt starten"
, startTaskNow = "Starte den Auftrag sofort"
, deleteThisTask = "Den Auftrag löschen"
, enableDisable = "Auftrag aktivieren oder deaktivieren"
, summary = "Kurzbeschreibung"
, summaryInfo = "Eine kurze lesbare Zusammenfassung, nur für die Anzeige"
, schedule = "Zeitplan"
, scheduleClickForHelp = "Klicke für Hilfe"
, scheduleInfo =
"Gib an, wie oft und wann der Auftrag laufen soll. "
++ "Verwende englische 3-Buchstaben Wochentage. Entweder ein einzelner Wert, "
++ "eine Liste (wie `1,2,3`), eine Bereich (wie `1..3`) oder ein '*' (für alle) "
++ "ist mögich für jeden Teil."
, invalidCalEvent = "Das Kalenderereignis ist nicht gültig."
, queryLabel = "Abfrage"
, channelRequired = "Ein Versandkanal muss angegeben werden."
, queryStringRequired = "Eine Suchabfrage muss angegeben werden."
, channelHeader = \ct -> "Details für " ++ Messages.Data.ChannelType.de ct
}

View File

@ -0,0 +1,43 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.PeriodicQueryTaskList exposing
( Texts
, de
, gb
)
import Messages.Basics
type alias Texts =
{ basics : Messages.Basics.Texts
, summary : String
, schedule : String
, connection : String
, recipients : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, summary = "Summary"
, schedule = "Schedule"
, connection = "Connection"
, recipients = "Recipients"
}
de : Texts
de =
{ basics = Messages.Basics.de
, summary = "Kurzbeschreibung"
, schedule = "Zeitplan"
, connection = "Verbindung"
, recipients = "Empfänger"
}

View File

@ -0,0 +1,78 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Comp.PeriodicQueryTaskManage exposing
( Texts
, de
, gb
)
import Http
import Messages.Basics
import Messages.Comp.HttpError
import Messages.Comp.PeriodicQueryTaskForm
import Messages.Comp.PeriodicQueryTaskList
import Messages.Data.ChannelType
type alias Texts =
{ basics : Messages.Basics.Texts
, notificationForm : Messages.Comp.PeriodicQueryTaskForm.Texts
, notificationTable : Messages.Comp.PeriodicQueryTaskList.Texts
, httpError : Http.Error -> String
, channelType : Messages.Data.ChannelType.Texts
, newTask : String
, createNewTask : String
, taskCreated : String
, taskUpdated : String
, taskStarted : String
, taskDeleted : String
, matrix : String
, gotify : String
, email : String
, httpRequest : String
}
gb : Texts
gb =
{ basics = Messages.Basics.gb
, notificationForm = Messages.Comp.PeriodicQueryTaskForm.gb
, notificationTable = Messages.Comp.PeriodicQueryTaskList.gb
, httpError = Messages.Comp.HttpError.gb
, channelType = Messages.Data.ChannelType.gb
, newTask = "New Task"
, createNewTask = "Create a new notification task"
, taskCreated = "Task created."
, taskUpdated = "Task updated."
, taskStarted = "Task started."
, taskDeleted = "Task deleted."
, matrix = "Matrix"
, gotify = "Gotify"
, email = "E-Mail"
, httpRequest = "HTTP Request"
}
de : Texts
de =
{ basics = Messages.Basics.de
, notificationForm = Messages.Comp.PeriodicQueryTaskForm.de
, notificationTable = Messages.Comp.PeriodicQueryTaskList.de
, httpError = Messages.Comp.HttpError.de
, channelType = Messages.Data.ChannelType.de
, newTask = "Neuer Auftrag"
, createNewTask = "Erstelle einen neuen Benachrichtigungsauftrag"
, taskCreated = "Auftrag erstellt."
, taskUpdated = "Auftrag aktualisiert."
, taskStarted = "Auftrag gestartet."
, taskDeleted = "Auftrag gelöscht."
, matrix = "Matrix"
, gotify = "Gotify"
, email = "E-Mail"
, httpRequest = "HTTP Request"
}

View File

@ -0,0 +1,46 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Data.ChannelType exposing (Texts, de, gb)
import Data.ChannelType exposing (ChannelType)
type alias Texts =
ChannelType -> String
gb : Texts
gb ct =
case ct of
Data.ChannelType.Matrix ->
"Matrix"
Data.ChannelType.Gotify ->
"Gotify"
Data.ChannelType.Mail ->
"E-Mail"
Data.ChannelType.Http ->
"HTTP request"
de : Texts
de ct =
case ct of
Data.ChannelType.Matrix ->
"Matrix"
Data.ChannelType.Gotify ->
"Gotify"
Data.ChannelType.Mail ->
"E-Mail"
Data.ChannelType.Http ->
"HTTP Request"

View File

@ -0,0 +1,78 @@
{-
Copyright 2020 Eike K. & Contributors
SPDX-License-Identifier: AGPL-3.0-or-later
-}
module Messages.Data.EventType exposing
( Texts
, de
, gb
)
import Data.EventType exposing (EventType(..))
type alias Texts =
{ name : String
, info : String
}
gb : EventType -> Texts
gb et =
case et of
TagsChanged ->
{ name = "Tags changed"
, info = "Whenever a tag on an item is added or removed"
}
SetFieldValue ->
{ name = "Set field value"
, info = "Whenever a custom field is set to a value"
}
DeleteFieldValue ->
{ name = "Delete field value"
, info = "Whenever a custom field is removed"
}
JobSubmitted ->
{ name = "Job submitted"
, info = "Whenever a new job is submitted"
}
JobDone ->
{ name = "Job done"
, info = "Whenever a new job finished"
}
de : EventType -> Texts
de et =
case et of
TagsChanged ->
{ name = "Tags geändert"
, info = "Wenn ein tag hinzugefügt oder entfernt wird"
}
SetFieldValue ->
{ name = "Benutzerfeldwert ändert"
, info = "Wenn für ein Benutzerfeld ein Wert gesetzt wird"
}
DeleteFieldValue ->
{ name = "Benutzerfeldwert entfernt"
, info = "Wenn der Wert für ein Benuzterfeld entfernt wird"
}
JobSubmitted ->
{ name = "Auftrag gestartet"
, info = "Wenn ein neuer Auftrag gestartet wird"
}
JobDone ->
{ name = "Auftrag beendet"
, info = "Wenn ein Auftrag beendet wurde"
}

View File

@ -12,10 +12,12 @@ module Messages.Page.UserSettings exposing
)
import Messages.Comp.ChangePasswordForm
import Messages.Comp.DueItemsTaskManage
import Messages.Comp.EmailSettingsManage
import Messages.Comp.ImapSettingsManage
import Messages.Comp.NotificationManage
import Messages.Comp.NotificationHookManage
import Messages.Comp.OtpSetup
import Messages.Comp.PeriodicQueryTaskManage
import Messages.Comp.ScanMailboxManage
import Messages.Comp.UiSettingsManage
@ -25,8 +27,10 @@ type alias Texts =
, uiSettingsManage : Messages.Comp.UiSettingsManage.Texts
, emailSettingsManage : Messages.Comp.EmailSettingsManage.Texts
, imapSettingsManage : Messages.Comp.ImapSettingsManage.Texts
, notificationManage : Messages.Comp.NotificationManage.Texts
, notificationManage : Messages.Comp.DueItemsTaskManage.Texts
, scanMailboxManage : Messages.Comp.ScanMailboxManage.Texts
, notificationHookManage : Messages.Comp.NotificationHookManage.Texts
, periodicQueryTask : Messages.Comp.PeriodicQueryTaskManage.Texts
, otpSetup : Messages.Comp.OtpSetup.Texts
, userSettings : String
, uiSettings : String
@ -36,11 +40,16 @@ type alias Texts =
, emailSettingImap : String
, changePassword : String
, uiSettingsInfo : String
, notificationInfoText : String
, notificationRemindDaysInfo : String
, scanMailboxInfo1 : String
, scanMailboxInfo2 : String
, otpMenu : String
, webhooks : String
, genericQueries : String
, dueItems : String
, notificationInfoText : String
, webhookInfoText : String
, dueItemsInfoText : String
, periodicQueryInfoText : String
}
@ -50,8 +59,10 @@ gb =
, uiSettingsManage = Messages.Comp.UiSettingsManage.gb
, emailSettingsManage = Messages.Comp.EmailSettingsManage.gb
, imapSettingsManage = Messages.Comp.ImapSettingsManage.gb
, notificationManage = Messages.Comp.NotificationManage.gb
, notificationManage = Messages.Comp.DueItemsTaskManage.gb
, scanMailboxManage = Messages.Comp.ScanMailboxManage.gb
, notificationHookManage = Messages.Comp.NotificationHookManage.gb
, periodicQueryTask = Messages.Comp.PeriodicQueryTaskManage.gb
, otpSetup = Messages.Comp.OtpSetup.gb
, userSettings = "User Settings"
, uiSettings = "UI Settings"
@ -63,13 +74,6 @@ gb =
, uiSettingsInfo =
"These settings only affect the web ui. They are stored in the browser, "
++ "so they are separated between browsers and devices."
, notificationInfoText =
"""
Docspell can notify you once the due dates of your items
come closer. Notification is done via e-mail. You need to
provide a connection in your e-mail settings."""
, notificationRemindDaysInfo =
"Docspell finds all items that are due in *Remind Days* days and sends this list via e-mail."
, scanMailboxInfo1 =
"Docspell can scan folders of your mailbox to import your mails. "
++ "You need to provide a connection in "
@ -85,6 +89,28 @@ gb =
adjust the schedule to avoid reading over the same mails
again."""
, otpMenu = "Two Factor Authentication"
, webhooks = "Webhooks"
, genericQueries = "Generic Queries"
, dueItems = "Due Items Query"
, notificationInfoText = """
Docspell can send notification messages on various events. You can
choose from these channels to send messages:
[Matrix](https://matrix.org), [Gotify](https://gotify.net) or E-Mail.
At last you can send a plain http request with the event details in
its payload.
Additionally, you can setup queries that are executed periodically.
The results are send as a notification message.
When creating a new notification task, choose first the communication
channel.
"""
, webhookInfoText = """Webhooks execute http request upon certain events in docspell.
"""
, dueItemsInfoText = """Docspell can notify you once the due dates of your items come closer. """
, periodicQueryInfoText = "You can define a custom query that gets executed periodically."
}
@ -94,8 +120,10 @@ de =
, uiSettingsManage = Messages.Comp.UiSettingsManage.de
, emailSettingsManage = Messages.Comp.EmailSettingsManage.de
, imapSettingsManage = Messages.Comp.ImapSettingsManage.de
, notificationManage = Messages.Comp.NotificationManage.de
, notificationManage = Messages.Comp.DueItemsTaskManage.de
, scanMailboxManage = Messages.Comp.ScanMailboxManage.de
, notificationHookManage = Messages.Comp.NotificationHookManage.de
, periodicQueryTask = Messages.Comp.PeriodicQueryTaskManage.de
, otpSetup = Messages.Comp.OtpSetup.de
, userSettings = "Benutzereinstellung"
, uiSettings = "Oberfläche"
@ -106,13 +134,6 @@ de =
, changePassword = "Passwort ändern"
, uiSettingsInfo =
"Diese Einstellungen sind für die Web-Oberfläche."
, notificationInfoText =
"""
Docspell kann eine E-Mail versenden, sobald das
Fälligkeitsdatum von Dokumenten näher kommt. Dafür muss eine
E-Mail-SMTP-Verbindung konfiguriert werden.."""
, notificationRemindDaysInfo =
"Docspell sucht Dokumente die in X Tagen fällig sind und sendet diese Liste als E-Mail."
, scanMailboxInfo1 =
"""Docspell kann Postfächer durchsuchen und E-Mails importieren. Dafür sind
E-Mail-Einstellungen (IMAP) notwendig."""
@ -129,4 +150,26 @@ E-Mail-Einstellungen (IMAP) notwendig."""
gleichen E-Mails möglichst nicht noch einmal eingelesen
werden."""
, otpMenu = "Zwei-Faktor-Authentifizierung"
, webhooks = "Webhooks"
, genericQueries = "Periodische Abfragen"
, dueItems = "Fällige Dokumente"
, notificationInfoText = """
Docspell kann Benachrichtigungen bei gewissen Ereignissen versenden.
Es kann aus diesen Versandkanälen gewählt werden:
[Matrix](https://matrix.org), [Gotify](https://gotify.net) oder
E-Mail. Zusätzlich kann das HTTP request direkt empfangen werden, was
alle Details zu einem Ereignis enthält.
Ausserdem können periodische Suchabfragen erstellt werden, dessen
Ergebnis dann als Benachrichtigung versendet wird.
Beim Erstellen eines neuen Auftrags muss zunächst der gewünschte
Versandkanal gewählt werden.
"""
, webhookInfoText = """Webhooks versenden HTTP Requests wenn bestimmte Ereignisse in Docspell auftreten."""
, dueItemsInfoText = """Docspell kann dich benachrichtigen, sobald das Fälligkeitsdatum von Dokumenten näher kommt. """
, periodicQueryInfoText = "Hier können beliebige Abfragen definiert werden, welche regelmäßig ausgeführt werden."
}