mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-24 22:52:09 -05:00
Update to revolt.js 5.0.0-alpha.10
Fix member sidebar not showing on mobile.
This commit is contained in:
parent
bdd93e8840
commit
58d9744fad
6 changed files with 14 additions and 10 deletions
|
@ -97,7 +97,7 @@
|
|||
"react-router-dom": "^5.2.0",
|
||||
"react-scroll": "^1.8.2",
|
||||
"redux": "^4.1.0",
|
||||
"revolt.js": "5.0.0-alpha.7",
|
||||
"revolt.js": "5.0.0-alpha.10",
|
||||
"rimraf": "^3.0.2",
|
||||
"sass": "^1.35.1",
|
||||
"shade-blend-color": "^1.0.0",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { Link } from "react-router-dom";
|
||||
import { Link, useParams } from "react-router-dom";
|
||||
import { Presence } from "revolt-api/types/Users";
|
||||
import { Channel } from "revolt.js/dist/maps/Channels";
|
||||
import Members, { Member } from "revolt.js/dist/maps/Members";
|
||||
|
@ -31,7 +31,11 @@ import { GenericSidebarBase, GenericSidebarList } from "../SidebarBase";
|
|||
import { UserButton } from "../items/ButtonItem";
|
||||
import { ChannelDebugInfo } from "./ChannelDebugInfo";
|
||||
|
||||
export default function MemberSidebar({ channel }: { channel?: Channel }) {
|
||||
export default function MemberSidebar({ channel: obj }: { channel?: Channel }) {
|
||||
const { channel: channel_id } = useParams<{ channel: string }>();
|
||||
const client = useClient();
|
||||
const channel = obj ?? client.channels.get(channel_id);
|
||||
|
||||
switch (channel?.channel_type) {
|
||||
case "Group":
|
||||
return <GroupMemberSidebar channel={channel} />;
|
||||
|
|
|
@ -193,7 +193,7 @@ export const SpecialPromptModal = observer((props: SpecialProps) => {
|
|||
setProcessing(true);
|
||||
|
||||
try {
|
||||
props.target.deleteMessage();
|
||||
props.target.delete();
|
||||
onClose();
|
||||
} catch (err) {
|
||||
setError(takeError(err));
|
||||
|
|
|
@ -43,7 +43,7 @@ export const SimpleRenderer: RendererRoutines = {
|
|||
}
|
||||
},
|
||||
receive: async (renderer, message) => {
|
||||
if (message.channel !== renderer.channel) return;
|
||||
if (message.channel_id !== renderer.channel) return;
|
||||
if (renderer.state.type !== "RENDER") return;
|
||||
if (renderer.state.messages.find((x) => x._id === message._id)) return;
|
||||
if (!renderer.state.atBottom) return;
|
||||
|
|
|
@ -63,7 +63,7 @@ export default function MessageEditor({ message, finish }: Props) {
|
|||
target: message,
|
||||
});
|
||||
} else if (content !== message.content) {
|
||||
await message.editMessage({
|
||||
await message.edit({
|
||||
content,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -3570,10 +3570,10 @@ revolt-api@0.5.1-alpha.10-patch.0:
|
|||
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.1-alpha.10-patch.0.tgz#97d31bec7dfa4573567097443acb059c4feaac20"
|
||||
integrity sha512-UyM890HkGlYNQOxpHuEpUsJHLt8Ujnjg9/zPEDGpbvS4iy0jmHX23Hh8tOCfb/ewxbNrtT3G1HpSWKOneW/vYg==
|
||||
|
||||
revolt.js@5.0.0-alpha.7:
|
||||
version "5.0.0-alpha.7"
|
||||
resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.0.0-alpha.7.tgz#b84b424a20359b305a3d87627e82f6c7e7835c5b"
|
||||
integrity sha512-BH1px02kke5hDRvpnwEu7y09oYQxJm4ZKQdy8JRqBJ73LOQgYyEnmv0Jcumb9fwcGaBHZQKPErhlYDJtb37img==
|
||||
revolt.js@5.0.0-alpha.10:
|
||||
version "5.0.0-alpha.10"
|
||||
resolved "https://registry.yarnpkg.com/revolt.js/-/revolt.js-5.0.0-alpha.10.tgz#3fa1a8944a338134da09626278ee47b91f20ce2a"
|
||||
integrity sha512-b5nCQDtLUei4mfXhZNkIfQiyG8WDHBnpOVRaRaJz2ZjcQtdBjxIPXxOWkBYL7N/dBJ7sn5xgLMqra9UzkwkewA==
|
||||
dependencies:
|
||||
axios "^0.19.2"
|
||||
eventemitter3 "^4.0.7"
|
||||
|
|
Loading…
Reference in a new issue