diff --git a/external/lang b/external/lang index 755f35fc..099fb741 160000 --- a/external/lang +++ b/external/lang @@ -1 +1 @@ -Subproject commit 755f35fcdd769f15a68512403074a584441f3fc6 +Subproject commit 099fb74131c60955e8226ce0a290cb22e959d7d6 diff --git a/src/components/common/messaging/Message.tsx b/src/components/common/messaging/Message.tsx index 781c4e95..8c71ae63 100644 --- a/src/components/common/messaging/Message.tsx +++ b/src/components/common/messaging/Message.tsx @@ -32,6 +32,8 @@ function Message({ attachContext, message, contrast, content: replacement, head: const content = message.content as string; const head = preferHead || (message.replies && message.replies.length > 0); + const userContext = attachContext ? attachContextMenu('Menu', { user: message.author, contextualChannel: message.channel }) : undefined as any; // ! FIXME: tell fatal to make this type generic + return ( <> { message.replies?.map((message_id, index) => ) } @@ -44,12 +46,14 @@ function Message({ attachContext, message, contrast, content: replacement, head: onContextMenu={attachContext ? attachContextMenu('Menu', { message, contextualChannel: message.channel, queued }) : undefined}> { head ? - : + : } - { head && - + { head && + + + } { replacement ?? } diff --git a/src/components/common/messaging/MessageBase.tsx b/src/components/common/messaging/MessageBase.tsx index 435c2f11..de70edce 100644 --- a/src/components/common/messaging/MessageBase.tsx +++ b/src/components/common/messaging/MessageBase.tsx @@ -53,11 +53,19 @@ export default styled.div` color: var(--error); ` } - .author { + .detail { gap: 8px; display: flex; align-items: center; } + + .author { + cursor: pointer; + + &:hover { + text-decoration: underline; + } + } .copy { width: 0; @@ -89,6 +97,10 @@ export const MessageInfo = styled.div` color: var(--tertiary-foreground); } + svg { + cursor: pointer; + } + time { opacity: 0; } diff --git a/src/components/common/user/UserShort.tsx b/src/components/common/user/UserShort.tsx index 0dda8d3c..69a15fd3 100644 --- a/src/components/common/user/UserShort.tsx +++ b/src/components/common/user/UserShort.tsx @@ -2,8 +2,8 @@ import { User } from "revolt.js"; import UserIcon from "./UserIcon"; import { Text } from "preact-i18n"; -export function Username({ user }: { user?: User }) { - return { user?.username ?? }; +export function Username({ user, ...otherProps }: { user?: User } & JSX.HTMLAttributes) { + return { user?.username ?? }; } export default function UserShort({ user, size }: { user?: User, size?: number }) { diff --git a/src/components/markdown/Markdown.module.scss b/src/components/markdown/Markdown.module.scss index 2f13352a..de439a34 100644 --- a/src/components/markdown/Markdown.module.scss +++ b/src/components/markdown/Markdown.module.scss @@ -115,15 +115,23 @@ padding: 0 2px; cursor: pointer; user-select: none; - color: transparent; border-radius: 4px; + color: transparent; background: #151515; + > * { + opacity: 0; + } + &:global(.shown) { cursor: auto; user-select: all; color: var(--foreground); background: var(--secondary-background); + + > * { + opacity: 1; + } } } diff --git a/src/components/navigation/items/ButtonItem.tsx b/src/components/navigation/items/ButtonItem.tsx index 31c29fbe..42792b7b 100644 --- a/src/components/navigation/items/ButtonItem.tsx +++ b/src/components/navigation/items/ButtonItem.tsx @@ -97,8 +97,7 @@ export function ChannelButton({ active, alert, alertCount, channel, user, compac const { openScreen } = useIntermediate(); return ( -
diff --git a/src/lib/ContextMenus.tsx b/src/lib/ContextMenus.tsx index 358ed937..89bdf8f4 100644 --- a/src/lib/ContextMenus.tsx +++ b/src/lib/ContextMenus.tsx @@ -562,7 +562,7 @@ function ContextMenus(props: WithDispatcher) { } } - let id = server?._id ?? channel?._id ?? user?._id ?? message?._id; + let id = sid ?? cid ?? uid ?? message?._id; if (id) { pushDivider();