mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-06 17:11:55 +00:00
Make Typescript happy, testing CI build.
Adjust language names.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user