diff --git a/deploy/server.ts b/deploy/server.ts index f3d2b9d2..2b0a2d07 100644 --- a/deploy/server.ts +++ b/deploy/server.ts @@ -9,7 +9,7 @@ import { fetch } from 'bun'; const distDir = path.join(__dirname, 'dist'); const indexPath = path.join(distDir, 'index.html'); const baseURL = process.env.AF_BASE_URL as string; -const defaultSite = 'https://appflowy.io'; +const defaultSite = 'https://appflowy.com'; const setOrUpdateMetaTag = ($: CheerioAPI, selector: string, attribute: string, content: string) => { if ($(selector).length === 0) { diff --git a/src/@types/translations/en.json b/src/@types/translations/en.json index 179b8332..373eb4ad 100644 --- a/src/@types/translations/en.json +++ b/src/@types/translations/en.json @@ -2991,7 +2991,7 @@ "second": "Unlimited pages & blocks", "three": "5 GB storage", "four": "Intelligent search", - "five": "20 AI responses", + "five": "10 AI responses", "six": "Mobile app", "seven": "Real-time collaboration" }, diff --git a/src/application/session/sign_in.ts b/src/application/session/sign_in.ts index 75892078..00a8da63 100644 --- a/src/application/session/sign_in.ts +++ b/src/application/session/sign_in.ts @@ -14,7 +14,7 @@ export const AUTH_CALLBACK_PATH = '/auth/callback'; export const AUTH_CALLBACK_URL = `${window.location.origin}${AUTH_CALLBACK_PATH}`; export function withSignIn() { - return function ( + return function( // eslint-disable-next-line _target: any, _propertyKey: string, @@ -23,14 +23,14 @@ export function withSignIn() { const originalMethod = descriptor.value; // eslint-disable-next-line - descriptor.value = async function (args: { redirectTo: string }) { + descriptor.value = async function(args: { redirectTo: string }) { const redirectTo = args.redirectTo; saveRedirectTo(redirectTo); try { await originalMethod.apply(this, [args]); - } catch (e) { + } catch(e) { console.error(e); return Promise.reject(e); } @@ -43,8 +43,15 @@ export function withSignIn() { export function afterAuth() { const redirectTo = getRedirectTo(); - if (redirectTo) { + if(redirectTo) { clearRedirectTo(); - window.location.href = decodeURIComponent(redirectTo); + const url = new URL(decodeURIComponent(redirectTo)); + const pathname = url.pathname; + + if(pathname === '/' || !pathname) { + url.pathname = '/app'; + } + + window.location.href = url.toString(); } } diff --git a/src/components/_shared/appflowy-power/AppFlowyPower.tsx b/src/components/_shared/appflowy-power/AppFlowyPower.tsx index 22fb0c8d..195702c3 100644 --- a/src/components/_shared/appflowy-power/AppFlowyPower.tsx +++ b/src/components/_shared/appflowy-power/AppFlowyPower.tsx @@ -20,7 +20,7 @@ function AppFlowyPower ({
{ - window.open('https://appflowy.io', '_blank'); + window.open('https://appflowy.com', '_blank'); }} style={{ width, diff --git a/src/components/_shared/help/Help.tsx b/src/components/_shared/help/Help.tsx index 2ad0c948..f555d197 100644 --- a/src/components/_shared/help/Help.tsx +++ b/src/components/_shared/help/Help.tsx @@ -72,7 +72,7 @@ export default function Help () { - +