2021-06-19 20:24:11 +01:00
|
|
|
import { useContext } from "preact/hooks";
|
2021-06-20 17:31:53 +01:00
|
|
|
import { TextReact } from "../../lib/i18n";
|
2021-06-19 20:24:11 +01:00
|
|
|
import Header from "../../components/ui/Header";
|
|
|
|
import PaintCounter from "../../lib/PaintCounter";
|
|
|
|
import { AppContext } from "../../context/revoltjs/RevoltClient";
|
|
|
|
import { useUserPermission } from "../../context/revoltjs/hooks";
|
|
|
|
|
|
|
|
export default function Developer() {
|
|
|
|
// const voice = useContext(VoiceContext);
|
|
|
|
const client = useContext(AppContext);
|
|
|
|
const userPermission = useUserPermission(client.user!._id);
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<Header placement="primary">Developer Tab</Header>
|
|
|
|
<div style={{ padding: "16px" }}>
|
|
|
|
<PaintCounter always />
|
|
|
|
</div>
|
|
|
|
<div style={{ padding: "16px" }}>
|
|
|
|
<b>User ID:</b> {client.user!._id} <br/>
|
|
|
|
<b>Permission against self:</b> {userPermission} <br/>
|
|
|
|
</div>
|
2021-06-20 17:31:53 +01:00
|
|
|
<div style={{ padding: "16px" }}>
|
|
|
|
<TextReact id="login.open_mail_provider" fields={{ provider: <b>GAMING!</b> }} />
|
|
|
|
</div>
|
2021-06-19 20:24:11 +01:00
|
|
|
<div style={{ padding: "16px" }}>
|
|
|
|
{/*<span>
|
|
|
|
<b>Voice Status:</b> {VoiceStatus[voice.status]}
|
|
|
|
</span>
|
|
|
|
<br />
|
|
|
|
<span>
|
|
|
|
<b>Voice Room ID:</b> {voice.roomId || "undefined"}
|
|
|
|
</span>
|
|
|
|
<br />
|
|
|
|
<span>
|
|
|
|
<b>Voice Participants:</b> [
|
|
|
|
{Array.from(voice.participants.keys()).join(", ")}]
|
|
|
|
</span>
|
|
|
|
<br />*/}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|