summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authormrw1593 <botahamec@outlook.com>2023-06-27 20:41:34 -0400
committermrw1593 <botahamec@outlook.com>2023-06-27 20:41:34 -0400
commit9058b01d6c0e3d1e9e485a537258a312ccfc841c (patch)
tree338334da9d70c59aec3aa5dfd3e3879d23df9f1b /static
parent31f80998a8eef32c0ef2d309bee68ab88f453bab (diff)
Error handling
Diffstat (limited to 'static')
-rw-r--r--static/languages/en.ini4
-rw-r--r--static/scripts/tsconfig.json12
-rw-r--r--static/templates/login.html3
3 files changed, 19 insertions, 0 deletions
diff --git a/static/languages/en.ini b/static/languages/en.ini
index e926ec0..32adc51 100644
--- a/static/languages/en.ini
+++ b/static/languages/en.ini
@@ -5,6 +5,8 @@ passwordLabel = Password
passwordPlaceholder = Enter your password
loginSubmitButton = Log In
+loginErrorMessage = Incorrect username or password.
+
errorTitle = Error
errorHeader_invalidRequest = Invalid Request
errorMessage_invalidRequest = The client sent a bad request.
@@ -14,3 +16,5 @@ errorHeader_missingRedirectUri = Missing Redirect URI
errorMessage_missingRedirectUri = There are many redirect URIs for the client, but the client did not specify which one to use.
errorHeader_invalidRedirectUri = Invalid Redirect URI
errorMessage_invalidRedirectUri = The client provided a redirect URI that it is not allowed to redirect to.
+errorHeader_internalServerError = Server Error
+errorMessage_internalServerError = An unexpected error occurred.
diff --git a/static/scripts/tsconfig.json b/static/scripts/tsconfig.json
new file mode 100644
index 0000000..9103384
--- /dev/null
+++ b/static/scripts/tsconfig.json
@@ -0,0 +1,12 @@
+{
+ "compilerOptions": {
+ "strict": true,
+ "noFallthroughCasesInSwitch": true,
+ "exactOptionalPropertyTypes": true,
+ "noImplicitOverride": true,
+ "noImplicitReturns": true,
+ "noPropertyAccessFromIndexSignature": true,
+ "lib": ["DOM"],
+ "target": "ES6"
+ }
+} \ No newline at end of file
diff --git a/static/templates/login.html b/static/templates/login.html
index 5de9bc9..325dc14 100644
--- a/static/templates/login.html
+++ b/static/templates/login.html
@@ -2,6 +2,9 @@
{% block title %}{{ msg(key="loginTitle") }}{% endblock title %}
{% block content %}
<form method="post" action="/authorize?{{params}}">
+ {% if errorMessage %}
+ <p>{{ msg(key=errorMessage) }}</p>
+ {% endif %}
<label for="username">{{ msg(key="usernameLabel") }}</label>
<input id="username" type="text" name="username" tabindex="0" placeholder="{{ msg(key="usernamePlaceholder") }}" autofocus />
<label for="password">{{ msg(key="passwordLabel") }}</label>