Update browser.cljs to fit gitea

This commit is contained in:
bom 2022-06-17 09:56:16 +02:00
parent 71b042b798
commit 08ac2ae1c2
4 changed files with 8 additions and 7 deletions

View file

@ -4,7 +4,7 @@
"src/test/cljc"
"src/test/cljs"
"src/test/resources"]
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "2.0.3"]
:dependencies [[org.domaindrivenarchitecture/c4k-common-cljs "2.1.0"]
[hickory "0.7.1"]]
:builds {:frontend {:target :browser
:modules {:main {:init-fn dda.c4k-gitea.browser/init}}

View file

@ -13,12 +13,14 @@
(defmethod yaml/load-resource :gitea [resource-name]
(case resource-name
"gitea/appini-configmap.yaml" (rc/inline "gitea/appini-configmap.yaml")
"gitea/apini-env-configmap.yaml" (rc/inline "gitea/apini-env-configmap.yaml")
"gitea/appini-env-configmap.yaml" (rc/inline "gitea/appini-env-configmap.yaml")
"gitea/deployment.yaml" (rc/inline "gitea/deployment.yaml")
"gitea/ingress.yaml" (rc/inline "gitea/ingress.yaml")
"gitea/services.yaml" (rc/inline "gitea/services.yaml")
"gitea/volumes.yaml" (rc/inline "gitea/volumes.yaml")
(throw (js/Error. "Undefined Resource!"))))
(throw (js/Error. "Undefined Resource!")))))
#?(:cljs
(defmethod yaml/load-as-edn :gitea [resource-name]
(yaml/from-string (yaml/load-resource resource-name))))

View file

@ -41,8 +41,7 @@
(br/generate-text-area
"auth" "Your auth.edn:"
"{:postgres-db-user \"gitea\"
:postgres-db-password \"gitea-db-password\"
:django-secret-key \"djangosecretkey\"}"
:postgres-db-password \"gitea-db-password\"}"
"5"))
[(br/generate-br)]
(br/generate-button "generate-button" "Generate c4k yaml")))]
@ -72,7 +71,7 @@
(br/validate! "issuer" ::gitea/issuer :optional true :deserializer keyword)
(br/validate! "postgres-data-volume-path" ::pgc/postgres-data-volume-path :optional true)
(br/validate! "auth" core/auth? :deserializer edn/read-string)
(br/set-validated!))
(br/set-form-validated!))
(defn add-validate-listener [name]
(-> (br/get-element-by-id name)