mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 13:04:38 -05:00
📎 Disable by default terms and privacy links
And make them configurable
This commit is contained in:
parent
0c9a06789a
commit
52029f83ef
3 changed files with 23 additions and 7 deletions
|
@ -200,4 +200,3 @@
|
||||||
margin: 0 $size-2;
|
margin: 0 $size-2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,9 @@
|
||||||
(def browser (atom (parse-browser)))
|
(def browser (atom (parse-browser)))
|
||||||
(def platform (atom (parse-platform)))
|
(def platform (atom (parse-platform)))
|
||||||
|
|
||||||
|
(def terms-of-service-uri (obj/get global "penpotTermsOfServiceURI" nil))
|
||||||
|
(def privacy-policy-uri (obj/get global "penpotPrivacyPolicyURI" nil))
|
||||||
|
|
||||||
;; maintain for backward compatibility
|
;; maintain for backward compatibility
|
||||||
(let [login-with-ldap (obj/get global "penpotLoginWithLDAP" false)
|
(let [login-with-ldap (obj/get global "penpotLoginWithLDAP" false)
|
||||||
registration (obj/get global "penpotRegistrationEnabled" true)]
|
registration (obj/get global "penpotRegistrationEnabled" true)]
|
||||||
|
@ -135,5 +138,3 @@
|
||||||
(str (cond-> (u/join public-uri "assets/by-file-media-id/")
|
(str (cond-> (u/join public-uri "assets/by-file-media-id/")
|
||||||
(true? thumbnail?) (u/join (str id "/thumbnail"))
|
(true? thumbnail?) (u/join (str id "/thumbnail"))
|
||||||
(false? thumbnail?) (u/join (str id))))))
|
(false? thumbnail?) (u/join (str id))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
(ns app.main.ui.auth
|
(ns app.main.ui.auth
|
||||||
(:require
|
(:require
|
||||||
|
[app.config :as cf]
|
||||||
[app.main.ui.auth.login :refer [login-page]]
|
[app.main.ui.auth.login :refer [login-page]]
|
||||||
[app.main.ui.auth.recovery :refer [recovery-page]]
|
[app.main.ui.auth.recovery :refer [recovery-page]]
|
||||||
[app.main.ui.auth.recovery-request :refer [recovery-request-page]]
|
[app.main.ui.auth.recovery-request :refer [recovery-request-page]]
|
||||||
|
@ -15,6 +16,23 @@
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
[rumext.alpha :as mf]))
|
[rumext.alpha :as mf]))
|
||||||
|
|
||||||
|
(mf/defc terms-login
|
||||||
|
[]
|
||||||
|
(let [show-all? (and cf/terms-of-service-uri cf/privacy-policy-uri)
|
||||||
|
show-terms? (some? cf/terms-of-service-uri)
|
||||||
|
show-privacy? (some? cf/privacy-policy-uri)]
|
||||||
|
|
||||||
|
(when show-all?
|
||||||
|
[:div.terms-login
|
||||||
|
(when show-terms?
|
||||||
|
[:a {:href cf/terms-of-service-uri :target "_blank"} "Terms of service"])
|
||||||
|
|
||||||
|
(when show-all?
|
||||||
|
[:span "and"])
|
||||||
|
|
||||||
|
(when show-privacy?
|
||||||
|
[:a {:href cf/privacy-policy-uri :target "_blank"} "Privacy policy"])])))
|
||||||
|
|
||||||
(mf/defc auth
|
(mf/defc auth
|
||||||
[{:keys [route] :as props}]
|
[{:keys [route] :as props}]
|
||||||
(let [section (get-in route [:data :name])
|
(let [section (get-in route [:data :name])
|
||||||
|
@ -48,7 +66,5 @@
|
||||||
:auth-recovery
|
:auth-recovery
|
||||||
[:& recovery-page {:params params}])
|
[:& recovery-page {:params params}])
|
||||||
|
|
||||||
[:div.terms-login
|
[:& terms-login {}]]]))
|
||||||
[:a {:href "https://penpot.app/terms.html" :target "_blank"} "Terms of service"]
|
|
||||||
[:span "and"]
|
|
||||||
[:a {:href "https://penpot.app/privacy.html" :target "_blank"} "Privacy policy"]]]]))
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue