mirror of
https://github.com/revoltchat/revite.git
synced 2024-11-26 09:00:57 -05:00
Bump revolt.js to include rate limiter.
Handle new server flags. Show server ping in developer tab.
This commit is contained in:
parent
ffb0443bf6
commit
75ee61525f
5 changed files with 32 additions and 8 deletions
2
external/lang
vendored
2
external/lang
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit e728942ee8968472272e948d04074aacdcf643be
|
Subproject commit d5d5c388d9ce3eecb785b726e77b95e73947e1be
|
|
@ -121,7 +121,7 @@
|
||||||
"react-virtuoso": "^1.10.4",
|
"react-virtuoso": "^1.10.4",
|
||||||
"redux": "^4.1.0",
|
"redux": "^4.1.0",
|
||||||
"revolt-api": "0.5.3-alpha.0-patch.0",
|
"revolt-api": "0.5.3-alpha.0-patch.0",
|
||||||
"revolt.js": "5.1.0-alpha.1",
|
"revolt.js": "5.1.0-alpha.3",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"sass": "^1.35.1",
|
"sass": "^1.35.1",
|
||||||
"shade-blend-color": "^1.0.0",
|
"shade-blend-color": "^1.0.0",
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { Check } from "@styled-icons/boxicons-regular";
|
||||||
import { Cog } from "@styled-icons/boxicons-solid";
|
import { Cog } from "@styled-icons/boxicons-solid";
|
||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
@ -29,7 +30,7 @@ export default observer(({ server }: Props) => {
|
||||||
style={{
|
style={{
|
||||||
background: bannerURL ? `url('${bannerURL}')` : undefined,
|
background: bannerURL ? `url('${bannerURL}')` : undefined,
|
||||||
}}>
|
}}>
|
||||||
{server.owner === "01EX2NCWQ0CHS3QJF0FEQS1GR4" ? (
|
{server.flags && server.flags & 1 ? (
|
||||||
<Tooltip content={"Official Server"} placement={"bottom-start"}>
|
<Tooltip content={"Official Server"} placement={"bottom-start"}>
|
||||||
<svg width="20" height="20">
|
<svg width="20" height="20">
|
||||||
<image
|
<image
|
||||||
|
@ -50,6 +51,20 @@ export default observer(({ server }: Props) => {
|
||||||
</svg>
|
</svg>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : undefined}
|
) : undefined}
|
||||||
|
{server.flags && server.flags & 2 ? (
|
||||||
|
<Tooltip content={"Verified Server"} placement={"bottom-start"}>
|
||||||
|
<svg width="20" height="20">
|
||||||
|
<image
|
||||||
|
xlinkHref="/assets/badges/verified.svg"
|
||||||
|
height="20"
|
||||||
|
width="20"
|
||||||
|
/>
|
||||||
|
<foreignObject x="2" y="2" width="15" height="15">
|
||||||
|
<Check size={15} color="black" strokeWidth={8} />
|
||||||
|
</foreignObject>
|
||||||
|
</svg>
|
||||||
|
</Tooltip>
|
||||||
|
) : undefined}
|
||||||
|
|
||||||
<ServerName>{server.name}</ServerName>
|
<ServerName>{server.name}</ServerName>
|
||||||
{(server.permission & ServerPermission.ManageServer) > 0 && (
|
{(server.permission & ServerPermission.ManageServer) > 0 && (
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { Wrench } from "@styled-icons/boxicons-solid";
|
import { Wrench } from "@styled-icons/boxicons-solid";
|
||||||
|
|
||||||
import { useContext } from "preact/hooks";
|
import { useContext, useState } from "preact/hooks";
|
||||||
|
|
||||||
import PaintCounter from "../../lib/PaintCounter";
|
import PaintCounter from "../../lib/PaintCounter";
|
||||||
import { TextReact } from "../../lib/i18n";
|
import { TextReact } from "../../lib/i18n";
|
||||||
|
@ -11,8 +11,15 @@ import Header from "../../components/ui/Header";
|
||||||
|
|
||||||
export default function Developer() {
|
export default function Developer() {
|
||||||
// const voice = useContext(VoiceContext);
|
// const voice = useContext(VoiceContext);
|
||||||
|
|
||||||
const client = useContext(AppContext);
|
const client = useContext(AppContext);
|
||||||
const userPermission = client.user!.permission;
|
const userPermission = client.user!.permission;
|
||||||
|
const [ping, setPing] = useState<undefined | number>(client.websocket.ping);
|
||||||
|
|
||||||
|
setInterval(
|
||||||
|
() => setPing(client.websocket.ping),
|
||||||
|
client.options.heartbeat * 1e3,
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
@ -24,6 +31,8 @@ export default function Developer() {
|
||||||
<PaintCounter always />
|
<PaintCounter always />
|
||||||
</div>
|
</div>
|
||||||
<div style={{ padding: "16px" }}>
|
<div style={{ padding: "16px" }}>
|
||||||
|
<b>Server Ping:</b> {ping ?? "?"}ms
|
||||||
|
<br />
|
||||||
<b>User ID:</b> {client.user!._id} <br />
|
<b>User ID:</b> {client.user!._id} <br />
|
||||||
<b>Permission against self:</b> {userPermission} <br />
|
<b>Permission against self:</b> {userPermission} <br />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3659,10 +3659,10 @@ revolt-api@0.5.3-alpha.0-patch.0:
|
||||||
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.0-patch.0.tgz#158556832843bb06cb06a4df50ffca24ab64be3b"
|
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.3-alpha.0-patch.0.tgz#158556832843bb06cb06a4df50ffca24ab64be3b"
|
||||||
integrity sha512-76l+kGyrUy6uGMSIziyAHE27r9gD97OEh5gSzb2OJRsQM55TN0NurAsfFIEiB9hUzDDlwsXchtJiqdS4UVAwQw==
|
integrity sha512-76l+kGyrUy6uGMSIziyAHE27r9gD97OEh5gSzb2OJRsQM55TN0NurAsfFIEiB9hUzDDlwsXchtJiqdS4UVAwQw==
|
||||||
|
|
||||||
revolt.js@5.1.0-alpha.1:
|
revolt.js@5.1.0-alpha.3:
|
||||||
version "5.1.0-alpha.1"
|
version "5.1.0-alpha.3"
|
||||||
resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.1.tgz#0ac89eb67bb217ba270f3d3d5aa00621c9e69904"
|
resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.1.0-alpha.3.tgz#67ecc2165a0a3b87d329f92857133eaec7607b47"
|
||||||
integrity sha512-90B6QgfccvPDKu2vlZr2vxofkqWCHpdHrDTdieA0SkgIFZ0rJ+zIMv7YbWCToA+sh6OppH+7I5MP3suHs3AtSA==
|
integrity sha512-dDvNDtbc8tSyzJLLSCzQ62yof5SdFWllX5jFLY+xh+e3l6cgzIhQanf9go/32HycmG9pSTbDkXGRes+ByBxA1g==
|
||||||
dependencies:
|
dependencies:
|
||||||
axios "^0.19.2"
|
axios "^0.19.2"
|
||||||
eventemitter3 "^4.0.7"
|
eventemitter3 "^4.0.7"
|
||||||
|
|
Loading…
Reference in a new issue