mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-24 22:52:09 -05:00
Make Typescript happy, testing CI build.
Adjust language names.
This commit is contained in:
parent
17c09baf89
commit
b364fe50f6
7 changed files with 23 additions and 13 deletions
|
@ -118,7 +118,7 @@
|
|||
"react-virtualized-auto-sizer": "^1.0.5",
|
||||
"react-virtuoso": "^1.10.4",
|
||||
"redux": "^4.1.0",
|
||||
"revolt-api": "0.5.2-alpha.1",
|
||||
"revolt-api": "0.5.2-alpha.2",
|
||||
"revolt.js": "5.0.1-alpha.6-patch.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"sass": "^1.35.1",
|
||||
|
|
|
@ -93,8 +93,8 @@ export const Languages: { [key in Language]: LanguageEntry } = {
|
|||
de: { display: "Deutsch", emoji: "🇩🇪", i18n: "de" },
|
||||
el: { display: "Ελληνικά", emoji: "🇬🇷", i18n: "el" },
|
||||
es: { display: "Español", emoji: "🇪🇸", i18n: "es" },
|
||||
et: { display: "Eestlane", emoji: "🇪🇪", i18n: "et" },
|
||||
fi: { display: "Suomi", emoji: "🇫🇮", i18n: "fi" },
|
||||
et: { display: "eesti", emoji: "🇪🇪", i18n: "et" },
|
||||
fi: { display: "suomi", emoji: "🇫🇮", i18n: "fi" },
|
||||
fil: { display: "Pilipino", emoji: "🇵🇭", i18n: "fil", dayjs: "tl-ph" },
|
||||
fr: { display: "Français", emoji: "🇫🇷", i18n: "fr" },
|
||||
ga: { display: "Gaeilge", emoji: "🇮🇪", i18n: "ga" },
|
||||
|
|
|
@ -79,16 +79,16 @@ export type Screen =
|
|||
}
|
||||
|
||||
// Pop-overs
|
||||
| { id: "image_viewer"; attachment?: Attachment; embed?: EmbedImage }
|
||||
| { id: "modify_account"; field: "username" | "email" | "password" }
|
||||
| { id: "profile"; user_id: string }
|
||||
| { id: "channel_info"; channel: Channel }
|
||||
| { id: "pending_requests"; users: User[] }
|
||||
| {
|
||||
id: "user_picker";
|
||||
omit?: string[];
|
||||
callback: (users: string[]) => Promise<void>;
|
||||
}
|
||||
| { id: "image_viewer"; attachment?: Attachment; embed?: EmbedImage }
|
||||
| { id: "channel_info"; channel: Channel }
|
||||
| { id: "pending_requests"; users: User[] }
|
||||
| { id: "modify_account"; field: "username" | "email" | "password" }
|
||||
| {
|
||||
id: "server_identity";
|
||||
server: Server;
|
||||
|
|
|
@ -26,22 +26,30 @@ export default function Popovers() {
|
|||
|
||||
switch (screen.id) {
|
||||
case "profile":
|
||||
// @ts-expect-error someone figure this out :)
|
||||
return <UserProfile {...screen} onClose={onClose} />;
|
||||
case "user_picker":
|
||||
// @ts-expect-error someone figure this out :)
|
||||
return <UserPicker {...screen} onClose={onClose} />;
|
||||
case "image_viewer":
|
||||
return <ImageViewer {...screen} onClose={onClose} />;
|
||||
case "channel_info":
|
||||
// @ts-expect-error someone figure this out :)
|
||||
return <ChannelInfo {...screen} onClose={onClose} />;
|
||||
case "pending_requests":
|
||||
// @ts-expect-error someone figure this out :)
|
||||
return <PendingRequests {...screen} onClose={onClose} />;
|
||||
case "modify_account":
|
||||
// @ts-expect-error someone figure this out :)
|
||||
return <ModifyAccountModal onClose={onClose} {...screen} />;
|
||||
case "special_prompt":
|
||||
// @ts-expect-error someone figure this out :)
|
||||
return <SpecialPromptModal onClose={onClose} {...screen} />;
|
||||
case "special_input":
|
||||
// @ts-expect-error someone figure this out :)
|
||||
return <SpecialInputModal onClose={onClose} {...screen} />;
|
||||
case "server_identity":
|
||||
// @ts-expect-error someone figure this out :)
|
||||
return <ServerIdentityModal onClose={onClose} {...screen} />;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import { Children } from "../../types/Preact";
|
|||
import { useIntermediate } from "../intermediate/Intermediate";
|
||||
import { registerEvents, setReconnectDisallowed } from "./events";
|
||||
import { takeError } from "./util";
|
||||
import { Session } from "revolt-api/types/Auth";
|
||||
|
||||
export enum ClientStatus {
|
||||
INIT,
|
||||
|
@ -79,7 +80,7 @@ function Context({ auth, children }: Props) {
|
|||
const login = () =>
|
||||
dispatch({
|
||||
type: "LOGIN",
|
||||
session: client.session!, // This [null assertion] is ok, we should have a session by now. - insert's words
|
||||
session: client.session as Session,
|
||||
});
|
||||
|
||||
if (onboarding) {
|
||||
|
|
|
@ -32,7 +32,8 @@ interface Session {
|
|||
|
||||
export function Sessions() {
|
||||
const client = useContext(AppContext);
|
||||
const deviceId = client.session?.id;
|
||||
const deviceId =
|
||||
typeof client.session === "object" ? client.session.id : undefined;
|
||||
|
||||
const [sessions, setSessions] = useState<Session[] | undefined>(undefined);
|
||||
const [attemptingDelete, setDelete] = useState<string[]>([]);
|
||||
|
|
|
@ -3639,10 +3639,10 @@ reusify@^1.0.4:
|
|||
resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76"
|
||||
integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==
|
||||
|
||||
revolt-api@0.5.2-alpha.1:
|
||||
version "0.5.2-alpha.1"
|
||||
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.2-alpha.1.tgz#2164d04cd5581267ce59142557666bd386bc85c4"
|
||||
integrity sha512-3OrjYCDNPkJ+yO9d87NJvuUDAbungEbUfrfHlvFwV8hJze/RMkuYUTFWe1HyBMwBC7F/yWQK+2V7IoifC5STmw==
|
||||
revolt-api@0.5.2-alpha.2:
|
||||
version "0.5.2-alpha.2"
|
||||
resolved "https://registry.yarnpkg.com/revolt-api/-/revolt-api-0.5.2-alpha.2.tgz#a083b918c239d0b8967f8a2c7f10d6466d30d3d5"
|
||||
integrity sha512-Sm6YL7vjyt5fpq1kQCp1OtKdjmaH7lgeWON4YDOycb5Bc1hKc9vgRHS4FhGlie2ilrk9Sox3CdY0tCQ0ENcDSw==
|
||||
|
||||
revolt.js@5.0.1-alpha.6-patch.2:
|
||||
version "5.0.1-alpha.6-patch.2"
|
||||
|
|
Loading…
Reference in a new issue