mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-21 09:31:17 -08:00
4 files changed
+39
-29
No files matched your search
@@ -123,7 +123,6 @@ export const SidebarItemBottom = recipe({
|
||||
base: [
|
||||
DefaultReset,
|
||||
{
|
||||
minHeight: toRem(30),
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
|
||||
@@ -670,37 +670,45 @@ export function UserMenuTab({ isBottom, isMobile }: { isBottom?: boolean; isMobi
|
||||
}
|
||||
|
||||
const cords = evt.currentTarget.getBoundingClientRect();
|
||||
setMenuAnchor((cur) => (cur ? undefined : cords));
|
||||
setMenuAnchor(() => cords);
|
||||
};
|
||||
|
||||
const handleCloseMenu = () => setMenuAnchor(undefined);
|
||||
|
||||
const isActive = (!!menuAnchor || profileSelected) && !isMobile;
|
||||
|
||||
return (
|
||||
<SidebarItem active={(!!menuAnchor || profileSelected) && !isMobile} isBottom={isBottom}>
|
||||
<Box direction="Column" alignItems="Center" onClick={handleToggle}>
|
||||
<SidebarAvatar
|
||||
as="button"
|
||||
onClick={handleToggle}
|
||||
size="400"
|
||||
style={{ overflow: 'visible' }}
|
||||
outlined={!isMobile}
|
||||
>
|
||||
<AvatarPresence badge={<PresenceBadge presence={currentPresence} size="200" />}>
|
||||
<SidebarAvatar
|
||||
size={isMobile ? '300' : '400'}
|
||||
as="button"
|
||||
onClick={handleToggle}
|
||||
outlined={!isMobile}
|
||||
>
|
||||
<UserAvatar
|
||||
userId={userId}
|
||||
src={avatarUrl}
|
||||
alt={userId}
|
||||
renderFallback={() => <Text size="H4">{nameInitials(displayName)}</Text>}
|
||||
/>
|
||||
</SidebarAvatar>
|
||||
</AvatarPresence>
|
||||
</SidebarAvatar>
|
||||
<SidebarItem active={isActive} isBottom={isBottom}>
|
||||
<Box
|
||||
direction="Column"
|
||||
alignItems="Center"
|
||||
onClick={handleToggle}
|
||||
style={
|
||||
isMobile
|
||||
? {
|
||||
height: '100%',
|
||||
justifyContent: 'Center',
|
||||
paddingTop: config.space.S100,
|
||||
gap: config.space.S100,
|
||||
}
|
||||
: {}
|
||||
}
|
||||
>
|
||||
<AvatarPresence badge={<PresenceBadge presence={currentPresence} size="200" />}>
|
||||
<SidebarAvatar
|
||||
size={isMobile ? '300' : '400'}
|
||||
as="button"
|
||||
onClick={handleToggle}
|
||||
outlined={!isMobile}
|
||||
>
|
||||
<UserAvatar
|
||||
userId={userId}
|
||||
src={avatarUrl}
|
||||
alt={userId}
|
||||
renderFallback={() => <Text size="H4">{nameInitials(displayName)}</Text>}
|
||||
/>
|
||||
</SidebarAvatar>
|
||||
</AvatarPresence>
|
||||
{isMobile && (
|
||||
<Text size="B300" priority="300">
|
||||
Account
|
||||
|
||||
@@ -7,6 +7,6 @@ export const UserQuickTools = style({
|
||||
zIndex: '1000',
|
||||
height: toRem(74),
|
||||
bottom: '0',
|
||||
padding: config.space.S300,
|
||||
padding: config.space.S0,
|
||||
borderTop: `${config.borderWidth.B300} solid ${color.Background.ContainerLine}`,
|
||||
});
|
||||
@@ -38,6 +38,7 @@ export function UserQuickTools({
|
||||
width: toRem(width ?? 100),
|
||||
position: 'absolute',
|
||||
right: '0',
|
||||
padding: `0 ${config.space.S300}`,
|
||||
}
|
||||
}
|
||||
>
|
||||
@@ -46,7 +47,9 @@ export function UserQuickTools({
|
||||
<MessageTab isBottom isMobile />
|
||||
<InboxTab isBottom isMobile />
|
||||
<NavigateTab isBottom isMobile />
|
||||
<UserMenuTab isBottom isMobile />
|
||||
<Box style={{ paddingTop: config.space.S0 }}>
|
||||
<UserMenuTab isBottom isMobile />
|
||||
</Box>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
|
||||
Reference in new issue
Block a user