mirror of
https://github.com/we-promise/sure.git
synced 2026-07-15 14:25:21 +00:00
settings/hostings/_sync_settings.html.erb rendered the 'configured via env' notice with bg-warning-50 / border-warning-200 / text-warning-600 / text-warning-800 -- none of which exist as Tailwind utilities, so the box rendered fully unstyled (no tint, no border, default text color). Replace the hand-built box with the canonical DS::Alert(:warning), matching the warning-surface recipe and the ds-notice-neutral-text convention.
58 lines
2.5 KiB
Plaintext
58 lines
2.5 KiB
Plaintext
<% env_configured = ENV["SIMPLEFIN_INCLUDE_PENDING"].present? || ENV["PLAID_INCLUDE_PENDING"].present? %>
|
|
<div class="space-y-4">
|
|
<div class="flex items-center justify-between">
|
|
<div class="space-y-1">
|
|
<p class="text-sm"><%= t(".include_pending_label") %></p>
|
|
<p class="text-secondary text-sm"><%= t(".include_pending_description") %></p>
|
|
</div>
|
|
|
|
<%= styled_form_with model: Setting.new,
|
|
url: settings_hosting_path,
|
|
method: :patch,
|
|
data: { controller: "auto-submit-form", auto_submit_form_trigger_event_value: "change" } do |form| %>
|
|
<%= form.toggle :syncs_include_pending,
|
|
checked: Setting.syncs_include_pending,
|
|
disabled: env_configured,
|
|
data: { auto_submit_form_target: "auto" } %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="flex items-center justify-between">
|
|
<div class="space-y-1">
|
|
<p class="text-sm"><%= t(".auto_sync_label") %></p>
|
|
<p class="text-secondary text-sm"><%= t(".auto_sync_description") %></p>
|
|
</div>
|
|
|
|
<%= styled_form_with model: Setting.new,
|
|
url: settings_hosting_path,
|
|
method: :patch,
|
|
data: { controller: "auto-submit-form", auto_submit_form_trigger_event_value: "change" } do |form| %>
|
|
<%= form.toggle :auto_sync_enabled,
|
|
checked: Setting.auto_sync_enabled,
|
|
data: { auto_submit_form_target: "auto" } %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div class="flex items-center justify-between">
|
|
<div class="space-y-1">
|
|
<p class="text-sm"><%= t(".auto_sync_time_label") %></p>
|
|
<p class="text-secondary text-sm"><%= t(".auto_sync_time_description") %></p>
|
|
</div>
|
|
|
|
<%= form_with model: Setting.new,
|
|
url: settings_hosting_path,
|
|
method: :patch,
|
|
data: { controller: "auto-submit-form", auto_submit_form_trigger_event_value: "change" } do |form| %>
|
|
<%= form.time_field :auto_sync_time,
|
|
value: Setting.auto_sync_time,
|
|
disabled: !Setting.auto_sync_enabled,
|
|
class: "rounded-lg border border-primary px-3 py-2 text-sm bg-container text-primary w-full",
|
|
data: { auto_submit_form_target: "auto" } %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% if env_configured %>
|
|
<%= render DS::Alert.new(message: t(".env_configured_message"), variant: :warning) %>
|
|
<% end %>
|
|
</div>
|