mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 22:53:07 +02:00
upd: use computed on permissions
This commit is contained in:
parent
4856699bd6
commit
335de75b66
1 changed files with 2 additions and 1 deletions
|
@ -60,7 +60,7 @@ const props = defineProps<{
|
|||
permission: string; // コンマ区切り
|
||||
}>();
|
||||
|
||||
const _permissions = props.permission ? props.permission.split(',') : [];
|
||||
const _permissions = $computed(() => props.permission ? props.permission.split(',') : []);
|
||||
|
||||
let state = $ref<string | null>(null);
|
||||
|
||||
|
@ -77,6 +77,7 @@ 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 }));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue