Skip to content

Commit

Permalink
Refresh UI fixes (#53)
Browse files Browse the repository at this point in the history
* only replace old playground id if not response flow

* invite url colorize

* format
  • Loading branch information
rohanharikr authored Aug 12, 2024
1 parent c3f249c commit 02edf8e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,10 @@
return false;
}
//Purge localstorage cache -- replace old playground client_id with new
if (_states.protocol_param_values.client_id === clientIds.playground_old) {
//Purge localstorage cache -- replace old playground client_id with new if not a response flow
const hasAuthzRes =
window.location?.hash?.includes('id_token') || window.location?.seach?.includes('id_token');
if (!hasAuthzRes && _states.protocol_param_values.client_id === clientIds.playground_old) {
_states.protocol_param_values.client_id = clientIds.playground;
}
Expand Down Expand Up @@ -1417,8 +1419,7 @@
</svg>
</button>
<span
id="request-url-container"
class="block text-sm whitespace-pre-line"
class="url-container block text-sm whitespace-pre-line"
class:flash={copyTooltip.requestURL}
>
{@html highlight('http', requestURL)}
Expand Down Expand Up @@ -1719,9 +1720,11 @@
class="relative border border-charcoal dark:border-gray-800 rounded-sm w-full px-4 pb-4 pt-6"
>
<span class="absolute -mt-9 bg-white dark:bg-[#151515] px-2 -mx-2">Invite Request</span>
<div class="max-w-sm mx-auto">
<div class="max-w-lg mx-auto">
{#if canInvite}
<div class="bg-gray-200 dark:bg-charcoal rounded-sm p-4 break-words mb-6">
<div
class="overflow-x-auto bg-gray-200 dark:bg-charcoal rounded-sm p-4 break-words mb-6"
>
<h2 class="inline-flex items-center">
<span>Invite URL</span>
<button on:click={() => copy('invitePlaygroundURL', invitePlaygroundURL)}>
Expand All @@ -1741,10 +1744,10 @@
</button>
</h2>
<span
class="mt-2 block text-sm whitespace-pre-line"
class="url-container mt-2 block text-sm whitespace-pre-line"
class:flash={copyTooltip.invitePlaygroundURL}
>
{invitePlaygroundURL}
{@html highlight('http', invitePlaygroundURL)}
</span>
</div>
{/if}
Expand Down Expand Up @@ -1935,7 +1938,7 @@
overflow-x: auto;
}
:global(#request-url-container pre) {
:global(.url-container pre) {
background-color: transparent !important;
}
Expand Down

0 comments on commit 02edf8e

Please sign in to comment.