🐛 Hide register link in viewer login modal when registration is disabled (#11199)

The viewer's login-register modal always showed the Register link
regardless of the disable-registration server flag. The main login
page already gates this link on (contains? cf/flags :registration);
apply the same guard to the viewer modal to make the flag consistent
across all entry points.
This commit is contained in:
0xTHAC0 2026-08-25 18:40:09 +05:30 committed by GitHub
parent 57c0e81616
commit 0a3352927d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,7 @@
(:require-macros [app.main.style :as stl])
(:require
[app.common.logging :as log]
[app.config :as cf]
[app.main.data.modal :as modal]
[app.main.store :as st]
[app.main.ui.auth.login :refer [login-dialog*]]
@ -84,13 +85,14 @@
:class (stl/css :recovery-link)
:data-value "recovery-request"}
(tr "auth.forgot-password")]]
[:div {:class (stl/css :register)}
[:span {:class (stl/css :register-text)}
(tr "auth.register") " "]
[:a {:on-click set-section
:class (stl/css :register-link)
:data-value "register"}
(tr "auth.register-submit")]]]]
(when (contains? cf/flags :registration)
[:div {:class (stl/css :register)}
[:span {:class (stl/css :register-text)}
(tr "auth.register") " "]
[:a {:on-click set-section
:class (stl/css :register-link)
:data-value "register"}
(tr "auth.register-submit")]])]]
:register
[:div {:class (stl/css :form-container)}