forked from Mirrors/gomuks
web/rightpanel: use border-bottom instead of hr for separators
This commit is contained in:
parent
b7cc6aff86
commit
bdae0c416f
3 changed files with 18 additions and 24 deletions
|
@ -91,6 +91,12 @@ div.right-panel-content.user {
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.userid, div.extended-profile, div.devices, div.user-moderation, div.mutual-rooms, div.errors {
|
||||||
|
border-bottom: 1px solid var(--border-color);
|
||||||
|
padding-bottom: .5rem;
|
||||||
|
margin-bottom: .5rem;
|
||||||
|
}
|
||||||
|
|
||||||
div.extended-profile {
|
div.extended-profile {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { PronounSet, UserProfile } from "@/api/types"
|
||||||
import { ensureArray, ensureString } from "@/util/validation.ts"
|
import { ensureArray, ensureString } from "@/util/validation.ts"
|
||||||
|
|
||||||
interface ExtendedProfileProps {
|
interface ExtendedProfileProps {
|
||||||
profile: UserProfile
|
profile: UserProfile | null
|
||||||
refreshProfile: () => void
|
refreshProfile: () => void
|
||||||
client: Client
|
client: Client
|
||||||
userID: string
|
userID: string
|
||||||
|
@ -105,9 +105,7 @@ const UserExtendedProfile = ({ profile, refreshProfile, client, userID }: Extend
|
||||||
|
|
||||||
const pronouns = ensureArray(profile["io.fsky.nyx.pronouns"]) as PronounSet[]
|
const pronouns = ensureArray(profile["io.fsky.nyx.pronouns"]) as PronounSet[]
|
||||||
const userTimeZone = ensureString(profile["us.cloke.msc4175.tz"])
|
const userTimeZone = ensureString(profile["us.cloke.msc4175.tz"])
|
||||||
return <>
|
return <div className="extended-profile">
|
||||||
<hr/>
|
|
||||||
<div className="extended-profile">
|
|
||||||
{userTimeZone && <ClockElement tz={userTimeZone} />}
|
{userTimeZone && <ClockElement tz={userTimeZone} />}
|
||||||
{userID === client.userID &&
|
{userID === client.userID &&
|
||||||
<SetTimeZoneElement tz={userTimeZone} client={client} refreshProfile={refreshProfile} />}
|
<SetTimeZoneElement tz={userTimeZone} client={client} refreshProfile={refreshProfile} />}
|
||||||
|
@ -116,7 +114,6 @@ const UserExtendedProfile = ({ profile, refreshProfile, client, userID }: Extend
|
||||||
<div>{pronouns.map(pronounSet => ensureString(pronounSet.summary)).join(", ")}</div>
|
<div>{pronouns.map(pronounSet => ensureString(pronounSet.summary)).join(", ")}</div>
|
||||||
</>}
|
</>}
|
||||||
</div>
|
</div>
|
||||||
</>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default UserExtendedProfile
|
export default UserExtendedProfile
|
||||||
|
|
|
@ -70,22 +70,13 @@ const UserInfo = ({ userID }: UserInfoProps) => {
|
||||||
</div>
|
</div>
|
||||||
<div className="displayname" title={displayname}>{displayname}</div>
|
<div className="displayname" title={displayname}>{displayname}</div>
|
||||||
<div className="userid" title={userID}>{userID}</div>
|
<div className="userid" title={userID}>{userID}</div>
|
||||||
{globalProfile && <UserExtendedProfile
|
<UserExtendedProfile profile={globalProfile} refreshProfile={refreshProfile} client={client} userID={userID}/>
|
||||||
profile={globalProfile} refreshProfile={refreshProfile} client={client} userID={userID}
|
|
||||||
/>}
|
|
||||||
<hr/>
|
|
||||||
<DeviceList client={client} room={roomCtx?.store} userID={userID}/>
|
<DeviceList client={client} room={roomCtx?.store} userID={userID}/>
|
||||||
<hr/>
|
|
||||||
{userID !== client.userID && <>
|
{userID !== client.userID && <>
|
||||||
<MutualRooms client={client} userID={userID}/>
|
<MutualRooms client={client} userID={userID}/>
|
||||||
<hr/>
|
|
||||||
<UserModeration client={client} room={roomCtx?.store} member={memberEvt} userID={userID}/>
|
<UserModeration client={client} room={roomCtx?.store} member={memberEvt} userID={userID}/>
|
||||||
<hr/>
|
|
||||||
</>}
|
</>}
|
||||||
{errors?.length ? <>
|
|
||||||
<UserInfoError errors={errors}/>
|
<UserInfoError errors={errors}/>
|
||||||
<hr/>
|
|
||||||
</> : null}
|
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue