]> git.openstreetmap.org Git - rails.git/commitdiff
Add site color scheme select to preferences form
authorAnton Khorev <tony29@yandex.ru>
Sat, 16 Nov 2024 15:09:15 +0000 (18:09 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sun, 1 Dec 2024 01:40:01 +0000 (04:40 +0300)
app/views/preferences/edit.html.erb

index 07d89fbb5bcb567fe443f8ec30c11175ceffeb3f..34cb72046d74efe73e8e050c737eb4a60df3aee7 100644 (file)
@@ -7,6 +7,14 @@
 
   <%= f.text_field :languages %>
 
+  <div class="mb-3">
+    <%= label_tag "site_color_scheme", t("preferences.show.preferred_site_color_scheme"), :class => "form-label" %>
+    <%= select_tag "site_color_scheme",
+                   options_for_select(%w[auto light dark].map { |scheme| [t("preferences.show.site_color_schemes.#{scheme}"), scheme] },
+                                      preferred_site_color_scheme),
+                   :class => "form-select" %>
+  </div>
+
   <%= f.primary t(".save") %>
   <%= link_to t(".cancel"), preferences_path, :class => "btn btn-link" %>
 <% end %>