summaryrefslogtreecommitdiff
path: root/src/main/resources/static
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2024-01-18 14:29:52 +0100
committerGitHub2024-01-18 14:29:52 +0100
commit358373cf70212b97044e9714ad1b913fcd24e6bc (patch)
treeedabf0677d519437dfe78bdb0c8cd7ba2d217fd3 /src/main/resources/static
parent531a8589db2bf170e6272602ccb4a3c4457186d8 (diff)
parent27a62321faec1087048e624fe68ab53c4fdbc0a3 (diff)
Merge pull request #30 from CCC-MF/issue_29
Issue #29: Unterstützung für Endpoint-Tokens
Diffstat (limited to 'src/main/resources/static')
-rw-r--r--src/main/resources/static/scripts.js7
-rw-r--r--src/main/resources/static/style.css24
2 files changed, 27 insertions, 4 deletions
diff --git a/src/main/resources/static/scripts.js b/src/main/resources/static/scripts.js
index 73ad71b..fdd3f52 100644
--- a/src/main/resources/static/scripts.js
+++ b/src/main/resources/static/scripts.js
@@ -4,14 +4,17 @@ const dateFormat = new Intl.DateTimeFormat('de-DE', dateFormatOptions);
const dateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: 'numeric', second: 'numeric' };
const dateTimeFormat = new Intl.DateTimeFormat('de-DE', dateTimeFormatOptions);
-window.addEventListener('load', () => {
+const formatTimeElements = () => {
Array.from(document.getElementsByTagName('time')).forEach((timeTag) => {
let date = Date.parse(timeTag.getAttribute('datetime'));
if (! isNaN(date)) {
timeTag.innerText = dateTimeFormat.format(date);
}
});
-});
+};
+
+window.addEventListener('load', formatTimeElements);
+window.addEventListener('htmx:afterRequest', formatTimeElements);
function drawPieChart(url, elemId, title, data) {
if (data) {
diff --git a/src/main/resources/static/style.css b/src/main/resources/static/style.css
index e2bf65a..3249aad 100644
--- a/src/main/resources/static/style.css
+++ b/src/main/resources/static/style.css
@@ -202,13 +202,15 @@ form.samplecode-input input:focus-visible {
background: none;
}
-.login-form form * {
+.login-form form *,
+.token-form form * {
padding: 0.5em;
border: 1px solid var(--table-border);
border-radius: 3px;
}
-.login-form button {
+.login-form button,
+.token-form button {
margin: 1em 0;
background: var(--bg-blue);
color: white;
@@ -535,4 +537,22 @@ a.reload {
font-size: .6em;
align-content: center;
justify-content: center;
+}
+
+.new-token {
+ padding: 1em;
+ background: var(--bg-green-op);
+}
+
+.new-token > pre {
+ margin: 0;
+ border: 1px solid var(--bg-green);
+ padding: .5em;
+ width: max-content;
+ display: inline-block;
+}
+
+.no-token {
+ padding: 1em;
+ background: var(--bg-red-op);
} \ No newline at end of file