Update browser.cljs to fit gitea
This commit is contained in:
parent
71b042b798
commit
08ac2ae1c2
4 changed files with 8 additions and 7 deletions
|
@ -30,4 +30,4 @@
|
||||||
"shadow-cljs": "^2.11.18",
|
"shadow-cljs": "^2.11.18",
|
||||||
"source-map-support": "^0.5.19"
|
"source-map-support": "^0.5.19"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"src/test/cljc"
|
"src/test/cljc"
|
||||||
"src/test/cljs"
|
"src/test/cljs"
|
||||||
"src/test/resources"]
|
"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"]]
|
[hickory "0.7.1"]]
|
||||||
:builds {:frontend {:target :browser
|
:builds {:frontend {:target :browser
|
||||||
:modules {:main {:init-fn dda.c4k-gitea.browser/init}}
|
:modules {:main {:init-fn dda.c4k-gitea.browser/init}}
|
||||||
|
|
|
@ -13,12 +13,14 @@
|
||||||
(defmethod yaml/load-resource :gitea [resource-name]
|
(defmethod yaml/load-resource :gitea [resource-name]
|
||||||
(case resource-name
|
(case resource-name
|
||||||
"gitea/appini-configmap.yaml" (rc/inline "gitea/appini-configmap.yaml")
|
"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/deployment.yaml" (rc/inline "gitea/deployment.yaml")
|
||||||
"gitea/ingress.yaml" (rc/inline "gitea/ingress.yaml")
|
"gitea/ingress.yaml" (rc/inline "gitea/ingress.yaml")
|
||||||
"gitea/services.yaml" (rc/inline "gitea/services.yaml")
|
"gitea/services.yaml" (rc/inline "gitea/services.yaml")
|
||||||
"gitea/volumes.yaml" (rc/inline "gitea/volumes.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]
|
(defmethod yaml/load-as-edn :gitea [resource-name]
|
||||||
(yaml/from-string (yaml/load-resource resource-name))))
|
(yaml/from-string (yaml/load-resource resource-name))))
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,7 @@
|
||||||
(br/generate-text-area
|
(br/generate-text-area
|
||||||
"auth" "Your auth.edn:"
|
"auth" "Your auth.edn:"
|
||||||
"{:postgres-db-user \"gitea\"
|
"{:postgres-db-user \"gitea\"
|
||||||
:postgres-db-password \"gitea-db-password\"
|
:postgres-db-password \"gitea-db-password\"}"
|
||||||
:django-secret-key \"djangosecretkey\"}"
|
|
||||||
"5"))
|
"5"))
|
||||||
[(br/generate-br)]
|
[(br/generate-br)]
|
||||||
(br/generate-button "generate-button" "Generate c4k yaml")))]
|
(br/generate-button "generate-button" "Generate c4k yaml")))]
|
||||||
|
@ -72,7 +71,7 @@
|
||||||
(br/validate! "issuer" ::gitea/issuer :optional true :deserializer keyword)
|
(br/validate! "issuer" ::gitea/issuer :optional true :deserializer keyword)
|
||||||
(br/validate! "postgres-data-volume-path" ::pgc/postgres-data-volume-path :optional true)
|
(br/validate! "postgres-data-volume-path" ::pgc/postgres-data-volume-path :optional true)
|
||||||
(br/validate! "auth" core/auth? :deserializer edn/read-string)
|
(br/validate! "auth" core/auth? :deserializer edn/read-string)
|
||||||
(br/set-validated!))
|
(br/set-form-validated!))
|
||||||
|
|
||||||
(defn add-validate-listener [name]
|
(defn add-validate-listener [name]
|
||||||
(-> (br/get-element-by-id name)
|
(-> (br/get-element-by-id name)
|
||||||
|
|
Loading…
Reference in a new issue