Skip to content

High performance, self-hosted, newsletter and mailing list manager with a modern dashboard. Single binary app.

Fix and normalize buttons in `.page-header` across pages.

Kailash Nadhd0231e270ee9
diff --git a/static/admin/assets/css/style.css b/static/admin/assets/css/style.css
index 4ecd0fa6..ed9d73fe 100644
--- a/static/admin/assets/css/style.css
+++ b/static/admin/assets/css/style.css
@@ -1561,12 +1561,17 @@ section.users {
.page-header {
margin-bottom: var(--space-4);
- .hstack.justify-end > * {
- flex: 1 1 auto;
- }
+ .buttons {
+ width: 100%;
- .hstack.justify-end > .search-form {
- flex-grow: 999;
+ > * {
+ flex: 0 0 100%;
+ width: 100%;
+ }
+
+ > ot-dropdown > button {
+ width: 100%;
+ }
}
.search-form ot-dropdown {
diff --git a/static/admin/partials/media-gallery.html b/static/admin/partials/media-gallery.html
index caff8de9..14f1e97f 100644
--- a/static/admin/partials/media-gallery.html
+++ b/static/admin/partials/media-gallery.html
@@ -15,7 +15,7 @@
{{- if $d.Provider }}<div class="text-lighter">{{ $d.Provider }}</div>{{ end }}
</div>
</div>
- <div class="col-8 col-end align-right hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
<form method="get" action="{{ URI "/admin/campaigns/media" }}{{ if $picker }}/fragment{{ end }}" class="search-form">
{{- $d.Page.FormFields "query" -}}
<fieldset class="group">
@@ -39,7 +39,7 @@
</div>
</ot-upload>
</div>
- <div class="hstack justify-end">
+ <div class="hstack justify-end buttons">
<button type="submit" data-variant="primary" data-cy="btn-submit" data-spinner="small" :disabled="files.length === 0 || isUploading" :aria-busy="isUploading">
{{ Icon "upload" }} {{ $root.L.T "media.upload" }}
</button>
diff --git a/static/admin/views/campaign.html b/static/admin/views/campaign.html
index 7970fc22..86b089a4 100644
--- a/static/admin/views/campaign.html
+++ b/static/admin/views/campaign.html
@@ -35,7 +35,7 @@
</div>
</div>
{{- if $showRight }}
- <div class="col-6 col-end hstack justify-end">
+ <div class="col-6 hstack justify-end buttons">
{{- if $showActions }}
<ot-dropdown>
<button type="button" class="outline external campaign-test-btn dot-indicator" :class="{ 'is-active': form.testEmails.length > 0 }" popovertarget="campaign-test" :disabled="isNew" data-cy="btn-test">{{ Icon "mail" }} {{ .L.T "campaigns.sendTest" }}</button>
@@ -44,7 +44,7 @@
<ot-taginput x-model="form.testEmails"><input type="email" placeholder="{{ .L.T "campaigns.testEmails" }}" :disabled="isNew" @blur="$el.value !== '' && $el.closest('ot-taginput').add($el.value)" autofocus /></ot-taginput>
<small data-hint>{{ .L.T "campaigns.sendTestHelp" }}</small>
</label>
- <div class="hstack justify-end">
+ <div class="hstack justify-end buttons">
<button type="button" data-variant="primary" @click="onTest" :disabled="isNew || isLoading('campaigns.test')" :aria-busy="isLoading('campaigns.test')" data-spinner="small">{{ Icon "mail" }} {{ .L.T "campaigns.send" }}</button>
</div>
</div>
diff --git a/static/admin/views/campaigns.html b/static/admin/views/campaigns.html
index 7714790a..96cd3e27 100644
--- a/static/admin/views/campaigns.html
+++ b/static/admin/views/campaigns.html
@@ -18,7 +18,7 @@
{{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}
</h1>
</div>
- <div class="col-8 hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
<form method="get" action="{{ $base }}" class="search-form">
{{- $d.Page.FormFields "query" "page" -}}
<fieldset class="group">
diff --git a/static/admin/views/forms.html b/static/admin/views/forms.html
index 181ec87b..8bf425df 100644
--- a/static/admin/views/forms.html
+++ b/static/admin/views/forms.html
@@ -8,7 +8,7 @@
<div class="col-4">
<h1 class="page-title">{{ .L.T "forms.title" }}</h1>
</div>
- <div class="col-8 col-end align-right hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
{{- if $.ConfigJS.PublicSubscription.Enabled }}
<a href="{{ $.ConfigJS.RootURL }}/subscription/form" target="_blank" rel="noopener noreferrer" class="button outline small external" data-testid="url" title="{{ $.ConfigJS.RootURL }}/subscription/form">
{{ Icon "arrow-up-right" }} {{ .L.T "forms.publicSubPage" }}
diff --git a/static/admin/views/lists.html b/static/admin/views/lists.html
index 979dfe17..d55bdd2d 100644
--- a/static/admin/views/lists.html
+++ b/static/admin/views/lists.html
@@ -28,7 +28,7 @@
{{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}
</h1>
</div>
- <div class="col-8 col-end align-right hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
<form method="get" action="{{ URI "/admin/lists" }}" class="search-form">
{{- $d.Page.FormFields "query" -}}
<fieldset class="group">
diff --git a/static/admin/views/roles.html b/static/admin/views/roles.html
index 46549782..cc7b529e 100644
--- a/static/admin/views/roles.html
+++ b/static/admin/views/roles.html
@@ -14,7 +14,7 @@
</h1>
</div>
</div>
- <div class="col-8 col-end align-right hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
{{- if $d.Can "roles:manage" }}
<a href="{{ $base }}/new" class="button" data-variant="primary" data-testid="btn-new">
{{ Icon "plus" }} {{ .L.T "globals.buttons.new" }}
diff --git a/static/admin/views/settings.html b/static/admin/views/settings.html
index ce6714ea..2b809fe4 100644
--- a/static/admin/views/settings.html
+++ b/static/admin/views/settings.html
@@ -16,7 +16,7 @@
<span>({{ $d.Version }})</span>
</h1>
</div>
- <div class="col-8 col-end align-right hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
<div class="search-form settings-search">
<fieldset class="group">
<input type="search" x-ref="search" data-cy="search" @input="onSearch($event)"
diff --git a/static/admin/views/subscriber.html b/static/admin/views/subscriber.html
index 8c51b5fd..59fb1105 100644
--- a/static/admin/views/subscriber.html
+++ b/static/admin/views/subscriber.html
@@ -24,7 +24,7 @@
</h1>
</div>
</div>
- <div class="col-6 hstack justify-end">
+ <div class="col-6 hstack justify-end buttons">
{{- if and (eq $d.Tab "lists") ($d.Can "subscribers:manage") }}
{{ if ne $sub.Status "blocklisted" }}
<button type="button" class="outline external" data-testid="btn-send-optin" @click.prevent="onSendOptin" :disabled="!hasOptinSub">{{ Icon "mail" }} {{ .L.T "subscribers.sendOptinConfirm" }}</button>
diff --git a/static/admin/views/subscribers.html b/static/admin/views/subscribers.html
index 8cc6a552..bb1e5e37 100644
--- a/static/admin/views/subscribers.html
+++ b/static/admin/views/subscribers.html
@@ -30,7 +30,7 @@
{{- if gt $d.Page.Page 1 }} {{ template "filter-badge" dict "Label" (.L.Ts "globals.terms.page" "n" (printf "%d" $d.Page.Page)) "URL" ($d.Page.FilterURL $base) }}{{ end }}
</h1>
</div>
- <div class="col-8 col-end hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
<form action="{{ $base }}" class="search-form" :method="advanced ? 'post' : 'get'">
{{- $d.Page.FormFields "search" "query" "page" -}}
<ot-dropdown>
@@ -47,7 +47,7 @@
<a href="https://listmonk.app/docs/querying-and-segmentation" target="_blank" rel="noopener noreferrer">{{ .L.T "globals.buttons.learnMore" }}.</a>
</small>
</div>
- <div class="hstack justify-end">
+ <div class="hstack justify-end buttons">
<button type="button" class="outline" data-testid="btn-query-reset" @click="query = ''" :disabled="query.trim() === ''">{{ .L.T "subscribers.reset" }}</button>
<button type="submit" data-variant="primary" data-testid="btn-query">{{ .L.T "subscribers.query" }}</button>
</div>
diff --git a/static/admin/views/template.html b/static/admin/views/template.html
index 3adb34a0..ea84d94d 100644
--- a/static/admin/views/template.html
+++ b/static/admin/views/template.html
@@ -28,7 +28,7 @@
{{- if and (not $isNew) $t.IsDefault }}{{ Badge (.L.T "templates.default") "enum" }}{{ end }}
</div>
</div>
- <div class="col-6 col-end hstack justify-end">
+ <div class="col-6 hstack justify-end buttons">
<button type="button" class="outline external" data-testid="btn-preview" @click="onPreviewBody" aria-keyshortcuts="F9">{{ Icon "eye" }} {{ .L.T "templates.preview" }}</button>
</div>
</header>
diff --git a/static/admin/views/templates.html b/static/admin/views/templates.html
index 374e8994..f5e15966 100644
--- a/static/admin/views/templates.html
+++ b/static/admin/views/templates.html
@@ -19,7 +19,7 @@
{{- end }}
</h1>
</div>
- <div class="col-8 col-end align-right hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
{{- if $canManage }}
<a href="{{ $base }}/new" class="button" data-variant="primary" data-testid="btn-new">
{{ Icon "plus" }} {{ .L.T "globals.buttons.new" }}
diff --git a/static/admin/views/users.html b/static/admin/views/users.html
index f2b0fc1d..b0c26c02 100644
--- a/static/admin/views/users.html
+++ b/static/admin/views/users.html
@@ -26,7 +26,7 @@
</h1>
</div>
</div>
- <div class="col-8 col-end align-right hstack justify-end">
+ <div class="col-8 hstack justify-end buttons">
{{- if $d.Can "users:manage" }}
<a href="{{ URI "/admin/users" }}/new" class="button" data-variant="primary" data-testid="btn-new">
{{ Icon "plus" }} {{ .L.T "globals.buttons.new" }}