mirror of
https://github.com/we-promise/sure.git
synced 2026-04-16 18:44:13 +00:00
* Replace text-tertiary with text-subdued in views Replace usages of the text-tertiary utility with text-subdued across several view partials to standardize subdued text styling because text-tertiary does not exist in the design system (reports, doorkeeper auth, simplefin items). Also adjust the net worth empty-liabilities markup to use a grid layout for consistent spacing, and update the related controller test selector to match the new CSS class. * Standardize empty net worth message markup Replace inconsistent markup and classes for empty asset/liability sections in the net worth partial. Swap text-secondary/p-2/text-center for text-subdued with unified padding (py-3 px-4 lg:px-6), and simplify the liabilities block from a grid/div to a single paragraph for consistent styling and spacing.
77 lines
3.4 KiB
Plaintext
77 lines
3.4 KiB
Plaintext
<% if params[:redirect_uri]&.start_with?('sureapp://') || params[:display] == 'mobile' %>
|
|
<meta name="turbo-visit-control" content="reload">
|
|
<% end %>
|
|
|
|
<div class="bg-container rounded-xl p-6 space-y-6">
|
|
<div class="space-y-2 text-center">
|
|
<p class="text-sm text-secondary">
|
|
<%= raw t(".prompt", client_name: content_tag(:span, @pre_auth.client.name, class: "font-medium text-primary")) %>
|
|
</p>
|
|
</div>
|
|
|
|
<% if @pre_auth.scopes.count > 0 %>
|
|
<div class="bg-surface-inset rounded-lg p-4 space-y-3">
|
|
<p class="text-sm font-medium text-primary"><%= t(".able_to") %>:</p>
|
|
<ul class="space-y-2">
|
|
<% @pre_auth.scopes.each do |scope| %>
|
|
<li class="flex items-start gap-2 text-sm text-secondary">
|
|
<%= icon("check", class: "w-4 h-4 mt-0.5 text-success") %>
|
|
<span><%= t scope, scope: [:doorkeeper, :scopes] %></span>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="space-y-3">
|
|
<% turbo_disabled = params[:redirect_uri]&.start_with?("sureapp://") || params[:display] == "mobile" %>
|
|
<%= form_tag oauth_authorization_path, method: :post, class: "w-full", data: { turbo: !turbo_disabled } do %>
|
|
<%= hidden_field_tag :client_id, @pre_auth.client.uid, id: nil %>
|
|
<%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri, id: nil %>
|
|
<%= hidden_field_tag :state, @pre_auth.state, id: nil %>
|
|
<%= hidden_field_tag :response_type, @pre_auth.response_type, id: nil %>
|
|
<%= hidden_field_tag :response_mode, @pre_auth.response_mode, id: nil %>
|
|
<%= hidden_field_tag :scope, @pre_auth.scope, id: nil %>
|
|
<%= hidden_field_tag :code_challenge, @pre_auth.code_challenge, id: nil %>
|
|
<%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method, id: nil %>
|
|
<% if params[:display].present? %>
|
|
<%= hidden_field_tag :display, params[:display], id: nil %>
|
|
<% end %>
|
|
<%= render DS::Button.new(
|
|
text: t("doorkeeper.authorizations.buttons.authorize"),
|
|
variant: :primary,
|
|
size: :lg,
|
|
full_width: true,
|
|
href: oauth_authorization_path,
|
|
data: { disable_with: "Authorizing..." }
|
|
) %>
|
|
<% end %>
|
|
|
|
<%= form_tag oauth_authorization_path, method: :delete, class: "w-full", data: { turbo: !turbo_disabled } do %>
|
|
<%= hidden_field_tag :client_id, @pre_auth.client.uid, id: nil %>
|
|
<%= hidden_field_tag :redirect_uri, @pre_auth.redirect_uri, id: nil %>
|
|
<%= hidden_field_tag :state, @pre_auth.state, id: nil %>
|
|
<%= hidden_field_tag :response_type, @pre_auth.response_type, id: nil %>
|
|
<%= hidden_field_tag :response_mode, @pre_auth.response_mode, id: nil %>
|
|
<%= hidden_field_tag :scope, @pre_auth.scope, id: nil %>
|
|
<%= hidden_field_tag :code_challenge, @pre_auth.code_challenge, id: nil %>
|
|
<%= hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method, id: nil %>
|
|
<% if params[:display].present? %>
|
|
<%= hidden_field_tag :display, params[:display], id: nil %>
|
|
<% end %>
|
|
<%= render DS::Button.new(
|
|
text: t("doorkeeper.authorizations.buttons.deny"),
|
|
variant: :outline,
|
|
size: :lg,
|
|
full_width: true,
|
|
href: oauth_authorization_path,
|
|
data: { disable_with: "Denying..." }
|
|
) %>
|
|
<% end %>
|
|
</div>
|
|
|
|
<p class="text-xs text-subdued text-center">
|
|
By authorizing, you allow this app to access your <%= product_name %> data according to the permissions above.
|
|
</p>
|
|
</div>
|