2024-04-18 07:56:51 -04:00
|
|
|
<% content_for :sidebar do %>
|
|
|
|
<%= render "settings/nav" %>
|
|
|
|
<% end %>
|
|
|
|
<div class="space-y-4">
|
2024-04-25 07:54:56 -04:00
|
|
|
<h1 class="text-gray-900 text-xl font-medium mb-4"><%= t(".page_title") %></h1>
|
|
|
|
<%= settings_section title: t(".general_title"), subtitle: t(".general_subtitle") do %>
|
|
|
|
<div>
|
2024-07-16 14:08:24 -04:00
|
|
|
<%= styled_form_with model: Current.user, url: settings_preferences_path, class: "space-y-4", data: { controller: "auto-submit-form" } do |form| %>
|
|
|
|
<%= form.fields_for :family_attributes do |family_form| %>
|
|
|
|
<%= currency_select_full family_form, :currency, { label: "Currency", selected: Current.family.currency }, { data: { auto_submit_form_target: "auto" } } %>
|
2024-04-25 07:54:56 -04:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2024-04-18 07:56:51 -04:00
|
|
|
</div>
|
2024-04-25 07:54:56 -04:00
|
|
|
<% end %>
|
|
|
|
<%= settings_section title: t(".theme_title"), subtitle: t(".theme_subtitle") do %>
|
|
|
|
<div>
|
2024-07-16 14:08:24 -04:00
|
|
|
<%= styled_form_with model: Current.user, url: settings_preferences_path, local: true, class: "flex justify-between items-center" do |form| %>
|
2024-04-25 07:54:56 -04:00
|
|
|
<div class="text-center">
|
|
|
|
<%= image_tag("light-mode-preview.png", alt: "Light Theme Preview", class: "h-44 mb-4") %>
|
|
|
|
<div class="flex justify-center items-center gap-2">
|
|
|
|
<%= form.radio_button :theme, t(".theme_light"), checked: true %>
|
|
|
|
<%= form.label :theme_light, t(".theme_light"), value: "light" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
|
|
<%= image_tag("dark-mode-preview.png", alt: "Dark Theme Preview", class: "h-44 mb-4") %>
|
|
|
|
<div class="flex justify-center items-center gap-2">
|
|
|
|
<%= form.radio_button :theme, t(".theme_dark"), disabled: true, class: "cursor-not-allowed" %>
|
|
|
|
<%= form.label :theme_dark, t(".theme_dark"), value: "dark" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="text-center">
|
|
|
|
<%= image_tag("system-mode-preview.png", alt: "System Theme Preview", class: "h-44 mb-4") %>
|
|
|
|
<div class="flex items-center gap-2 justify-center">
|
|
|
|
<%= form.radio_button :theme, t(".theme_system"), disabled: true, class: "cursor-not-allowed" %>
|
|
|
|
<%= form.label :theme_system, t(".theme_system"), value: "system" %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2024-04-18 07:56:51 -04:00
|
|
|
<div class="flex justify-between gap-4">
|
|
|
|
<%= previous_setting("Account", settings_profile_path) %>
|
|
|
|
<%= next_setting("Notifications", settings_notifications_path) %>
|
|
|
|
</div>
|
|
|
|
</div>
|