diff --git a/app/views/accounts/confirm_unlink.html.erb b/app/views/accounts/confirm_unlink.html.erb index 5b77c4808..e61cfd925 100644 --- a/app/views/accounts/confirm_unlink.html.erb +++ b/app/views/accounts/confirm_unlink.html.erb @@ -6,19 +6,15 @@ <%= t("accounts.confirm_unlink.description_html", account_name: @account.name, provider_name: @account.provider_name) %>

-
-
- <%= icon "alert-triangle", class: "w-4 h-4 text-yellow-600 mt-0.5 flex-shrink-0" %> -
-

<%= t("accounts.confirm_unlink.warning_title") %>

-
    -
  • <%= t("accounts.confirm_unlink.warning_no_sync") %>
  • -
  • <%= t("accounts.confirm_unlink.warning_manual_updates") %>
  • -
  • <%= t("accounts.confirm_unlink.warning_transactions_kept") %>
  • -
  • <%= t("accounts.confirm_unlink.warning_can_delete") %>
  • -
-
-
+
+ <%= render DS::Alert.new(title: t("accounts.confirm_unlink.warning_title"), variant: :warning) do %> + + <% end %>
<%= render DS::Button.new( diff --git a/app/views/oidc_accounts/link.html.erb b/app/views/oidc_accounts/link.html.erb index c4bf1aaf3..ba15010d5 100644 --- a/app/views/oidc_accounts/link.html.erb +++ b/app/views/oidc_accounts/link.html.erb @@ -3,12 +3,11 @@ %> <% if @user_exists %> -
-

<%= t("oidc_accounts.link.verify_heading") %>

-

+

+ <%= render DS::Alert.new(title: t("oidc_accounts.link.verify_heading"), variant: :warning) do %> <% email_suffix = @pending_auth["email"].present? ? t("oidc_accounts.link.email_suffix_html", email: @pending_auth["email"]) : "" %> - <%= t("oidc_accounts.link.verify_description_html", provider: @pending_auth["provider"], email_suffix: email_suffix).html_safe %> -

+

<%= t("oidc_accounts.link.verify_description_html", provider: @pending_auth["provider"], email_suffix: email_suffix).html_safe %>

+ <% end %>
<%= styled_form_with url: create_link_oidc_account_path, class: "space-y-4", data: { turbo: false } do |form| %> @@ -26,18 +25,17 @@ placeholder: t("oidc_accounts.link.password_placeholder"), autocomplete: "current-password" %> -
+

<%= t("oidc_accounts.link.verify_hint") %>

<%= form.submit t("oidc_accounts.link.submit_link") %> <% end %> <% else %> -
-

<%= t("oidc_accounts.link.create_heading") %>

-

- <%= t("oidc_accounts.link.create_description_html", email: @pending_auth["email"], provider: @pending_auth["provider"]).html_safe %> -

+
+ <%= render DS::Alert.new(title: t("oidc_accounts.link.create_heading"), variant: :info) do %> +

<%= t("oidc_accounts.link.create_description_html", email: @pending_auth["email"], provider: @pending_auth["provider"]).html_safe %>

+ <% end %>
diff --git a/app/views/oidc_accounts/new_user.html.erb b/app/views/oidc_accounts/new_user.html.erb index 4656d4dba..6a7f365f6 100644 --- a/app/views/oidc_accounts/new_user.html.erb +++ b/app/views/oidc_accounts/new_user.html.erb @@ -2,11 +2,12 @@ header_title t("oidc_accounts.new_user.title") %> -
-

<%= t("oidc_accounts.new_user.heading") %>

-

- <%= t("oidc_accounts.new_user.description", provider: @pending_auth["provider"]) %> -

+
+ <%= render DS::Alert.new( + title: t("oidc_accounts.new_user.heading"), + message: t("oidc_accounts.new_user.description", provider: @pending_auth["provider"]), + variant: :info + ) %>
<%= styled_form_with model: @user, url: create_user_oidc_account_path, class: "space-y-4", data: { turbo: false } do |form| %> diff --git a/app/views/rules/confirm.html.erb b/app/views/rules/confirm.html.erb index 13947e59f..775846f6a 100644 --- a/app/views/rules/confirm.html.erb +++ b/app/views/rules/confirm.html.erb @@ -15,31 +15,25 @@ <% if @rule.actions.any? { |a| a.action_type == "auto_categorize" } %> <% affected_count = @rule.affected_resource_count %> -
-
- <%= icon "info", class: "w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0" %> -
-

<%= t(".ai_cost_title") %>

- <% if @estimated_cost.present? %> -

- <%= t(".ai_cost_with_estimate_html", count: affected_count, cost: sprintf("%.4f", @estimated_cost)) %> -

- <% else %> -

- <%= t(".ai_cost_no_estimate_html", count: affected_count) %> - <% if @selected_model.present? %> - <%= t(".cost_unavailable_model", model: @selected_model) %> - <% else %> - <%= t(".cost_unavailable_no_provider") %> - <% end %> - <%= t(".cost_warning") %> -

- <% end %> -

- <%= link_to t(".view_usage_history"), settings_llm_usage_path, class: "underline hover:text-blue-800" %> +

+ <%= render DS::Alert.new(title: t(".ai_cost_title"), variant: :info) do %> + <% if @estimated_cost.present? %> +

<%= t(".ai_cost_with_estimate_html", count: affected_count, cost: sprintf("%.4f", @estimated_cost)) %>

+ <% else %> +

+ <%= t(".ai_cost_no_estimate_html", count: affected_count) %> + <% if @selected_model.present? %> + <%= t(".cost_unavailable_model", model: @selected_model) %> + <% else %> + <%= t(".cost_unavailable_no_provider") %> + <% end %> + <%= t(".cost_warning") %>

-
-
+ <% end %> +

+ <%= link_to t(".view_usage_history"), settings_llm_usage_path, class: "text-link underline" %> +

+ <% end %>
<% end %> diff --git a/app/views/rules/confirm_all.html.erb b/app/views/rules/confirm_all.html.erb index c88778767..d3b230766 100644 --- a/app/views/rules/confirm_all.html.erb +++ b/app/views/rules/confirm_all.html.erb @@ -9,32 +9,28 @@

<% if @rules.any? { |r| r.actions.any? { |a| a.action_type == "auto_categorize" } } %> -
-
- <%= icon "info", class: "w-4 h-4 text-blue-600 mt-0.5 flex-shrink-0" %> -
-

<%= t("rules.apply_all.ai_cost_title") %>

- <% if @estimated_cost.present? %> -

- <%= t("rules.apply_all.ai_cost_message", transactions: @total_affected_count) %> - <%= t("rules.apply_all.estimated_cost", cost: sprintf("%.4f", @estimated_cost)) %> -

- <% else %> -

- <%= t("rules.apply_all.ai_cost_message", transactions: @total_affected_count) %> - <% if @selected_model.present? %> - <%= t("rules.apply_all.cost_unavailable_model", model: @selected_model) %> - <% else %> - <%= t("rules.apply_all.cost_unavailable_no_provider") %> - <% end %> - <%= t("rules.apply_all.cost_warning") %> -

- <% end %> -

- <%= link_to t("rules.apply_all.view_usage"), settings_llm_usage_path, class: "underline hover:text-blue-800" %> +

+ <%= render DS::Alert.new(title: t("rules.apply_all.ai_cost_title"), variant: :info) do %> + <% if @estimated_cost.present? %> +

+ <%= t("rules.apply_all.ai_cost_message", transactions: @total_affected_count) %> + <%= t("rules.apply_all.estimated_cost", cost: sprintf("%.4f", @estimated_cost)) %>

-
-
+ <% else %> +

+ <%= t("rules.apply_all.ai_cost_message", transactions: @total_affected_count) %> + <% if @selected_model.present? %> + <%= t("rules.apply_all.cost_unavailable_model", model: @selected_model) %> + <% else %> + <%= t("rules.apply_all.cost_unavailable_no_provider") %> + <% end %> + <%= t("rules.apply_all.cost_warning") %> +

+ <% end %> +

+ <%= link_to t("rules.apply_all.view_usage"), settings_llm_usage_path, class: "text-link underline" %> +

+ <% end %>
<% end %> diff --git a/app/views/settings/llm_usages/show.html.erb b/app/views/settings/llm_usages/show.html.erb index dfb11ead1..39929a55b 100644 --- a/app/views/settings/llm_usages/show.html.erb +++ b/app/views/settings/llm_usages/show.html.erb @@ -165,16 +165,11 @@
- -
-
- <%= icon "info", class: "w-5 h-5 text-blue-600 mt-0.5" %> -
-

<%= t(".cost_estimates_title") %>

-

- <%= t(".cost_estimates_description") %> -

-
-
+
+ <%= render DS::Alert.new( + title: t(".cost_estimates_title"), + message: t(".cost_estimates_description"), + variant: :info + ) %>
diff --git a/test/controllers/oidc_accounts_controller_test.rb b/test/controllers/oidc_accounts_controller_test.rb index bd38aedcc..a24079931 100644 --- a/test/controllers/oidc_accounts_controller_test.rb +++ b/test/controllers/oidc_accounts_controller_test.rb @@ -115,7 +115,7 @@ class OidcAccountsControllerTest < ActionController::TestCase get :link assert_response :success - assert_select "h3", text: "Create New Account" + assert_select "p", text: /Create New Account/ assert_select "strong", text: new_user_auth["email"] end @@ -128,7 +128,7 @@ class OidcAccountsControllerTest < ActionController::TestCase get :link assert_response :success - assert_select "h3", text: "Create New Account" + assert_select "p", text: /Create New Account/ # No create account button rendered assert_select "button", text: "Create Account", count: 0 assert_select "p", text: /New account creation via single sign-on is disabled/