mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 17:35:28 +00:00
chore(refactor): move and re-organise types folder
This commit is contained in:
@@ -16,7 +16,6 @@ import { I18nError } from "../../../context/Locale";
|
||||
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
||||
import { useClient } from "../../../context/revoltjs/RevoltClient";
|
||||
|
||||
import { Children } from "../../../types/Preact";
|
||||
import Markdown from "../../markdown/Markdown";
|
||||
import UserIcon from "../user/UserIcon";
|
||||
import { Username } from "../user/UserShort";
|
||||
|
||||
@@ -2,8 +2,6 @@ import styled from "styled-components/macro";
|
||||
|
||||
import { Ref } from "preact";
|
||||
|
||||
import { Children } from "../../../../types/Preact";
|
||||
|
||||
const Grid = styled.div<{ width: number; height: number }>`
|
||||
--width: ${(props) => props.width}px;
|
||||
--height: ${(props) => props.height}px;
|
||||
|
||||
@@ -149,12 +149,12 @@ function FileEntry({
|
||||
<EmptyEntry className="icon">
|
||||
<File size={36} />
|
||||
</EmptyEntry>
|
||||
<div class="overlay">
|
||||
<div className="overlay">
|
||||
<XCircle size={36} />
|
||||
</div>
|
||||
</PreviewBox>
|
||||
<span class="fn">{file.name}</span>
|
||||
<span class="size">{determineFileSize(file.size)}</span>
|
||||
<span className="fn">{file.name}</span>
|
||||
<span className="size">{determineFileSize(file.size)}</span>
|
||||
</Entry>
|
||||
);
|
||||
|
||||
@@ -169,13 +169,18 @@ function FileEntry({
|
||||
return (
|
||||
<Entry className={index >= CAN_UPLOAD_AT_ONCE ? "fade" : ""}>
|
||||
<PreviewBox onClick={remove}>
|
||||
<img class="icon" src={url} alt={file.name} loading="eager" />
|
||||
<div class="overlay">
|
||||
<img
|
||||
className="icon"
|
||||
src={url}
|
||||
alt={file.name}
|
||||
loading="eager"
|
||||
/>
|
||||
<div className="overlay">
|
||||
<XCircle size={36} />
|
||||
</div>
|
||||
</PreviewBox>
|
||||
<span class="fn">{file.name}</span>
|
||||
<span class="size">{determineFileSize(file.size)}</span>
|
||||
<span className="fn">{file.name}</span>
|
||||
<span className="size">{determineFileSize(file.size)}</span>
|
||||
</Entry>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -152,11 +152,11 @@ export default observer(({ channel, replies, setReplies }: Props) => {
|
||||
return (
|
||||
<Base key={reply.id}>
|
||||
<ReplyBase preview>
|
||||
<div class="replyto">
|
||||
<div className="replyto">
|
||||
<Text id="app.main.channel.reply.replying" />
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="username">
|
||||
<div className="content">
|
||||
<div className="username">
|
||||
<UserShort
|
||||
size={16}
|
||||
showServerIdentity
|
||||
@@ -164,7 +164,7 @@ export default observer(({ channel, replies, setReplies }: Props) => {
|
||||
masquerade={message.masquerade!}
|
||||
/>
|
||||
</div>
|
||||
<div class="message">
|
||||
<div className="message">
|
||||
{message.attachments && (
|
||||
<>
|
||||
<File size={16} />
|
||||
@@ -196,7 +196,7 @@ export default observer(({ channel, replies, setReplies }: Props) => {
|
||||
</div>
|
||||
</div>
|
||||
</ReplyBase>
|
||||
<span class="actions">
|
||||
<span className="actions">
|
||||
{message.author_id !== client.user!._id && (
|
||||
<IconButton
|
||||
onClick={() => {
|
||||
@@ -225,7 +225,7 @@ export default observer(({ channel, replies, setReplies }: Props) => {
|
||||
content={
|
||||
<Text id="app.main.channel.reply.toggle" />
|
||||
}>
|
||||
<span class="toggle">
|
||||
<span className="toggle">
|
||||
<At size={15} />
|
||||
<Text
|
||||
id={
|
||||
|
||||
@@ -20,7 +20,7 @@ export default function EmbedMediaActions({ embed }: Props) {
|
||||
</span>
|
||||
<a
|
||||
href={embed.url}
|
||||
class={styles.openIcon}
|
||||
className={styles.openIcon}
|
||||
target="_blank"
|
||||
rel="noreferrer">
|
||||
<IconButton>
|
||||
|
||||
Reference in New Issue
Block a user