mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 17:35:28 +00:00
chore: delete intermediate
This commit is contained in:
@@ -15,8 +15,6 @@ import { Text } from "preact-i18n";
|
||||
|
||||
import { LineDivider } from "@revoltchat/ui";
|
||||
|
||||
import { useIntermediate } from "../../context/intermediate/Intermediate";
|
||||
|
||||
import ButtonItem from "../../components/navigation/items/ButtonItem";
|
||||
import { useClient } from "../../controllers/client/ClientController";
|
||||
import RequiresOnline from "../../controllers/client/jsx/RequiresOnline";
|
||||
@@ -30,7 +28,6 @@ import { Overview } from "./server/Overview";
|
||||
import { Roles } from "./server/Roles";
|
||||
|
||||
export default observer(() => {
|
||||
const { openScreen } = useIntermediate();
|
||||
const { server: sid } = useParams<{ server: string }>();
|
||||
const client = useClient();
|
||||
const server = client.servers.get(sid);
|
||||
|
||||
@@ -33,8 +33,6 @@ import { LineDivider } from "@revoltchat/ui";
|
||||
|
||||
import { useApplicationState } from "../../mobx/State";
|
||||
|
||||
import { useIntermediate } from "../../context/intermediate/Intermediate";
|
||||
|
||||
import UserIcon from "../../components/common/user/UserIcon";
|
||||
import { Username } from "../../components/common/user/UserShort";
|
||||
import UserStatus from "../../components/common/user/UserStatus";
|
||||
@@ -121,7 +119,6 @@ const AccountHeader = styled.div`
|
||||
export default observer(() => {
|
||||
const history = useHistory();
|
||||
const client = useClient();
|
||||
const { openScreen } = useIntermediate();
|
||||
const experiments = useApplicationState().experiments;
|
||||
|
||||
function switchPage(to?: string) {
|
||||
|
||||
@@ -23,7 +23,6 @@ import { internalEmit } from "../../../lib/eventEmitter";
|
||||
import { useTranslation } from "../../../lib/i18n";
|
||||
import { stopPropagation } from "../../../lib/stopPropagation";
|
||||
|
||||
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
||||
import { FileUploader } from "../../../context/revoltjs/FileUploads";
|
||||
|
||||
import AutoComplete, {
|
||||
@@ -88,7 +87,6 @@ function BotCard({ bot, onDelete, onUpdate }: Props) {
|
||||
);
|
||||
const [interactionsRef, setInteractionsRef] =
|
||||
useState<HTMLInputElement | null>(null);
|
||||
const { writeClipboard, openScreen } = useIntermediate();
|
||||
|
||||
const [profile, setProfile] = useState<undefined | API.UserProfile>(
|
||||
undefined,
|
||||
@@ -267,7 +265,9 @@ function BotCard({ bot, onDelete, onUpdate }: Props) {
|
||||
}>
|
||||
<a
|
||||
onClick={() =>
|
||||
writeClipboard(user!._id)
|
||||
modalController.writeText(
|
||||
user!._id,
|
||||
)
|
||||
}>
|
||||
{user!._id}
|
||||
</a>
|
||||
@@ -335,7 +335,7 @@ function BotCard({ bot, onDelete, onUpdate }: Props) {
|
||||
<CategoryButton
|
||||
account
|
||||
icon={<Key size={24} />}
|
||||
onClick={() => writeClipboard(bot.token)}
|
||||
onClick={() => modalController.writeText(bot.token)}
|
||||
description={
|
||||
<>
|
||||
{"••••• "}
|
||||
@@ -475,7 +475,7 @@ function BotCard({ bot, onDelete, onUpdate }: Props) {
|
||||
<>
|
||||
<Button
|
||||
onClick={() =>
|
||||
writeClipboard(
|
||||
modalController.writeText(
|
||||
`${window.origin}/bot/${bot._id}`,
|
||||
)
|
||||
}>
|
||||
|
||||
@@ -14,8 +14,6 @@ import { useAutosave } from "../../../lib/debounce";
|
||||
import { Draggable, Droppable } from "../../../lib/dnd";
|
||||
import { noop } from "../../../lib/js";
|
||||
|
||||
import { useIntermediate } from "../../../context/intermediate/Intermediate";
|
||||
|
||||
import ChannelIcon from "../../../components/common/ChannelIcon";
|
||||
import { modalController } from "../../../controllers/modals/ModalController";
|
||||
|
||||
@@ -334,12 +332,9 @@ function ListElement({
|
||||
index: number;
|
||||
setTitle?: (title: string) => void;
|
||||
deleteSelf?: () => void;
|
||||
addChannel: (
|
||||
channel: Channel & { channel_type: "TextChannel" | "VoiceChannel" },
|
||||
) => void;
|
||||
addChannel: (channel: Channel) => void;
|
||||
draggable?: boolean;
|
||||
}) {
|
||||
const { openScreen } = useIntermediate();
|
||||
const [editing, setEditing] = useState<string>();
|
||||
const startEditing = () => setTitle && setEditing(category.title);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user