mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-16 01:26:37 +08:00
feat(core): avoid popup window being blocked (#6451)
This commit is contained in:
@@ -2,5 +2,6 @@ export * from './create-emotion-cache';
|
||||
export * from './fractional-indexing';
|
||||
export * from './intl-formatter';
|
||||
export * from './mixpanel';
|
||||
export * from './popup';
|
||||
export * from './string2color';
|
||||
export * from './toast';
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export function popupWindow(target: string) {
|
||||
const url = new URL(runtimeConfig.serverUrlPrefix + '/redirect-proxy');
|
||||
url.searchParams.set('redirect_uri', target);
|
||||
|
||||
return window.open(url, '_blank', `noreferrer noopener`);
|
||||
}
|
||||
Reference in New Issue
Block a user