upd: revert back to original, keep some modifications
This commit is contained in:
parent
335de75b66
commit
118e1e027e
|
@ -50,7 +50,6 @@ import * as os from '@/os.js';
|
|||
import { $i, login } from '@/account.js';
|
||||
import { i18n } from '@/i18n.js';
|
||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { appendQuery, query } from '@/scripts/url.js';
|
||||
|
||||
const props = defineProps<{
|
||||
session: string;
|
||||
|
@ -77,8 +76,9 @@ async function accept(): Promise<void> {
|
|||
if (props.callback) {
|
||||
const cbUrl = new URL(props.callback);
|
||||
if (['javascript:', 'file:', 'data:', 'mailto:', 'tel:'].includes(cbUrl.protocol)) throw new Error('invalid url');
|
||||
console.log(props.callback, props.session);
|
||||
location.href = appendQuery(props.callback, query({ session: props.session }));
|
||||
cbUrl.searchParams.set('session', props.session);
|
||||
console.log(cbUrl.href);
|
||||
location.href = cbUrl.href;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue