Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions app/assets/stylesheets/components/settings.css
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -416,7 +415,7 @@
}

.settings-page .teams-section {
margin-bottom: var(--spacing-8);
padding: var(--spacing-6) 0;
}

.settings-page .team-actions,
Expand Down Expand Up @@ -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);
}
110 changes: 56 additions & 54 deletions app/views/settings/saved_searches/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Loading