Skip to content

Commit

Permalink
ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rohanharikr committed Jul 5, 2024
1 parent f3da4ba commit 3a2976b
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1417,8 +1417,8 @@
on:click={() => (dropdown.authorize = !dropdown.authorize)}
class="py-2 w-full flex justify-between items-center px-4"
>
<div class="flex flex-col items-start">
<span class="font-semibold text-lg"
<div class="flex flex-col items-start text-left">
<span class="font-semibold text-lg" style="word-break: break-word;"
>{new URL(
"/authorize",
states.selected_authorization_server
Expand Down Expand Up @@ -1478,8 +1478,8 @@
on:click={() => (dropdown.token = !dropdown.token)}
class="py-2 w-full flex justify-between items-center px-4"
>
<div class="flex flex-col items-start">
<span class="font-semibold text-lg"
<div class="flex flex-col items-start text-left">
<span class="font-semibold text-lg" style="word-break: break-word;"
>{new URL(
"/oauth/token",
states.selected_authorization_server
Expand Down Expand Up @@ -1541,8 +1541,8 @@
on:click={() => (dropdown.userinfo = !dropdown.userinfo)}
class="py-2 w-full flex justify-between items-center px-4"
>
<div class="flex flex-col items-start">
<span class="font-semibold text-lg"
<div class="flex flex-col items-start text-left">
<span class="font-semibold text-lg" style="word-break: break-word;"
>{new URL(
"/oauth/userinfo",
states.selected_authorization_server
Expand Down Expand Up @@ -1604,8 +1604,8 @@
on:click={() => (dropdown.introspect = !dropdown.introspect)}
class="py-2 w-full flex justify-between items-center px-4"
>
<div class="flex flex-col items-start">
<span class="font-semibold text-lg"
<div class="flex flex-col items-start text-left">
<span class="font-semibold text-lg" style="word-break: break-word;"
>{new URL(
"/oauth/introspect",
states.selected_authorization_server
Expand Down Expand Up @@ -1685,11 +1685,11 @@
</button>
{#if dropdown.claims}
<ul
class="flex flex-col px-4 divide-y divide-black/50 dark:divide-white/50"
class="flex flex-col px-4 divide-y divide-black/50 dark:divide-white/50 overflow-x-auto"
>
{#each scopes.claims.filter((i) => result.introspect[i]) as claim}
{@const isString = typeof result.introspect[claim] == 'string'}
<li class="py-4 flex items-center w-full overflow-x-auto pr-6">
<li class="py-4 flex items-center">
<div class="w-1/4 md:w-1/3 flex-shrink-0">{claim}</div>
<div>
{#if claim === "picture" && result.introspect[claim]}
Expand All @@ -1699,9 +1699,10 @@
class="h-10 w-10 rounded-full object-fit"
alt="Picture claim"
/>
{:else if isString}
{result.introspect[claim]}
{:else}
<!-- discord claim is {id, username} -->
<pre>{isString ? result.introspect[claim] : JSON.stringify(result.introspect[claim], null, 2) || ""}</pre>
<pre>{JSON.stringify(result.introspect[claim], null, 2)}</pre>
{/if}
</div>
</li>
Expand Down

0 comments on commit 3a2976b

Please sign in to comment.