feat: admin impersonates a user (#38614)

* fix #3631
* fix #21599

by the way, refactored the "profile avatar card" to simplify the code.
This commit is contained in:
wxiaoguang
2026-07-27 01:26:02 +08:00
committed by GitHub
parent 470d34b1de
commit a3caf21440
18 changed files with 278 additions and 238 deletions
+2 -65
View File
@@ -1,63 +1,14 @@
.user.profile .ui.card .header {
display: block;
font-weight: var(--font-weight-semibold);
font-size: 1.3rem;
margin-top: -0.2rem;
line-height: 1.3rem;
}
.user.profile .ui.card .profile-avatar-name {
border-top: none;
text-align: center;
}
.user.profile .ui.card .extra.content {
padding: 0;
}
.user.profile .ui.card .extra.content > ul {
margin: 0;
padding: 0;
}
.user.profile .ui.card .extra.content > ul > li {
padding: 10px;
display: flex;
list-style: none;
align-items: center;
gap: 0.25em;
}
.user.profile .ui.card .extra.content > ul > li:not(:last-child) {
border-bottom: 1px solid var(--color-secondary);
}
.user.profile .ui.card .extra.content > ul > li.follow .ui.button {
width: 100%;
}
.user.profile .ui.card #profile-avatar {
padding: 1rem 1rem 0.25rem;
justify-content: center;
}
.user.profile .ui.card #profile-avatar img {
.user.profile img.profile-avatar-image {
max-width: 100%;
height: auto;
}
@media (max-width: 767.98px) {
.user.profile .ui.card #profile-avatar img {
.user.profile img.profile-avatar-image {
width: 30vw;
}
}
@media (max-width: 767.98px) {
.user.profile .ui.card {
width: 100%;
}
}
.user.profile .ui.secondary.stackable.pointing.menu {
flex-wrap: wrap;
}
@@ -77,20 +28,6 @@
padding-bottom: 5px;
}
.user-orgs {
display: flex;
flex-flow: row wrap;
padding: 0;
margin: -3px !important;
}
.user-orgs > li {
display: flex;
border-bottom: 0 !important;
padding: 3px !important;
max-width: 60px;
}
.user-badges {
display: flex;
flex-wrap: wrap;