🔥 Remove login illustration flag

It is now a permament configuration
This commit is contained in:
Andrey Antukh 2024-03-21 10:17:43 +01:00
parent 4606785e5f
commit f8bfe249aa
3 changed files with 26 additions and 33 deletions

View file

@ -13,7 +13,6 @@
"A common flags that affects both: backend and frontend." "A common flags that affects both: backend and frontend."
[:enable-registration [:enable-registration
:enable-login-with-password :enable-login-with-password
:enable-login-illustration
:enable-feature-styles-v2]) :enable-feature-styles-v2])
(defn parse (defn parse

View file

@ -7,6 +7,7 @@
(ns app.main.ui.auth (ns app.main.ui.auth
(:require-macros [app.main.style :as stl]) (:require-macros [app.main.style :as stl])
(:require (:require
[app.common.data.macros :as dm]
[app.config :as cf] [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]]
@ -35,41 +36,39 @@
[:a {:href cf/privacy-policy-uri :target "_blank"} (tr "auth.privacy-policy")])]))) [:a {:href cf/privacy-policy-uri :target "_blank"} (tr "auth.privacy-policy")])])))
(mf/defc auth (mf/defc auth
[{:keys [route] :as props}] {::mf/props :obj}
(let [section (get-in route [:data :name]) [{:keys [route]}]
params (:query-params route) (let [section (dm/get-in route [:data :name])
show-illustration? (contains? cf/flags :login-illustration)] params (:query-params route)]
(mf/use-effect (mf/with-effect []
#(dom/set-html-title (tr "title.default"))) (dom/set-html-title (tr "title.default")))
[:main {:class (stl/css-case :auth-section true [:main {:class (stl/css :auth-section)}
:no-illustration (not show-illustration?))} [:div {:class (stl/css :login-illustration)}
(when show-illustration? i/login-illustration]
[:div {:class (stl/css :login-illustration)}
i/login-illustration])
[:section {:class (stl/css :auth-content)} [:section {:class (stl/css :auth-content)}
[:* [:a {:href "#/" :class (stl/css :logo-btn)} i/logo]
[:a {:href "#/" :class (stl/css :logo-btn)} i/logo] (case section
(case section :auth-register
:auth-register [:& register-page {:params params}]
[:& register-page {:params params}]
:auth-register-validate :auth-register-validate
[:& register-validate-page {:params params}] [:& register-validate-page {:params params}]
:auth-register-success :auth-register-success
[:& register-success-page {:params params}] [:& register-success-page {:params params}]
:auth-login :auth-login
[:& login-page {:params params}] [:& login-page {:params params}]
:auth-recovery-request :auth-recovery-request
[:& recovery-request-page] [:& recovery-request-page]
:auth-recovery :auth-recovery
[:& recovery-page {:params params}])] [:& recovery-page {:params params}])
(when (contains? #{:auth-login :auth-register} section) (when (or (= section :auth-login)
(= section :auth-register))
[:& terms-login])]])) [:& terms-login])]]))

View file

@ -17,11 +17,6 @@
width: 100%; width: 100%;
overflow: auto; overflow: auto;
&.no-illustration {
display: flex;
justify-content: center;
}
@media (max-width: 992px) { @media (max-width: 992px) {
display: flex; display: flex;
justify-content: center; justify-content: center;