fix(message): re-added click to usericon

This commit is contained in:
trashtemp 2022-01-15 22:50:29 +01:00
parent 2bef311f9a
commit e6684b8f78
No known key found for this signature in database
GPG key ID: D1F0DB65081B0FC6
4 changed files with 45 additions and 3 deletions

View file

@ -133,6 +133,7 @@ const Message = observer(
<MessageInfo click={typeof head !== "undefined"}>
{head ? (
<UserIcon
className="avatar"
url={message.generateMasqAvatarURL()}
target={user}
size={36}

View file

@ -142,6 +142,14 @@ export const MessageInfo = styled.div<{ click: boolean }>`
flex-direction: row;
justify-content: center;
.avatar {
user-select: none;
cursor: pointer;
&:active {
transform: translateY(1px);
}
}
.copyBracket {
opacity: 0;
position: absolute;
@ -184,11 +192,11 @@ export const MessageInfo = styled.div<{ click: boolean }>`
color: var(--tertiary-foreground);
}
${(props) =>
/*${(props) =>
props.click &&
css`
cursor: pointer;
`}
`}*/
`;
export const MessageContent = styled.div`

View file

@ -1,3 +1,4 @@
import { Markdown } from "@styled-icons/boxicons-logos";
import isEqual from "lodash.isequal";
import { observer } from "mobx-react-lite";
import { Server } from "revolt.js/dist/maps/Servers";
@ -84,7 +85,7 @@ export const Overview = observer(({ server }: Props) => {
</h3>
<TextAreaAutoSize
maxRows={10}
minHeight={60}
minHeight={120}
maxLength={1024}
value={description}
placeholder={"Add a topic..."}
@ -93,6 +94,19 @@ export const Overview = observer(({ server }: Props) => {
if (!changed) setChanged(true);
}}
/>
<div className={styles.markdown}>
<Markdown size="24" />
<h5>
Descriptions support Markdown formatting,{" "}
<a
href="https://developers.revolt.chat/markdown"
target="_blank"
rel="noreferrer">
learn more here
</a>
.
</h5>
</div>
<hr />
<h3>
<Text id="app.main.servers.custom_banner" />

View file

@ -15,6 +15,25 @@
}
}
}
.markdown {
display: flex;
align-items: center;
margin-top: 8px;
gap: 4px;
svg {
flex-shrink: 0;
}
a:hover {
text-decoration: underline;
}
h5 {
margin: 0;
}
}
}
.userList {