mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-22 07:00:58 -05:00
chore(refactor): move RequiresOnline
into controllers
This commit is contained in:
parent
a2a52e237d
commit
8501e33103
7 changed files with 7 additions and 9 deletions
|
@ -7,9 +7,8 @@ import { useEffect, useState } from "preact/hooks";
|
||||||
|
|
||||||
import { Button, Preloader } from "@revoltchat/ui";
|
import { Button, Preloader } from "@revoltchat/ui";
|
||||||
|
|
||||||
import RequiresOnline from "../../../../context/revoltjs/RequiresOnline";
|
|
||||||
|
|
||||||
import { useClient } from "../../../../controllers/client/ClientController";
|
import { useClient } from "../../../../controllers/client/ClientController";
|
||||||
|
import RequiresOnline from "../../../../controllers/client/jsx/RequiresOnline";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
attachment: API.File;
|
attachment: API.File;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Text } from "preact-i18n";
|
||||||
|
|
||||||
import { Preloader } from "@revoltchat/ui";
|
import { Preloader } from "@revoltchat/ui";
|
||||||
|
|
||||||
import { useSession } from "../../controllers/client/ClientController";
|
import { useSession } from "../ClientController";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: Children;
|
children: Children;
|
|
@ -24,9 +24,9 @@ import { getRenderer } from "../../../lib/renderer/Singleton";
|
||||||
import { ScrollState } from "../../../lib/renderer/types";
|
import { ScrollState } from "../../../lib/renderer/types";
|
||||||
|
|
||||||
import { IntermediateContext } from "../../../context/intermediate/Intermediate";
|
import { IntermediateContext } from "../../../context/intermediate/Intermediate";
|
||||||
import RequiresOnline from "../../../context/revoltjs/RequiresOnline";
|
|
||||||
|
|
||||||
import { useSession } from "../../../controllers/client/ClientController";
|
import { useSession } from "../../../controllers/client/ClientController";
|
||||||
|
import RequiresOnline from "../../../controllers/client/jsx/RequiresOnline";
|
||||||
import ConversationStart from "./ConversationStart";
|
import ConversationStart from "./ConversationStart";
|
||||||
import MessageRenderer from "./MessageRenderer";
|
import MessageRenderer from "./MessageRenderer";
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,10 @@ import { ChannelRenderer } from "../../../lib/renderer/Singleton";
|
||||||
|
|
||||||
import { useApplicationState } from "../../../mobx/State";
|
import { useApplicationState } from "../../../mobx/State";
|
||||||
|
|
||||||
import RequiresOnline from "../../../context/revoltjs/RequiresOnline";
|
|
||||||
|
|
||||||
import Message from "../../../components/common/messaging/Message";
|
import Message from "../../../components/common/messaging/Message";
|
||||||
import { SystemMessage } from "../../../components/common/messaging/SystemMessage";
|
import { SystemMessage } from "../../../components/common/messaging/SystemMessage";
|
||||||
import { useClient } from "../../../controllers/client/ClientController";
|
import { useClient } from "../../../controllers/client/ClientController";
|
||||||
|
import RequiresOnline from "../../../controllers/client/jsx/RequiresOnline";
|
||||||
import ConversationStart from "./ConversationStart";
|
import ConversationStart from "./ConversationStart";
|
||||||
import MessageEditor from "./MessageEditor";
|
import MessageEditor from "./MessageEditor";
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ import { TextReact } from "../../lib/i18n";
|
||||||
|
|
||||||
import { useApplicationState } from "../../mobx/State";
|
import { useApplicationState } from "../../mobx/State";
|
||||||
|
|
||||||
import RequiresOnline from "../../context/revoltjs/RequiresOnline";
|
|
||||||
import { takeError } from "../../context/revoltjs/util";
|
import { takeError } from "../../context/revoltjs/util";
|
||||||
|
|
||||||
import ServerIcon from "../../components/common/ServerIcon";
|
import ServerIcon from "../../components/common/ServerIcon";
|
||||||
|
@ -21,6 +20,7 @@ import {
|
||||||
useClient,
|
useClient,
|
||||||
useSession,
|
useSession,
|
||||||
} from "../../controllers/client/ClientController";
|
} from "../../controllers/client/ClientController";
|
||||||
|
import RequiresOnline from "../../controllers/client/jsx/RequiresOnline";
|
||||||
|
|
||||||
export default function Invite() {
|
export default function Invite() {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
|
@ -16,10 +16,10 @@ import { Text } from "preact-i18n";
|
||||||
import { LineDivider } from "@revoltchat/ui";
|
import { LineDivider } from "@revoltchat/ui";
|
||||||
|
|
||||||
import { useIntermediate } from "../../context/intermediate/Intermediate";
|
import { useIntermediate } from "../../context/intermediate/Intermediate";
|
||||||
import RequiresOnline from "../../context/revoltjs/RequiresOnline";
|
|
||||||
|
|
||||||
import ButtonItem from "../../components/navigation/items/ButtonItem";
|
import ButtonItem from "../../components/navigation/items/ButtonItem";
|
||||||
import { useClient } from "../../controllers/client/ClientController";
|
import { useClient } from "../../controllers/client/ClientController";
|
||||||
|
import RequiresOnline from "../../controllers/client/jsx/RequiresOnline";
|
||||||
import { GenericSettings } from "./GenericSettings";
|
import { GenericSettings } from "./GenericSettings";
|
||||||
import { Bans } from "./server/Bans";
|
import { Bans } from "./server/Bans";
|
||||||
import { Categories } from "./server/Categories";
|
import { Categories } from "./server/Categories";
|
||||||
|
|
|
@ -34,7 +34,6 @@ import { LineDivider } from "@revoltchat/ui";
|
||||||
import { useApplicationState } from "../../mobx/State";
|
import { useApplicationState } from "../../mobx/State";
|
||||||
|
|
||||||
import { useIntermediate } from "../../context/intermediate/Intermediate";
|
import { useIntermediate } from "../../context/intermediate/Intermediate";
|
||||||
import RequiresOnline from "../../context/revoltjs/RequiresOnline";
|
|
||||||
|
|
||||||
import UserIcon from "../../components/common/user/UserIcon";
|
import UserIcon from "../../components/common/user/UserIcon";
|
||||||
import { Username } from "../../components/common/user/UserShort";
|
import { Username } from "../../components/common/user/UserShort";
|
||||||
|
@ -44,6 +43,7 @@ import {
|
||||||
useClient,
|
useClient,
|
||||||
clientController,
|
clientController,
|
||||||
} from "../../controllers/client/ClientController";
|
} from "../../controllers/client/ClientController";
|
||||||
|
import RequiresOnline from "../../controllers/client/jsx/RequiresOnline";
|
||||||
import { modalController } from "../../controllers/modals/ModalController";
|
import { modalController } from "../../controllers/modals/ModalController";
|
||||||
import { GIT_BRANCH, GIT_REVISION, REPO_URL } from "../../revision";
|
import { GIT_BRANCH, GIT_REVISION, REPO_URL } from "../../revision";
|
||||||
import { APP_VERSION } from "../../version";
|
import { APP_VERSION } from "../../version";
|
||||||
|
|
Loading…
Reference in a new issue