mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-08 01:45:28 +00:00
chore(refactor): delete context/revoltjs folder
This commit is contained in:
@@ -4,9 +4,8 @@ import { Route, Switch, useHistory, useParams } from "react-router-dom";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
|
||||
import { getChannelName } from "../../context/revoltjs/util";
|
||||
|
||||
import { useClient } from "../../controllers/client/ClientController";
|
||||
import { ChannelName } from "../../controllers/client/jsx/ChannelName";
|
||||
import { GenericSettings } from "./GenericSettings";
|
||||
import Overview from "./channel/Overview";
|
||||
import Permissions from "./channel/Permissions";
|
||||
@@ -47,7 +46,7 @@ export default function ChannelSettings() {
|
||||
<GenericSettings
|
||||
pages={[
|
||||
{
|
||||
category: <div>{getChannelName(channel, true)}</div>,
|
||||
category: <ChannelName channel={channel} prefix />,
|
||||
id: "overview",
|
||||
icon: <InfoCircle size={20} />,
|
||||
title: (
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Button, Checkbox, InputBox } from "@revoltchat/ui";
|
||||
|
||||
import TextAreaAutoSize from "../../../lib/TextAreaAutoSize";
|
||||
|
||||
import { FileUploader } from "../../../context/revoltjs/FileUploads";
|
||||
import { FileUploader } from "../../../controllers/client/jsx/legacy/FileUploads";
|
||||
|
||||
interface Props {
|
||||
channel: Channel;
|
||||
|
||||
@@ -23,8 +23,6 @@ import { internalEmit } from "../../../lib/eventEmitter";
|
||||
import { useTranslation } from "../../../lib/i18n";
|
||||
import { stopPropagation } from "../../../lib/stopPropagation";
|
||||
|
||||
import { FileUploader } from "../../../context/revoltjs/FileUploads";
|
||||
|
||||
import AutoComplete, {
|
||||
useAutoComplete,
|
||||
} from "../../../components/common/AutoComplete";
|
||||
@@ -32,6 +30,7 @@ import CollapsibleSection from "../../../components/common/CollapsibleSection";
|
||||
import Tooltip from "../../../components/common/Tooltip";
|
||||
import UserIcon from "../../../components/common/user/UserIcon";
|
||||
import { useClient } from "../../../controllers/client/ClientController";
|
||||
import { FileUploader } from "../../../controllers/client/jsx/legacy/FileUploads";
|
||||
import { modalController } from "../../../controllers/modals/ModalController";
|
||||
|
||||
interface Data {
|
||||
|
||||
@@ -12,12 +12,11 @@ import { Button, LineDivider, Tip } from "@revoltchat/ui";
|
||||
import TextAreaAutoSize from "../../../lib/TextAreaAutoSize";
|
||||
import { useTranslation } from "../../../lib/i18n";
|
||||
|
||||
import { FileUploader } from "../../../context/revoltjs/FileUploads";
|
||||
|
||||
import AutoComplete, {
|
||||
useAutoComplete,
|
||||
} from "../../../components/common/AutoComplete";
|
||||
import { useSession } from "../../../controllers/client/ClientController";
|
||||
import { FileUploader } from "../../../controllers/client/jsx/legacy/FileUploads";
|
||||
import { UserProfile } from "../../../controllers/modals/components/legacy/UserProfile";
|
||||
|
||||
export const Profile = observer(() => {
|
||||
|
||||
@@ -9,10 +9,9 @@ import { useEffect, useState } from "preact/hooks";
|
||||
|
||||
import { IconButton, Preloader } from "@revoltchat/ui";
|
||||
|
||||
import { getChannelName } from "../../../context/revoltjs/util";
|
||||
|
||||
import UserIcon from "../../../components/common/user/UserIcon";
|
||||
import { Username } from "../../../components/common/user/UserShort";
|
||||
import { ChannelName } from "../../../controllers/client/jsx/ChannelName";
|
||||
|
||||
interface InnerProps {
|
||||
invite: API.Invite;
|
||||
@@ -33,7 +32,9 @@ const Inner = observer(({ invite, server, removeSelf }: InnerProps) => {
|
||||
<UserIcon target={user} size={24} />{" "}
|
||||
<Username user={user} showServerIdentity="both" />
|
||||
</span>
|
||||
<span>{channel ? getChannelName(channel, true) : "#??"}</span>
|
||||
<span>
|
||||
<ChannelName channel={channel} prefix />
|
||||
</span>
|
||||
<IconButton
|
||||
onClick={() => {
|
||||
setDelete(true);
|
||||
|
||||
@@ -12,8 +12,8 @@ import { Button, ComboBox, InputBox } from "@revoltchat/ui";
|
||||
import TextAreaAutoSize from "../../../lib/TextAreaAutoSize";
|
||||
import { noop } from "../../../lib/js";
|
||||
|
||||
import { FileUploader } from "../../../context/revoltjs/FileUploads";
|
||||
import { getChannelName } from "../../../context/revoltjs/util";
|
||||
import { ChannelName } from "../../../controllers/client/jsx/ChannelName";
|
||||
import { FileUploader } from "../../../controllers/client/jsx/legacy/FileUploads";
|
||||
|
||||
interface Props {
|
||||
server: Server;
|
||||
@@ -172,7 +172,7 @@ export const Overview = observer(({ server }: Props) => {
|
||||
)
|
||||
.map((channel) => (
|
||||
<option key={channel!._id} value={channel!._id}>
|
||||
{getChannelName(channel!, true)}
|
||||
<ChannelName channel={channel} prefix />
|
||||
</option>
|
||||
))}
|
||||
</ComboBox>
|
||||
|
||||
Reference in New Issue
Block a user