chore(refactor): delete context/revoltjs folder

This commit is contained in:
Paul Makles
2022-07-06 13:08:03 +01:00
parent fa9b02c71b
commit de4d644743
30 changed files with 77 additions and 161 deletions

View File

@@ -6,12 +6,11 @@ import styled from "styled-components/macro";
import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice";
import { getChannelName } from "../../context/revoltjs/util";
import { useStatusColour } from "../../components/common/user/UserIcon";
import UserStatus from "../../components/common/user/UserStatus";
import Markdown from "../../components/markdown/Markdown";
import { PageHeader } from "../../components/ui/Header";
import { ChannelName } from "../../controllers/client/jsx/ChannelName";
import { modalController } from "../../controllers/modals/ModalController";
import HeaderActions from "./actions/HeaderActions";
@@ -64,7 +63,6 @@ const Info = styled.div`
`;
export default observer(({ channel }: ChannelHeaderProps) => {
const name = getChannelName(channel);
let icon, recipient: User | undefined;
switch (channel.channel_type) {
case "SavedMessages":
@@ -85,7 +83,9 @@ export default observer(({ channel }: ChannelHeaderProps) => {
return (
<PageHeader icon={icon} withTransparency>
<Info>
<span className="name">{name}</span>
<span className="name">
<ChannelName channel={channel} />
</span>
{isTouchscreenDevice &&
channel.channel_type === "DirectMessage" && (
<>

View File

@@ -4,7 +4,7 @@ import styled from "styled-components/macro";
import { Text } from "preact-i18n";
import { getChannelName } from "../../../context/revoltjs/util";
import { ChannelName } from "../../../controllers/client/jsx/ChannelName";
const StartBase = styled.div`
margin: 18px 16px 10px 16px;
@@ -28,7 +28,9 @@ interface Props {
export default observer(({ channel }: Props) => {
return (
<StartBase>
<h1>{getChannelName(channel, true)}</h1>
<h1>
<ChannelName channel={channel} prefix />
</h1>
<h4>
<Text id="app.main.channel.start.group" />
</h4>