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;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .bot-mark {
 | 
			
		||||
    font-size: 1.2em;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  .display-name {
 | 
			
		||||
    display: flex;
 | 
			
		||||
    align-items: center;
 | 
			
		||||
    gap: 4px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  table.acct-fields {
 | 
			
		||||
    word-break: break-all;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,10 +38,12 @@ import {
 | 
			
		|||
  PlaylistAdd,
 | 
			
		||||
  Send,
 | 
			
		||||
  Share,
 | 
			
		||||
  SmartToy,
 | 
			
		||||
  SmartToySharp,
 | 
			
		||||
  Translate,
 | 
			
		||||
  Verified,
 | 
			
		||||
} from "@suid/icons-material";
 | 
			
		||||
import { Title } from "../material/typography";
 | 
			
		||||
import { Body2, Title } from "../material/typography";
 | 
			
		||||
import { useNavigate, useParams } from "@solidjs/router";
 | 
			
		||||
import { useSessionForAcctStr } from "../masto/clients";
 | 
			
		||||
import { resolveCustomEmoji } from "../masto/toot";
 | 
			
		||||
| 
						 | 
				
			
			@ -400,15 +402,21 @@ const Profile: Component = () => {
 | 
			
		|||
            }}
 | 
			
		||||
          ></Avatar>
 | 
			
		||||
          <div class="name-grp">
 | 
			
		||||
            <span
 | 
			
		||||
              ref={(e) =>
 | 
			
		||||
                createRenderEffect(() => (e.innerHTML = displayName()))
 | 
			
		||||
              }
 | 
			
		||||
              aria-label="Display name"
 | 
			
		||||
            ></span>
 | 
			
		||||
            <div class="display-name">
 | 
			
		||||
              <Show when={profile()?.bot}>
 | 
			
		||||
                <SmartToySharp class="bot-mark" aria-label="Bot" />
 | 
			
		||||
              </Show>
 | 
			
		||||
              <Body2
 | 
			
		||||
                component="span"
 | 
			
		||||
                ref={(e: HTMLElement) =>
 | 
			
		||||
                  createRenderEffect(() => (e.innerHTML = displayName()))
 | 
			
		||||
                }
 | 
			
		||||
                aria-label="Display name"
 | 
			
		||||
              ></Body2>
 | 
			
		||||
            </div>
 | 
			
		||||
            <span aria-label="Complete username">{fullUsername()}</span>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div>
 | 
			
		||||
          <div role="presentation">
 | 
			
		||||
            <Switch>
 | 
			
		||||
              <Match
 | 
			
		||||
                when={
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue