forked from abner/for-legacy-web
Fix: "Modify Account" did not have access to client
This commit is contained in:
@@ -15,7 +15,6 @@ export type Screen =
|
||||
| { id: "signed_out" }
|
||||
| { id: "error"; error: string }
|
||||
| { id: "clipboard"; text: string }
|
||||
| { id: "modify_account"; field: "username" | "email" | "password" }
|
||||
| { id: "_prompt"; question: Children; content?: Children; actions: Action[] }
|
||||
| ({ id: "special_prompt" } & (
|
||||
{ type: "leave_group", target: Channels.GroupChannel } |
|
||||
@@ -49,6 +48,7 @@ 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_id: string }
|
||||
| {
|
||||
|
||||
@@ -6,7 +6,6 @@ import { PromptModal } from "./modals/Prompt";
|
||||
import { SignedOutModal } from "./modals/SignedOut";
|
||||
import { ClipboardModal } from "./modals/Clipboard";
|
||||
import { OnboardingModal } from "./modals/Onboarding";
|
||||
import { ModifyAccountModal } from "./modals/ModifyAccount";
|
||||
|
||||
export interface Props {
|
||||
screen: Screen;
|
||||
@@ -27,8 +26,6 @@ export default function Modals({ screen, openScreen }: Props) {
|
||||
return <SignedOutModal onClose={onClose} {...screen} />;
|
||||
case "clipboard":
|
||||
return <ClipboardModal onClose={onClose} {...screen} />;
|
||||
case "modify_account":
|
||||
return <ModifyAccountModal onClose={onClose} {...screen} />;
|
||||
case "onboarding":
|
||||
return <OnboardingModal onClose={onClose} {...screen} />;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { SpecialPromptModal } from "./modals/Prompt";
|
||||
import { UserProfile } from "./popovers/UserProfile";
|
||||
import { ImageViewer } from "./popovers/ImageViewer";
|
||||
import { ChannelInfo } from "./popovers/ChannelInfo";
|
||||
import { ModifyAccountModal } from "./popovers/ModifyAccount";
|
||||
|
||||
export default function Popovers() {
|
||||
const { screen } = useContext(IntermediateContext);
|
||||
@@ -23,6 +24,8 @@ export default function Popovers() {
|
||||
return <ImageViewer {...screen} onClose={onClose} />;
|
||||
case "channel_info":
|
||||
return <ChannelInfo {...screen} onClose={onClose} />;
|
||||
case "modify_account":
|
||||
return <ModifyAccountModal onClose={onClose} {...screen} />;
|
||||
case "special_prompt":
|
||||
return <SpecialPromptModal onClose={onClose} {...screen} />;
|
||||
case "special_input":
|
||||
|
||||
Reference in New Issue
Block a user