From 43d90ea8ebea6ad191c0ca15f4a0950b290f5822 Mon Sep 17 00:00:00 2001 From: jem Date: Sat, 5 Jun 2021 17:49:05 +0200 Subject: [PATCH] first try for frontend build --- public/index.html | 64 +++++---------------- src/main/cljs/dda/c4k_keycloak/browser.cljs | 13 +++-- 2 files changed, 21 insertions(+), 56 deletions(-) diff --git a/public/index.html b/public/index.html index 187bbe1..28a5610 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ - c4k-mastodon-bot + c4k-keycloak @@ -12,64 +12,28 @@
- - -
-

+ + +
+

-




-
+
-
diff --git a/src/main/cljs/dda/c4k_keycloak/browser.cljs b/src/main/cljs/dda/c4k_keycloak/browser.cljs index c03c48c..c6c7eb7 100644 --- a/src/main/cljs/dda/c4k_keycloak/browser.cljs +++ b/src/main/cljs/dda/c4k_keycloak/browser.cljs @@ -9,9 +9,9 @@ (print "debug " sth) sth) -(defn config [] +(defn fqdn [] (-> js/document - (.getElementById "config"))) + (.getElementById "fqdn"))) (defn auth [] (-> js/document @@ -22,8 +22,9 @@ (.getElementById "form"))) (defn config-from-document [] - (-> (config) - (.-value))) + {:fqdn + (-> (fqdn) + (.-value))}) (defn auth-from-document [] (-> (auth) @@ -42,7 +43,7 @@ (.getElementById "config-validation") (.-innerHTML) (set! validation-result)) - (-> (config) + (-> (fqdn) (.setCustomValidity validation-result)) validation-result) @@ -87,7 +88,7 @@ (set-validated!) (-> (core/generate (config-from-document) (auth-from-document)) (set-output!))))) - (-> (config) + (-> (fqdn) (.addEventListener "blur" #(do (validate-config!) (validate-auth!)