feat(@ui): migrate category / overline and header

This commit is contained in:
Paul Makles
2022-05-30 14:42:09 +01:00
parent 673efc0586
commit 68b9d5ea79
35 changed files with 187 additions and 384 deletions

View File

@@ -15,7 +15,7 @@ import styles from "./UserProfile.module.scss";
import { Localizer, Text } from "preact-i18n";
import { useContext, useEffect, useLayoutEffect, useState } from "preact/hooks";
import { Button, IconButton, Preloader } from "@revoltchat/ui";
import { Button, Category, Error, IconButton, Preloader } from "@revoltchat/ui";
import { noop } from "../../../lib/js";
@@ -28,7 +28,6 @@ import { Username } from "../../../components/common/user/UserShort";
import UserStatus from "../../../components/common/user/UserStatus";
import Markdown from "../../../components/markdown/Markdown";
import Modal from "../../../components/ui/Modal";
import Overline from "../../../components/ui/Overline";
import {
ClientStatus,
StatusContext,
@@ -278,19 +277,19 @@ export const UserProfile = observer(
<div>
{flags & 1 ? (
/** ! FIXME: i18n this area */
<Overline type="error" block>
User is suspended
</Overline>
<Category>
<Error error="User is suspended" />
</Category>
) : undefined}
{flags & 2 ? (
<Overline type="error" block>
User deleted their account
</Overline>
<Category>
<Error error="User deleted their account" />
</Category>
) : undefined}
{flags & 4 ? (
<Overline type="error" block>
User is banned
</Overline>
<Category>
<Error error="User is banned" />
</Category>
) : undefined}
{user.bot ? (
<>