mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-08 14:03:24 +09:00
enhance(admin): show impersonation banner and keep password change with the user (#38924)
Follow-up to https://github.com/go-gitea/gitea/pull/38614 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
{{$banner := ctx.CurrentWebBanner}}
|
||||
{{if $banner}}
|
||||
<div class="ui info message web-banner-container">
|
||||
<div class="render-content markup web-banner-content">
|
||||
<div class="ui info message site-banner-container">
|
||||
<div class="render-content markup site-banner-content">
|
||||
{{ctx.RenderUtils.MarkdownToHtml $banner.ContentMessage}}
|
||||
</div>
|
||||
<button type="button" class="btn dismiss-banner link-action" aria-label="{{ctx.Locale.Tr "dismiss"}}" data-url="{{AppSubUrl}}/-/web-banner/dismiss">
|
||||
<button type="button" class="btn site-banner-close link-action" aria-label="{{ctx.Locale.Tr "dismiss"}}" data-url="{{AppSubUrl}}/-/web-banner/dismiss">
|
||||
{{svg "octicon-x"}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{{$impersonated := ctx.ImpersonatedUser}}
|
||||
{{if $impersonated}}
|
||||
<div class="ui warning message site-banner-container">
|
||||
<div class="flex-text-block site-banner-content">
|
||||
{{svg "octicon-alert"}}
|
||||
<span class="tw-flex-1">{{ctx.Locale.Tr "admin.users.impersonating_notice" $impersonated.Name}}</span>
|
||||
<a class="ui compact tiny button hover-opaque" href="{{AppSubUrl}}/user/logout">{{ctx.Locale.Tr "admin.users.impersonate_stop"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
@@ -178,4 +178,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
{{template "base/head_impersonate_banner"}}
|
||||
{{template "base/head_banner"}}
|
||||
|
||||
Reference in New Issue
Block a user