From 321a4c81b5139e06ab9d742ddbe39e6352ca8fb8 Mon Sep 17 00:00:00 2001 From: moozzi Date: Mon, 17 Aug 2026 13:45:24 +0200 Subject: [PATCH] Change `settings` page styles --- .../stylesheets/components/settings.css | 15 ++- .../settings/saved_searches/index.html.slim | 110 +++++++++--------- 2 files changed, 67 insertions(+), 58 deletions(-) diff --git a/app/assets/stylesheets/components/settings.css b/app/assets/stylesheets/components/settings.css index 76633934..d9858068 100644 --- a/app/assets/stylesheets/components/settings.css +++ b/app/assets/stylesheets/components/settings.css @@ -1,11 +1,10 @@ .settings-page { - padding: var(--spacing-10) var(--spacing-6) var(--spacing-12); + padding: var(--spacing-6); } .settings-page h1 { - font-size: var(--font-size-2xl); + font-size: var(--font-size-3xl); color: var(--color-text-primary); - margin-bottom: var(--spacing-8); } .settings-page .settings-page-count { @@ -416,7 +415,7 @@ } .settings-page .teams-section { - margin-bottom: var(--spacing-8); + padding: var(--spacing-6) 0; } .settings-page .team-actions, @@ -752,3 +751,11 @@ display: flex; gap: var(--spacing-3); } + +.settings-page .saved-searches-section { + padding: var(--spacing-6) 0; +} + +.settings-page .saved-searches-new-button-section { + padding-bottom: var(--spacing-6); +} diff --git a/app/views/settings/saved_searches/index.html.slim b/app/views/settings/saved_searches/index.html.slim index e09faf81..655e62c3 100644 --- a/app/views/settings/saved_searches/index.html.slim +++ b/app/views/settings/saved_searches/index.html.slim @@ -3,63 +3,65 @@ .settings-page h1 My Saved Searches - = link_to "New saved search", new_settings_saved_search_path, class: "button-primary" + .saved-searches-section + .saved-searches-new-button-section + = link_to "New saved search", new_settings_saved_search_path, class: "button-primary" - - if @saved_searches.any? - h2 My Searches - .email-table-wrap - table.email-table - thead - tr - th Name - th Query - th Actions - tbody - - @saved_searches.each do |ss| + - if @saved_searches.any? + h2 My Searches + .email-table-wrap + table.email-table + thead tr - td = ss.name - td - code = ss.query - td - = link_to "Edit", edit_settings_saved_search_path(ss), class: "button-secondary button-small" - = button_to "Delete", settings_saved_search_path(ss), method: :delete, class: "button-danger-secondary button-small", data: { turbo_confirm: "Delete this saved search?" } + th Name + th Query + th Actions + tbody + - @saved_searches.each do |ss| + tr + td = ss.name + td + code = ss.query + td + = link_to "Edit", edit_settings_saved_search_path(ss), class: "button-secondary button-small" + = button_to "Delete", settings_saved_search_path(ss), method: :delete, class: "button-danger-secondary button-small", data: { turbo_confirm: "Delete this saved search?" } - - if @global_searches.any? - h2 Global Searches - p.settings-hint These are visible to everyone. You can hide them from your sidebar. - .email-table-wrap - table.email-table - thead - tr - th Name - th Query - th Visible - tbody - - @global_searches.each do |ss| + - if @global_searches.any? + h2 Global Searches + p.settings-hint These are visible to everyone. You can hide them from your sidebar. + .email-table-wrap + table.email-table + thead tr - td = ss.name - td - code = ss.query - td - - hidden = @hidden_ids.include?(ss.id) - = button_to hidden ? "Show" : "Hide", settings_saved_search_preferences_path(saved_search_id: ss.id, hidden: !hidden), method: :post, class: "button-secondary button-small" + th Name + th Query + th Visible + tbody + - @global_searches.each do |ss| + tr + td = ss.name + td + code = ss.query + td + - hidden = @hidden_ids.include?(ss.id) + = button_to hidden ? "Show" : "Hide", settings_saved_search_preferences_path(saved_search_id: ss.id, hidden: !hidden), method: :post, class: "button-secondary button-small" - - if @system_searches.any? - h2 Default Searches - p.settings-hint These are provided by the site administrators. You can hide them from your sidebar. - .email-table-wrap - table.email-table - thead - tr - th Name - th Query - th Visible - tbody - - @system_searches.each do |ss| + - if @system_searches.any? + h2 Default Searches + p.settings-hint These are provided by the site administrators. You can hide them from your sidebar. + .email-table-wrap + table.email-table + thead tr - td = ss.name - td - code = ss.query - td - - hidden = @hidden_ids.include?(ss.id) - = button_to hidden ? "Show" : "Hide", settings_saved_search_preferences_path(saved_search_id: ss.id, hidden: !hidden), method: :post, class: "button-secondary button-small" + th Name + th Query + th Visible + tbody + - @system_searches.each do |ss| + tr + td = ss.name + td + code = ss.query + td + - hidden = @hidden_ids.include?(ss.id) + = button_to hidden ? "Show" : "Hide", settings_saved_search_preferences_path(saved_search_id: ss.id, hidden: !hidden), method: :post, class: "button-secondary button-small"