style: improve api token box look

This commit is contained in:
Herculino Trotta
2026-06-27 17:56:05 -03:00
parent 4273c541c5
commit 009a7038c8
2 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -437,7 +437,9 @@ class APITokenCreateForm(forms.Form):
name = forms.CharField(
max_length=255,
label=_("Token name"),
help_text=_("Use a descriptive name such as n8n, Home Assistant, or backup job."),
help_text=_(
"Use a descriptive name such as n8n, Home Assistant, or backup job."
),
)
expires_in_days = forms.IntegerField(
required=False,
@@ -459,7 +461,7 @@ class APITokenCreateForm(forms.Form):
NoClassSubmit(
"submit",
_("Create token"),
css_class="btn btn-outline-primary w-full",
css_class="btn btn-primary",
),
),
)
@@ -9,7 +9,7 @@
</div>
{% if raw_token %}
<div role="alert" class="alert alert-warning mb-4">
<div class="bg-primary-content p-3 rounded-box">
<div class="w-full">
<div class="font-semibold mb-1">{% translate "Copy this token now" %}</div>
<p class="text-sm opacity-80 mb-3">
@@ -20,10 +20,10 @@
type="text"
readonly
value="{{ raw_token }}"
class="input input-sm join-item w-full font-mono text-xs"
class="input input-sm join-item w-full"
_="on focus call me.select()" />
<button type="button"
class="btn btn-sm btn-primary join-item"
class="btn btn-sm btn-secondary join-item"
_="on click call navigator.clipboard.writeText('{{ raw_token|escapejs }}')
then put 'Copied!' into me
then wait 1.5s