feat(core): add open link in app to doc menu (#8597)

add "open in desktop app" menu item for editor

fix AF-1547
This commit is contained in:
pengx17
2024-10-29 05:49:49 +00:00
committed by Peng Xiao
parent 5690720652
commit 835fdc33c0
21 changed files with 222 additions and 117 deletions

View File

@@ -119,7 +119,7 @@ export class AuthService extends Service {
) {
track.$.$.auth.signIn({ method: 'magic-link' });
try {
const scheme = this.urlService.getClientSchema();
const scheme = this.urlService.getClientScheme();
const magicLinkUrlParams = new URLSearchParams();
if (redirectUrl) {
magicLinkUrlParams.set('redirect_uri', redirectUrl);

View File

@@ -23,14 +23,14 @@ const SUBSCRIPTION_CACHE_KEY = 'subscription:';
const getDefaultSubscriptionSuccessCallbackLink = (
plan: SubscriptionPlan | null,
schema?: string
scheme?: string
) => {
const path =
plan === SubscriptionPlan.AI ? '/ai-upgrade-success' : '/upgrade-success';
const urlString = getAffineCloudBaseUrl() + path;
const url = new URL(urlString);
if (schema) {
url.searchParams.set('schema', schema);
if (scheme) {
url.searchParams.set('scheme', scheme);
}
return url.toString();
};
@@ -133,7 +133,7 @@ export class SubscriptionStore extends Store {
input.successCallbackLink ||
getDefaultSubscriptionSuccessCallbackLink(
input.plan,
this.urlService.getClientSchema()
this.urlService.getClientScheme()
),
},
},