mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-21 14:40:58 -05:00
chore: clean up
This commit is contained in:
parent
890cb94acb
commit
d31237e9e1
31 changed files with 61 additions and 49 deletions
2
.env
2
.env
|
@ -1,2 +1,2 @@
|
|||
VITE_API_URL=http://local.revolt.chat:8000
|
||||
VITE_API_URL=https://api.revolt.chat
|
||||
VITE_THEMES_URL=https://themes.revolt.chat
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
"react-scroll": "^1.8.2",
|
||||
"react-virtualized-auto-sizer": "^1.0.5",
|
||||
"react-virtuoso": "^1.10.4",
|
||||
"revolt.js": "6.0.0-rc.15",
|
||||
"revolt.js": "6.0.0-rc.19",
|
||||
"rimraf": "^3.0.2",
|
||||
"sass": "^1.35.1",
|
||||
"shade-blend-color": "^1.0.0",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { API } from "revolt.js";
|
||||
import { Nullable } from "revolt.js/esm/util/null";
|
||||
import { Nullable } from "revolt.js";
|
||||
import styled, { css } from "styled-components/macro";
|
||||
|
||||
export interface IconBaseProps<T> {
|
||||
|
|
|
@ -23,7 +23,9 @@ export default function ConnectionStatus() {
|
|||
return (
|
||||
<Banner>
|
||||
<Text id="app.special.status.disconnected" /> <br />
|
||||
<a onClick={() => client.websocket.connect()}>Reconnect</a>
|
||||
<a onClick={() => client.websocket.connect()}>
|
||||
<Text id="app.special.status.reconnect" />
|
||||
</a>
|
||||
</Banner>
|
||||
);
|
||||
} else if (status === ClientStatus.CONNECTING) {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @ts-expect-error No typings.
|
||||
import rgba from "color-rgba";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Helmet } from "react-helmet";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* This file monitors changes to settings and syncs them to the server.
|
||||
*/
|
||||
import { ClientboundNotification } from "revolt.js/esm/websocket/notifications";
|
||||
import { ClientboundNotification } from "revolt.js";
|
||||
|
||||
import { useEffect } from "preact/hooks";
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import {
|
|||
import { Cog, UserVoice } from "@styled-icons/boxicons-solid";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { Channel, Message, Server, User, API } from "revolt.js";
|
||||
import { Permission, UserPermission } from "revolt.js/esm/api/permissions";
|
||||
import { Permission, UserPermission } from "revolt.js";
|
||||
|
||||
import {
|
||||
ContextMenuWithData,
|
||||
|
|
|
@ -9,8 +9,8 @@ import {
|
|||
LeftArrowAlt,
|
||||
} from "@styled-icons/boxicons-regular";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Channel } from "revolt.js/esm/maps/Channels";
|
||||
import { Server } from "revolt.js/esm/maps/Servers";
|
||||
import { Channel } from "revolt.js";
|
||||
import { Server } from "revolt.js";
|
||||
|
||||
import { ContextMenuWithData, MenuItem } from "preact-context-menu";
|
||||
import { Text } from "preact-i18n";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* eslint-disable react-hooks/rules-of-hooks */
|
||||
import { action, makeAutoObservable } from "mobx";
|
||||
import { Channel } from "revolt.js/esm/maps/Channels";
|
||||
import { Message } from "revolt.js/esm/maps/Messages";
|
||||
import { Nullable } from "revolt.js/esm/util/null";
|
||||
import { Channel } from "revolt.js";
|
||||
import { Message } from "revolt.js";
|
||||
import { Nullable } from "revolt.js";
|
||||
|
||||
import { SimpleRenderer } from "./simple/SimpleRenderer";
|
||||
import { RendererRoutines, ScrollState } from "./types";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Message } from "revolt.js/esm/maps/Messages";
|
||||
import { Message } from "revolt.js";
|
||||
|
||||
import { ChannelRenderer } from "./Singleton";
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { action, makeAutoObservable, runInAction } from "mobx";
|
||||
import { Channel } from "revolt.js/esm/maps/Channels";
|
||||
import { Nullable, toNullable } from "revolt.js/esm/util/null";
|
||||
import { Channel } from "revolt.js";
|
||||
import { Nullable, toNullable } from "revolt.js";
|
||||
|
||||
import type { ProduceType, VoiceUser } from "./Types";
|
||||
import type VoiceClient from "./VoiceClient";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { action, computed, makeAutoObservable, ObservableMap } from "mobx";
|
||||
import { API } from "revolt.js";
|
||||
import { Nullable } from "revolt.js/esm/util/null";
|
||||
import { Nullable } from "revolt.js";
|
||||
|
||||
import { mapToRecord } from "../../lib/conversion";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { action, computed, makeAutoObservable, ObservableMap } from "mobx";
|
||||
import { Channel } from "revolt.js/esm/maps/Channels";
|
||||
import { Message } from "revolt.js/esm/maps/Messages";
|
||||
import { Server } from "revolt.js/esm/maps/Servers";
|
||||
import { Channel } from "revolt.js";
|
||||
import { Message } from "revolt.js";
|
||||
import { Server } from "revolt.js";
|
||||
|
||||
import { mapToRecord } from "../../lib/conversion";
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { action, computed, makeAutoObservable } from "mobx";
|
||||
import { API } from "revolt.js";
|
||||
import { Client } from "revolt.js";
|
||||
import { Nullable } from "revolt.js/esm/util/null";
|
||||
import { Nullable } from "revolt.js";
|
||||
|
||||
import { isDebug } from "../../revision";
|
||||
import Persistent from "../interfaces/Persistent";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// @ts-expect-error No typings.
|
||||
import rgba from "color-rgba";
|
||||
import { makeAutoObservable, computed, action } from "mobx";
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Ghost } from "@styled-icons/boxicons-solid";
|
|||
import { reaction } from "mobx";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Redirect, useParams } from "react-router-dom";
|
||||
import { Channel as ChannelI } from "revolt.js/esm/maps/Channels";
|
||||
import { Channel as ChannelI } from "revolt.js";
|
||||
import styled from "styled-components/macro";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
|
|
|
@ -6,8 +6,8 @@ import {
|
|||
} from "@styled-icons/boxicons-regular";
|
||||
import { Notepad, Group } from "@styled-icons/boxicons-solid";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Channel } from "revolt.js/esm/maps/Channels";
|
||||
import { User } from "revolt.js/esm/maps/Users";
|
||||
import { Channel } from "revolt.js";
|
||||
import { User } from "revolt.js";
|
||||
import styled, { css } from "styled-components/macro";
|
||||
|
||||
import { isTouchscreenDevice } from "../../lib/isTouchscreenDevice";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { Channel } from "revolt.js/esm/maps/Channels";
|
||||
import { Channel } from "revolt.js";
|
||||
import styled from "styled-components/macro";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { runInAction } from "mobx";
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { useHistory, useParams } from "react-router-dom";
|
||||
import { animateScroll } from "react-scroll";
|
||||
import { Channel } from "revolt.js/esm/maps/Channels";
|
||||
import { Channel } from "revolt.js";
|
||||
import styled from "styled-components/macro";
|
||||
import useResizeObserver from "use-resize-observer";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Message } from "revolt.js/esm/maps/Messages";
|
||||
import { Message } from "revolt.js";
|
||||
import styled from "styled-components/macro";
|
||||
|
||||
import { useContext, useEffect, useState } from "preact/hooks";
|
||||
|
|
|
@ -3,8 +3,8 @@ import { X } from "@styled-icons/boxicons-regular";
|
|||
import isEqual from "lodash.isequal";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { API } from "revolt.js";
|
||||
import { Message as MessageI } from "revolt.js/esm/maps/Messages";
|
||||
import { Nullable } from "revolt.js/esm/util/null";
|
||||
import { Message as MessageI } from "revolt.js";
|
||||
import { Nullable } from "revolt.js";
|
||||
import styled from "styled-components/macro";
|
||||
import { decodeTime } from "ulid";
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import { X, Plus } from "@styled-icons/boxicons-regular";
|
|||
import { PhoneCall, Envelope, UserX } from "@styled-icons/boxicons-solid";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useHistory } from "react-router-dom";
|
||||
import { User } from "revolt.js/esm/maps/Users";
|
||||
import { User } from "revolt.js";
|
||||
|
||||
import styles from "./Friend.module.scss";
|
||||
import classNames from "classnames";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { ChevronRight } from "@styled-icons/boxicons-regular";
|
||||
import { UserDetail, MessageAdd, UserPlus } from "@styled-icons/boxicons-solid";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { User } from "revolt.js/esm/maps/Users";
|
||||
import { User } from "revolt.js";
|
||||
|
||||
import styles from "./Friend.module.scss";
|
||||
import classNames from "classnames";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { Channel } from "revolt.js/esm/maps/Channels";
|
||||
import { Channel } from "revolt.js";
|
||||
import styled from "styled-components/macro";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
import isEqual from "lodash.isequal";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Channel, API } from "revolt.js";
|
||||
import { DEFAULT_PERMISSION_DIRECT_MESSAGE } from "revolt.js/esm/api/permissions";
|
||||
import { DEFAULT_PERMISSION_DIRECT_MESSAGE } from "revolt.js";
|
||||
|
||||
import { Text } from "preact-i18n";
|
||||
import { useState } from "preact/hooks";
|
||||
|
||||
import { TextReact } from "../../../lib/i18n";
|
||||
|
||||
import { PermissionsLayout, Button, SpaceBetween, H1 } from "@revoltchat/ui";
|
||||
|
||||
import { PermissionList } from "../../../components/settings/roles/PermissionList";
|
||||
|
@ -75,7 +78,12 @@ export default observer(({ channel }: Props) => {
|
|||
return (
|
||||
<div>
|
||||
<SpaceBetween>
|
||||
<H1>Permissions for {currentRole.name}</H1>
|
||||
<H1>
|
||||
<TextReact
|
||||
id="app.settings.permissions.title"
|
||||
fields={{ role: currentRole.name }}
|
||||
/>
|
||||
</H1>
|
||||
<Button
|
||||
palette="secondary"
|
||||
disabled={isEqual(
|
||||
|
@ -83,7 +91,7 @@ export default observer(({ channel }: Props) => {
|
|||
currentValue,
|
||||
)}
|
||||
onClick={save}>
|
||||
Save
|
||||
<Text id="app.special.modals.actions.save" />
|
||||
</Button>
|
||||
</SpaceBetween>
|
||||
<PermissionList
|
||||
|
|
|
@ -4,7 +4,7 @@ import { LockAlt, HelpCircle } from "@styled-icons/boxicons-solid";
|
|||
import type { AxiosError } from "axios";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { API } from "revolt.js";
|
||||
import { User } from "revolt.js/esm/maps/Users";
|
||||
import { User } from "revolt.js";
|
||||
import styled from "styled-components/macro";
|
||||
|
||||
import styles from "./Panes.module.scss";
|
||||
|
|
|
@ -2,7 +2,7 @@ import { XCircle } from "@styled-icons/boxicons-regular";
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { Virtuoso } from "react-virtuoso";
|
||||
import { API } from "revolt.js";
|
||||
import { Server } from "revolt.js/esm/maps/Servers";
|
||||
import { Server } from "revolt.js";
|
||||
|
||||
import styles from "./Panes.module.scss";
|
||||
import { Text } from "preact-i18n";
|
||||
|
|
|
@ -2,8 +2,8 @@ import { ChevronDown } from "@styled-icons/boxicons-regular";
|
|||
import { isEqual } from "lodash";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Virtuoso } from "react-virtuoso";
|
||||
import { Member } from "revolt.js/esm/maps/Members";
|
||||
import { Server } from "revolt.js/esm/maps/Servers";
|
||||
import { Member } from "revolt.js";
|
||||
import { Server } from "revolt.js";
|
||||
|
||||
import styles from "./Panes.module.scss";
|
||||
import { Text } from "preact-i18n";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Markdown } from "@styled-icons/boxicons-logos";
|
||||
import isEqual from "lodash.isequal";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Server } from "revolt.js/esm/maps/Servers";
|
||||
import { Server } from "revolt.js";
|
||||
|
||||
import styles from "./Panes.module.scss";
|
||||
import { Text } from "preact-i18n";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import isEqual from "lodash.isequal";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Server } from "revolt.js/esm/maps/Servers";
|
||||
import { Server } from "revolt.js";
|
||||
|
||||
import { useMemo, useState } from "preact/hooks";
|
||||
|
||||
|
|
20
yarn.lock
20
yarn.lock
|
@ -1881,10 +1881,10 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@insertish/exponential-backoff@npm:3.1.0-patch.0":
|
||||
version: 3.1.0-patch.0
|
||||
resolution: "@insertish/exponential-backoff@npm:3.1.0-patch.0"
|
||||
checksum: 3fca4d1990ba7d8488e7e121928d89df166dadacf93c4f2dfb61e7145d903dcfc2679377289d4d5739176c5d0b76e043a18fa6191d5345d61286d0bc73b331e3
|
||||
"@insertish/exponential-backoff@npm:3.1.0-patch.2":
|
||||
version: 3.1.0-patch.2
|
||||
resolution: "@insertish/exponential-backoff@npm:3.1.0-patch.2"
|
||||
checksum: 510a531965965c8cc633a91653ca09ffa8408925eb403d07c072bed065ec8ce429b4fd42fb0639a3dbee73d300d4422c306ebaaab3292b06778a224a2b5b0bf1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
@ -3404,7 +3404,7 @@ __metadata:
|
|||
react-scroll: ^1.8.2
|
||||
react-virtualized-auto-sizer: ^1.0.5
|
||||
react-virtuoso: ^1.10.4
|
||||
revolt.js: 6.0.0-rc.15
|
||||
revolt.js: 6.0.0-rc.19
|
||||
rimraf: ^3.0.2
|
||||
sass: ^1.35.1
|
||||
shade-blend-color: ^1.0.0
|
||||
|
@ -6710,11 +6710,11 @@ __metadata:
|
|||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"revolt.js@npm:6.0.0-rc.15":
|
||||
version: 6.0.0-rc.15
|
||||
resolution: "revolt.js@npm:6.0.0-rc.15"
|
||||
"revolt.js@npm:6.0.0-rc.19":
|
||||
version: 6.0.0-rc.19
|
||||
resolution: "revolt.js@npm:6.0.0-rc.19"
|
||||
dependencies:
|
||||
"@insertish/exponential-backoff": 3.1.0-patch.0
|
||||
"@insertish/exponential-backoff": 3.1.0-patch.2
|
||||
"@insertish/isomorphic-ws": ^4.0.1
|
||||
axios: ^0.21.4
|
||||
eventemitter3: ^4.0.7
|
||||
|
@ -6726,7 +6726,7 @@ __metadata:
|
|||
revolt-api: 0.5.3-rc.15
|
||||
ulid: ^2.3.0
|
||||
ws: ^8.2.2
|
||||
checksum: 51260c43426029c0dd9336be3d7136f8b43803585a15a026922eee83b7a56fe821a8b4c08cbf00c18e78375142be543a6dd0f3432c3fdcd01f63c588af60a49b
|
||||
checksum: 8cbc4a40c10dce858cdd792be11681580e1fdb9ee48feeac9a826ae5e797496fe5c750a41ec3a4f5610c40197e7baea7b7ae109d8b0165938d845d0251bb7d66
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
|
Loading…
Reference in a new issue