Profile: supports bot mark
This commit is contained in:
parent
456cfdfbb0
commit
bda41f0923
2 changed files with 26 additions and 8 deletions
|
@ -38,6 +38,16 @@
|
||||||
flex-flow: column nowrap;
|
flex-flow: column nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bot-mark {
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.display-name {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
table.acct-fields {
|
table.acct-fields {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
|
|
||||||
|
|
|
@ -38,10 +38,12 @@ import {
|
||||||
PlaylistAdd,
|
PlaylistAdd,
|
||||||
Send,
|
Send,
|
||||||
Share,
|
Share,
|
||||||
|
SmartToy,
|
||||||
|
SmartToySharp,
|
||||||
Translate,
|
Translate,
|
||||||
Verified,
|
Verified,
|
||||||
} from "@suid/icons-material";
|
} from "@suid/icons-material";
|
||||||
import { Title } from "../material/typography";
|
import { Body2, Title } from "../material/typography";
|
||||||
import { useNavigate, useParams } from "@solidjs/router";
|
import { useNavigate, useParams } from "@solidjs/router";
|
||||||
import { useSessionForAcctStr } from "../masto/clients";
|
import { useSessionForAcctStr } from "../masto/clients";
|
||||||
import { resolveCustomEmoji } from "../masto/toot";
|
import { resolveCustomEmoji } from "../masto/toot";
|
||||||
|
@ -400,15 +402,21 @@ const Profile: Component = () => {
|
||||||
}}
|
}}
|
||||||
></Avatar>
|
></Avatar>
|
||||||
<div class="name-grp">
|
<div class="name-grp">
|
||||||
<span
|
<div class="display-name">
|
||||||
ref={(e) =>
|
<Show when={profile()?.bot}>
|
||||||
createRenderEffect(() => (e.innerHTML = displayName()))
|
<SmartToySharp class="bot-mark" aria-label="Bot" />
|
||||||
}
|
</Show>
|
||||||
aria-label="Display name"
|
<Body2
|
||||||
></span>
|
component="span"
|
||||||
|
ref={(e: HTMLElement) =>
|
||||||
|
createRenderEffect(() => (e.innerHTML = displayName()))
|
||||||
|
}
|
||||||
|
aria-label="Display name"
|
||||||
|
></Body2>
|
||||||
|
</div>
|
||||||
<span aria-label="Complete username">{fullUsername()}</span>
|
<span aria-label="Complete username">{fullUsername()}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div role="presentation">
|
||||||
<Switch>
|
<Switch>
|
||||||
<Match
|
<Match
|
||||||
when={
|
when={
|
||||||
|
|
Loading…
Reference in a new issue