fix(ui): restore brand on prohibited login page
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s
Assisted-by: Codex:GPT-5
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<!-- the logo -->
|
<!-- the logo -->
|
||||||
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}">
|
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}">
|
||||||
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.png" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.png" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
|
||||||
{{if or .PageIsSignIn (eq .Title (ctx.Locale.Tr "auth.forgot_password_title")) (eq .Title (ctx.Locale.Tr "auth.reset_password"))}}
|
{{if or .PageIsSignIn (eq .Title (ctx.Locale.Tr "auth.forgot_password_title")) (eq .Title (ctx.Locale.Tr "auth.reset_password")) (eq .Title (ctx.Locale.Tr "auth.prohibit_login"))}}
|
||||||
<span class="navbar-brand-copy" aria-hidden="true">
|
<span class="navbar-brand-copy" aria-hidden="true">
|
||||||
<strong>荣刻科技</strong>
|
<strong>荣刻科技</strong>
|
||||||
<small>RONCARVE TECHNOLOGY</small>
|
<small>RONCARVE TECHNOLOGY</small>
|
||||||
|
|||||||
@@ -67,6 +67,21 @@ func TestSignin(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestProhibitedLoginPageBrand(t *testing.T) {
|
||||||
|
defer tests.PrepareTestEnv(t)()
|
||||||
|
|
||||||
|
session := emptyTestSession(t)
|
||||||
|
req := NewRequestWithValues(t, "POST", "/user/login", map[string]string{
|
||||||
|
"user_name": "user37",
|
||||||
|
"password": userPassword,
|
||||||
|
})
|
||||||
|
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||||
|
|
||||||
|
doc := NewHTMLParser(t, resp.Body)
|
||||||
|
brand := strings.Join(strings.Fields(doc.doc.Find("#navbar-logo .navbar-brand-copy").Text()), " ")
|
||||||
|
assert.Equal(t, "荣刻科技 RONCARVE TECHNOLOGY", brand)
|
||||||
|
}
|
||||||
|
|
||||||
func TestSigninWithRememberMe(t *testing.T) {
|
func TestSigninWithRememberMe(t *testing.T) {
|
||||||
defer tests.PrepareTestEnv(t)()
|
defer tests.PrepareTestEnv(t)()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user