mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-05 23:25:44 -05:00
feat: add changelog entry for in-app reporting
This commit is contained in:
parent
a00d554f80
commit
58f35a2813
3 changed files with 26 additions and 2 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 79d9b042866d466f39e3f4d053833416137491f8
|
||||
Subproject commit 98592389def635f69f54afeef0a576405239a902
|
|
@ -3,6 +3,7 @@ type Element =
|
|||
| {
|
||||
type: "image";
|
||||
src: string;
|
||||
shadow?: boolean;
|
||||
};
|
||||
|
||||
export interface ChangelogPost {
|
||||
|
@ -29,6 +30,19 @@ export const changelogEntries: Record<number, ChangelogPost> = {
|
|||
"Other authentication methods coming later, stay tuned!",
|
||||
],
|
||||
},
|
||||
2: {
|
||||
date: new Date("2023-02-22T17:30:00.000Z"),
|
||||
title: "In-App Reporting Is Here",
|
||||
content: [
|
||||
"You can now report any user, server, or message directly from the app.",
|
||||
{
|
||||
type: "image",
|
||||
src: "https://autumn.revolt.chat/attachments/ZuDVIjGiCl61Pk9XGk5qfc8-idN9EnFAk55DUQp713/the.png",
|
||||
shadow: true,
|
||||
},
|
||||
"If you want to learn more about how we're making Revolt safer for you, check out our new blog post :point_right: [https://revolt.chat/posts/improving-user-safety](https://revolt.chat/posts/improving-user-safety)",
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export const changelogEntryArray = Object.keys(changelogEntries).map(
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { API, Message as MessageInterface, User } from "revolt.js";
|
||||
import styled from "styled-components";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
|
||||
|
@ -27,6 +28,13 @@ const USER_REASONS: API.UserReportReason[] = [
|
|||
"Underage",
|
||||
];
|
||||
|
||||
/**
|
||||
* Add padding to the message container
|
||||
*/
|
||||
const MessageContainer = styled.div`
|
||||
margin-block-end: 16px;
|
||||
`;
|
||||
|
||||
/**
|
||||
* Report creation modal
|
||||
*/
|
||||
|
@ -63,7 +71,9 @@ export default function ReportContent({
|
|||
selected: {
|
||||
element:
|
||||
target instanceof MessageInterface ? (
|
||||
<Message message={target} head />
|
||||
<MessageContainer>
|
||||
<Message message={target} head attachContext />
|
||||
</MessageContainer>
|
||||
) : target instanceof User ? (
|
||||
<Row centred>
|
||||
<UserShort user={target} size={32} />
|
||||
|
|
Loading…
Reference in a new issue