mirror of
https://github.com/SableClient/Sable.git
synced 2026-12-01 06:12:31 -08:00
fix unclickable handles and hard to see handles
Signed-off-by: Shea <[email protected]>
This commit is contained in:
6 files changed
+42
-25
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
default: patch
|
||||
---
|
||||
|
||||
Fix clickable handles
|
||||
@@ -318,28 +318,34 @@ function UserHeroNameInner({
|
||||
)}
|
||||
</Box>
|
||||
<Box alignItems="Center" gap="100" wrap="Wrap">
|
||||
<Text size="T200" className={classNames(BreakWord, LineClamp3)} title={username}>
|
||||
<Chip
|
||||
onClick={() => {
|
||||
if (username && server) {
|
||||
copyToClipboard(`@${username}:${server}`);
|
||||
isSuccess.current = true;
|
||||
} else isSuccess.current = false;
|
||||
setCopied();
|
||||
}}
|
||||
style={{ backgroundColor: 'transparent', padding: '0' }}
|
||||
onPointerEnter={() => setIsHovered(true)}
|
||||
onPointerLeave={() => setIsHovered(false)}
|
||||
before={`@${username}`}
|
||||
after={
|
||||
copied || isHovered ? (
|
||||
profileIcon(copied ? (isSuccess ? Check : CrossIcon) : CopyIcon)
|
||||
) : (
|
||||
<></>
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Text>
|
||||
<Chip
|
||||
onClick={(evt) => {
|
||||
evt.stopPropagation();
|
||||
if (username && server) {
|
||||
copyToClipboard(`@${username}:${server}`);
|
||||
isSuccess.current = true;
|
||||
} else isSuccess.current = false;
|
||||
setCopied();
|
||||
}}
|
||||
style={{ backgroundColor: 'transparent', color: 'inherit', padding: '0' }}
|
||||
onPointerEnter={() => setIsHovered(true)}
|
||||
onPointerLeave={() => setIsHovered(false)}
|
||||
before={
|
||||
<Text
|
||||
size="T200"
|
||||
className={classNames(BreakWord, LineClamp3)}
|
||||
title={username}
|
||||
truncate
|
||||
>{`@${username}`}</Text>
|
||||
}
|
||||
after={
|
||||
copied || isHovered ? (
|
||||
profileIcon(copied ? (isSuccess ? Check : CrossIcon) : CopyIcon)
|
||||
) : (
|
||||
<></>
|
||||
)
|
||||
}
|
||||
/>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
|
||||
@@ -579,7 +579,7 @@ export function UserRoomProfile({ userId, initialProfile }: Readonly<UserRoomPro
|
||||
padding: showCustomHeroCard && innerColor ? config.space.S200 : config.space.S300,
|
||||
}}
|
||||
>
|
||||
<Box gap="200" alignItems="Center" wrap="Wrap">
|
||||
<Box gap="200" alignItems="Center" wrap="Wrap" style={{ color: textColor }}>
|
||||
<UserHeroName
|
||||
displayName={displayName}
|
||||
userId={userId}
|
||||
|
||||
@@ -44,6 +44,7 @@ import { UseStateProvider } from '$components/UseStateProvider';
|
||||
import { FocusTrap } from 'focus-trap-react';
|
||||
import { LogoutDialog } from '$components/LogoutDialog';
|
||||
import { stopPropagation } from '$utils/keyboard';
|
||||
import { getMxIdServer } from '$utils/mxIdHelper';
|
||||
|
||||
export function ProfileMobile() {
|
||||
const mx = useMatrixClient();
|
||||
@@ -52,6 +53,7 @@ export function ProfileMobile() {
|
||||
const [oldSidebar] = useSetting(settingsAtom, 'oldSidebar');
|
||||
|
||||
const userId = mx.getUserId() ?? '';
|
||||
const server = getMxIdServer(userId);
|
||||
const profile = useUserProfile(userId);
|
||||
const presence = useUserPresence(userId);
|
||||
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
|
||||
@@ -167,7 +169,7 @@ export function ProfileMobile() {
|
||||
/>
|
||||
|
||||
<Box style={{ padding: `0 ${config.space.S400}` }}>
|
||||
<GlobalUserHeroName displayName={displayName} userId={userId} />
|
||||
<GlobalUserHeroName displayName={displayName} userId={userId} server={server} />
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ import {
|
||||
UserIcon,
|
||||
} from '@phosphor-icons/react';
|
||||
import * as css from './UserMenuTab.css';
|
||||
import { getMxIdServer } from '$utils/mxIdHelper';
|
||||
|
||||
const log = createLogger('AccountSwitcherTab');
|
||||
|
||||
@@ -643,6 +644,7 @@ export function UserMenuTab({ isBottom, isMobile }: { isBottom?: boolean; isMobi
|
||||
const navigate = useNavigate();
|
||||
|
||||
const userId = mx.getUserId() ?? '';
|
||||
const server = getMxIdServer(userId);
|
||||
const profile = useUserProfile(userId);
|
||||
const presence = useUserPresence(userId);
|
||||
const currentPresence = presence?.presence ?? Presence.Online;
|
||||
@@ -761,7 +763,7 @@ export function UserMenuTab({ isBottom, isMobile }: { isBottom?: boolean; isMobi
|
||||
allowEditing={true}
|
||||
/>
|
||||
<Box style={{ padding: `0 ${config.space.S400} 0` }}>
|
||||
<GlobalUserHeroName displayName={displayName} userId={userId} />
|
||||
<GlobalUserHeroName displayName={displayName} userId={userId} server={server} />
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
|
||||
@@ -55,6 +55,8 @@ export function UserQuickTools({
|
||||
<>
|
||||
<UserMenuTab isBottom />
|
||||
<Box
|
||||
shrink="No"
|
||||
grow="No"
|
||||
style={{
|
||||
gap: config.space.S300,
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user