mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-22 02:12:38 +01:00
some embed tweaks
This commit is contained in:
parent
32208f5ef3
commit
03a77f7c4f
@ -18,6 +18,7 @@ iframe {
|
||||
.embedImage {
|
||||
cursor: pointer;
|
||||
border-radius: 8px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.website {
|
||||
@ -100,6 +101,7 @@ iframe {
|
||||
|
||||
.embedDescription {
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
white-space: pre-wrap;
|
||||
|
@ -128,7 +128,6 @@ function EmbedMedia({ embed, width, height, thumbnail }: Props) {
|
||||
className={styles.embedImage}
|
||||
src={url}
|
||||
loading="lazy"
|
||||
style={{ width: "100%", height: "100%" }}
|
||||
onClick={() => {
|
||||
modalController.push({
|
||||
type: "image_viewer",
|
||||
@ -145,7 +144,7 @@ function EmbedMedia({ embed, width, height, thumbnail }: Props) {
|
||||
className={thumbnail ? styles.embedThumbnail : styles.embedImage}
|
||||
src={url}
|
||||
loading="lazy"
|
||||
style={{ width, height }}
|
||||
style={{ width: thumbnail ? width : undefined, height }}
|
||||
onClick={() => {
|
||||
modalController.push({
|
||||
type: "image_viewer",
|
||||
|
@ -11,7 +11,7 @@ import styles from "./Embed.module.css";
|
||||
import EmbedMedia from "./EmbedMedia";
|
||||
import { MESSAGE_AREA_PADDING, MessageAreaWidthContext } from "./MessageList";
|
||||
|
||||
const MAX_EMBED_WIDTH = 300;
|
||||
const MAX_EMBED_WIDTH = 400;
|
||||
const MAX_EMBED_HEIGHT = 640;
|
||||
const THUMBNAIL_MAX_WIDTH = 80;
|
||||
const CONTAINER_PADDING = 24;
|
||||
@ -108,7 +108,7 @@ function MessageEmbed({ embed }: Props) {
|
||||
className={styles.embedAuthorIcon}
|
||||
src={embed.author.icon_url}
|
||||
draggable={false}
|
||||
onError={(e) => (e.currentTarget.style.display = "none")}
|
||||
// onError={(e) => (e.currentTarget.style.display = "none")}
|
||||
/>
|
||||
)}
|
||||
{embed.author.url ? (
|
||||
@ -190,7 +190,7 @@ function MessageEmbed({ embed }: Props) {
|
||||
className={styles.embedFooterIcon}
|
||||
src={embed.footer.icon_url}
|
||||
draggable={false}
|
||||
onError={(e) => (e.currentTarget.style.display = "none")}
|
||||
// onError={(e) => (e.currentTarget.style.display = "none")}
|
||||
/>
|
||||
)}
|
||||
<span className={styles.embedFooterText}>
|
||||
|
Loading…
Reference in New Issue
Block a user