fix: further resolve sso sub ids issues

This commit is contained in:
Eli Bosley
2025-01-20 12:51:52 -05:00
parent 76a9ae9386
commit b3551a1b69
2 changed files with 5 additions and 5 deletions

View File

@@ -18,5 +18,5 @@ echo $wcExtractor->getScriptTagHtml();
?> ?>
<unraid-i18n-host> <unraid-i18n-host>
<unraid-sso-button ssoSubIds="<?= $serverState->ssoSubIds ?>"></unraid-sso-button> <unraid-sso-button subids="<?= $serverState->ssoSubIds ?>"></unraid-sso-button>
</unraid-i18n-host> </unraid-i18n-host>

View File

@@ -3,7 +3,7 @@ import Button from '~/components/Brand/Button.vue';
import { ACCOUNT } from '~/helpers/urls'; import { ACCOUNT } from '~/helpers/urls';
export interface Props { export interface Props {
ssoSubIds?: string; subids?: string;
} }
const props = defineProps<Props>(); const props = defineProps<Props>();
@@ -44,18 +44,18 @@ watch(queryParams, (newVal) => {
}); });
const externalSSOUrl = computed(() => { const externalSSOUrl = computed(() => {
if (props.ssoSubIds === undefined) { if (props.subids === undefined) {
return ''; return '';
} }
const url = new URL('sso', ACCOUNT); const url = new URL('sso', ACCOUNT);
url.searchParams.append('uids', props.ssoSubIds); url.searchParams.append('uids', props.subids);
url.searchParams.append('callbackUrl', window.location.href); url.searchParams.append('callbackUrl', window.location.href);
return url.toString(); return url.toString();
}); });
</script> </script>
<template> <template>
<template v-if="props.ssoSubIds"> <template v-if="props.subids">
<Button target="_blank" :href="externalSSOUrl">Sign In With Unraid.net Account</Button> <Button target="_blank" :href="externalSSOUrl">Sign In With Unraid.net Account</Button>
</template> </template>
</template> </template>