mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-23 02:48:26 +00:00
Add OpenID support to webapp
This commit is contained in:
@ -26,6 +26,7 @@ gb err =
|
||||
, invalidInput = "Invalid input when processing the request."
|
||||
, notFound = "The requested resource doesn't exist."
|
||||
, invalidBody = \str -> "There was an error decoding the response: " ++ str
|
||||
, accessDenied = "Access denied"
|
||||
}
|
||||
in
|
||||
errorToString texts err
|
||||
@ -44,6 +45,7 @@ de err =
|
||||
, invalidInput = "Die Daten im Request waren ungültig."
|
||||
, notFound = "Die angegebene Ressource wurde nicht gefunden."
|
||||
, invalidBody = \str -> "Es gab einen Fehler beim Dekodieren der Antwort: " ++ str
|
||||
, accessDenied = "Zugriff verweigert"
|
||||
}
|
||||
in
|
||||
errorToString texts err
|
||||
@ -61,6 +63,7 @@ type alias Texts =
|
||||
, invalidInput : String
|
||||
, notFound : String
|
||||
, invalidBody : String -> String
|
||||
, accessDenied : String
|
||||
}
|
||||
|
||||
|
||||
@ -90,6 +93,9 @@ errorToString texts error =
|
||||
if sc == 404 then
|
||||
texts.notFound
|
||||
|
||||
else if sc == 403 then
|
||||
texts.accessDenied
|
||||
|
||||
else if sc >= 400 && sc < 500 then
|
||||
texts.invalidInput
|
||||
|
||||
|
@ -29,6 +29,7 @@ type alias Texts =
|
||||
, noAccount : String
|
||||
, signupLink : String
|
||||
, otpCode : String
|
||||
, or : String
|
||||
}
|
||||
|
||||
|
||||
@ -47,6 +48,7 @@ gb =
|
||||
, noAccount = "No account?"
|
||||
, signupLink = "Sign up!"
|
||||
, otpCode = "Authentication code"
|
||||
, or = "Or"
|
||||
}
|
||||
|
||||
|
||||
@ -65,4 +67,5 @@ de =
|
||||
, noAccount = "Kein Konto?"
|
||||
, signupLink = "Hier registrieren!"
|
||||
, otpCode = "Authentifizierungscode"
|
||||
, or = "Oder"
|
||||
}
|
||||
|
Reference in New Issue
Block a user