feat: add open app route (#3899)

This commit is contained in:
Peng Xiao
2023-08-30 06:40:25 +08:00
committed by GitHub
parent 71b195d9a9
commit 800f3c3cb6
29 changed files with 486 additions and 104 deletions

View File

@@ -426,21 +426,30 @@
"com.affine.settings.profile.placeholder": "Input account name",
"com.affine.auth.sign.in": "Sign in",
"com.affine.auth.sign.up": "Sign up",
"com.affine.auth.desktop.signing.in": "Signing in...",
"com.affine.auth.desktop.signing.in.message": "Signing in with account <1></1>",
"com.affine.auth.sign.up.sent.email.subtitle": "Create your account",
"com.affine.auth.sign.sent.email.message.start": "An email with a magic link has been sent to ",
"com.affine.auth.sign.sent.email.message.end": " You can click the link to create an account automatically.",
"com.affine.auth.sign.up.success.title": "Your account has been created and youre now signed in!",
"com.affine.auth.sign.up.success.subtitle": "The app will automatically open or redirect to the web version. if you encounter any issues, you can also click the button below to manually open the AFFiNE app.",
"com.affine.auth.sign.up.success.subtitle": "The app will automatically open or redirect to the web version. If you encounter any issues, you can also click the button below to manually open the AFFiNE app.",
"com.affine.auth.page.sent.email.title": "Welcome to AFFiNE Cloud, you are almost there!",
"com.affine.auth.page.sent.email.subtitle": "Please set a password of 8-20 characters with both letters and numbers to continue signing up with ",
"com.affine.auth.later": "Later",
"com.affine.auth.open.affine": "Open AFFiNE",
"com.affine.auth.open.affine.prompt": "Opening <1>AFFiNE</1> app now",
"com.affine.auth.open.affine.try-again": "Try again",
"com.affine.auth.open.affine.download-app": "Download App",
"com.affine.auth.sign.in.sent.email.subtitle": "Confirm your email",
"com.affine.auth.sign.auth.code.message": "If you haven't received the email, please check your spam folder.",
"com.affine.auth.sign.auth.code.message.password": "If you haven't received the email, please check your spam folder. Or <1>sign in with password</1> instead.",
"com.affine.auth.password.error": "Invalid password",
"com.affine.auth.forget": "Forgot password",
"com.affine.auth.has.signed": " has signed in!",
"com.affine.auth.toast.title.signed-in": "Signed in",
"com.affine.auth.toast.message.signed-in": "You have been signed in, start to sync your data with AFFiNE Cloud!",
"com.affine.auth.toast.title.failed": "Unable to sign in",
"com.affine.auth.toast.message.failed": "Server error, please try again later.",
"com.affine.auth.signed.success.title": "Youre almost there!",
"com.affine.auth.signed.success.subtitle": "You have successfully signed in. The app will automatically open or redirect to the web version. if you encounter any issues, you can also click the button below to manually open the AFFiNE app.",
"com.affine.auth.reset.password": "Reset Password",

View File

@@ -173,7 +173,6 @@ export type UIHandlers = {
handleMinimizeApp: () => Promise<any>;
handleMaximizeApp: () => Promise<any>;
handleCloseApp: () => Promise<any>;
handleFinishLogin: () => Promise<void>;
getGoogleOauthCode: () => Promise<any>;
};
@@ -267,7 +266,10 @@ export interface WorkspaceEvents {
}
export interface UIEvents {
onFinishLogin: (fn: () => void) => () => void;
onStartLogin: (fn: (options: { email: string }) => void) => () => void;
onFinishLogin: (
fn: (result: { success: boolean; email: string }) => void
) => () => void;
}
export interface EventMap {