Просмотр исходного кода

fix(ui): hide token modal backdrop when dismissed

The "copy your new token" modal applied x-show only to the inner
card, so the dark backdrop and click-blocking overlay stayed in the
DOM after the user clicked "I have stored it safely", leaving the
page unusable until reload. Move x-show onto the backdrop wrapper so
the whole modal hides together.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chiappa 1 неделя назад
Родитель
Сommit
641b3cdd62
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      ui/resources/views/pages/tokens/index.twig

+ 2 - 2
ui/resources/views/pages/tokens/index.twig

@@ -112,9 +112,9 @@
 </div>
 </div>
 
 
 {% if just_created %}
 {% if just_created %}
-<div x-data="{ open: true }" x-init="$nextTick(() => open = true)"
+<div x-data="{ open: true }" x-show="open"
      class="fixed inset-0 z-50 flex items-center justify-center bg-slate-900/70 px-4">
      class="fixed inset-0 z-50 flex items-center justify-center bg-slate-900/70 px-4">
-    <div x-show="open" class="w-full max-w-lg rounded-2xl border border-amber-300 bg-white p-6 shadow-2xl dark:border-amber-700 dark:bg-slate-900">
+    <div class="w-full max-w-lg rounded-2xl border border-amber-300 bg-white p-6 shadow-2xl dark:border-amber-700 dark:bg-slate-900">
         <h2 class="text-lg font-semibold text-amber-700 dark:text-amber-300">Copy this token now</h2>
         <h2 class="text-lg font-semibold text-amber-700 dark:text-amber-300">Copy this token now</h2>
         <p class="mt-2 text-sm text-slate-600 dark:text-slate-400">
         <p class="mt-2 text-sm text-slate-600 dark:text-slate-400">
             This is the only time you'll see the raw token. Refreshing this page or closing the dialog discards it permanently.
             This is the only time you'll see the raw token. Refreshing this page or closing the dialog discards it permanently.