mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 00:55:48 +01:00
upd: revert back to original, keep some modifications
This commit is contained in:
parent
335de75b66
commit
118e1e027e
1 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,6 @@ import * as os from '@/os.js';
|
||||||
import { $i, login } from '@/account.js';
|
import { $i, login } from '@/account.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import { appendQuery, query } from '@/scripts/url.js';
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
session: string;
|
session: string;
|
||||||
|
@ -77,8 +76,9 @@ async function accept(): Promise<void> {
|
||||||
if (props.callback) {
|
if (props.callback) {
|
||||||
const cbUrl = new URL(props.callback);
|
const cbUrl = new URL(props.callback);
|
||||||
if (['javascript:', 'file:', 'data:', 'mailto:', 'tel:'].includes(cbUrl.protocol)) throw new Error('invalid url');
|
if (['javascript:', 'file:', 'data:', 'mailto:', 'tel:'].includes(cbUrl.protocol)) throw new Error('invalid url');
|
||||||
console.log(props.callback, props.session);
|
cbUrl.searchParams.set('session', props.session);
|
||||||
location.href = appendQuery(props.callback, query({ session: props.session }));
|
console.log(cbUrl.href);
|
||||||
|
location.href = cbUrl.href;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue