mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 17:35:28 +00:00
Port attachments and embeds.
This commit is contained in:
26
src/components/common/messaging/embed/EmbedMediaActions.tsx
Normal file
26
src/components/common/messaging/embed/EmbedMediaActions.tsx
Normal file
@@ -0,0 +1,26 @@
|
||||
import styles from './Embed.module.scss';
|
||||
import IconButton from '../../../ui/IconButton';
|
||||
import { ExternalLink } from '@styled-icons/feather';
|
||||
import { EmbedImage } from "revolt.js/dist/api/objects";
|
||||
|
||||
interface Props {
|
||||
embed: EmbedImage;
|
||||
}
|
||||
|
||||
export default function EmbedMediaActions({ embed }: Props) {
|
||||
const filename = embed.url.split('/').pop();
|
||||
|
||||
return (
|
||||
<div className={styles.actions}>
|
||||
<div className={styles.info}>
|
||||
<span className={styles.filename}>{filename}</span>
|
||||
<span className={styles.filesize}>{embed.width + 'x' + embed.height}</span>
|
||||
</div>
|
||||
<a href={embed.url} target="_blank">
|
||||
<IconButton>
|
||||
<ExternalLink size={24} />
|
||||
</IconButton>
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user