@{account.handle}
{account.email}
@@ -202,7 +204,9 @@
cursor: pointer;
text-align: left;
width: 100%;
- transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
+ transition:
+ border-color var(--transition-fast),
+ box-shadow var(--transition-fast);
}
.account-item:hover:not(.disabled) {
diff --git a/frontend/src/routes/OAuthConsent.svelte b/frontend/src/routes/OAuthConsent.svelte
index 2123f13..5486456 100644
--- a/frontend/src/routes/OAuthConsent.svelte
+++ b/frontend/src/routes/OAuthConsent.svelte
@@ -57,12 +57,7 @@
const data: ConsentData = await response.json()
consentData = data
- scopeSelections = Object.fromEntries(
- data.scopes.map((scope) => [
- scope.scope,
- scope.required ? true : scope.granted ?? true,
- ])
- )
+ scopeSelections = Object.fromEntries(data.scopes.map((scope) => [scope.scope, scope.required ? true : (scope.granted ?? true)]))
if (!data.show_consent) {
await submitConsent()
@@ -93,8 +88,8 @@
body: JSON.stringify({
request_uri: consentData.request_uri,
approved_scopes: approvedScopes,
- remember: rememberChoice,
- }),
+ remember: rememberChoice
+ })
})
if (!response.ok) {
@@ -107,6 +102,11 @@
const data = await response.json()
if (data.redirect_uri) {
window.location.href = data.redirect_uri
+ const a = document.createElement('a')
+ a.href = data.redirect_uri
+ a.style.display = 'none'
+ document.body.appendChild(a)
+ a.click()
}
} catch {
error = $_('oauth.error.genericError')
@@ -135,7 +135,7 @@
}
function handleScopeToggle(scope: string) {
- const scopeInfo = consentData?.scopes.find(s => s.scope === scope)
+ const scopeInfo = consentData?.scopes.find((s) => s.scope === scope)
if (scopeInfo?.required) return
scopeSelections[scope] = !scopeSelections[scope]
}
@@ -144,7 +144,7 @@
return scopes.reduce(
(groups, scope) => ({
...groups,
- [scope.category]: [...(groups[scope.category] ?? []), scope],
+ [scope.category]: [...(groups[scope.category] ?? []), scope]
}),
{} as Record
)
@@ -176,7 +176,9 @@
{/if}
{consentData.client_name || $_('oauth.consent.title')}
- {$_('oauth.consent.appWantsAccess', { values: { app: '' } })}
+
+ {$_('oauth.consent.appWantsAccess', { values: { app: '' } })}
+
{#if consentData.client_uri}
{consentData.client_uri}
@@ -186,7 +188,9 @@
{#if consentData.is_delegation}
-
{$_('oauthConsent.delegatedAccess')}
+
+ {$_('oauthConsent.delegatedAccess')}
+
{$_('oauthConsent.actingAs')}
@@ -204,7 +208,17 @@
{#if consentData.delegation_level && consentData.delegation_level !== 'Owner'}
@@ -213,7 +227,9 @@
{:else if consentData.delegation_level === 'Editor'}
{$_('oauthConsent.editorLimitedDesc')}
{:else}
- {$_('oauthConsent.permissionsLimitedDesc', { values: { level: consentData.delegation_level } })}
+ {$_('oauthConsent.permissionsLimitedDesc', {
+ values: { level: consentData.delegation_level }
+ })}
{/if}
@@ -243,12 +259,7 @@
{category}
{#each scopes as scope}