mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
Pre-launch design sync with Figma spec (#2154)
* Add lookbook + viewcomponent, organize design system file * Build menu component * Button updates * More button fixes * Replace all menus with new ViewComponent * Checkpoint: fix tests, all buttons and menus converted * Split into Link and Button components for clarity * Button cleanup * Simplify custom confirmation configuration in views * Finalize button, link component API * Add toggle field to custom form builder + Component * Basic tabs component * Custom tabs, convert all menu / tab instances in app * Gem updates * Centralized icon helper * Update all icon usage to central helper * Lint fixes * Centralize all disclosure instances * Dialog replacements * Consolidation of all dialog styles * Test fixes * Fix app layout issues, move to component with slots * Layout simplification * Flakey test fix * Fix dashboard mobile issues * Finalize homepage * Lint fixes * Fix shadows and borders in dark mode * Fix tests * Remove stale class * Fix filled icon logic * Move transparent? to public interface
This commit is contained in:
parent
1aafed5f8b
commit
90a9546f32
291 changed files with 4143 additions and 3104 deletions
|
@ -6,17 +6,20 @@
|
|||
|
||||
<div>
|
||||
<%= form.email_field :email, placeholder: t(".email"), label: t(".email") %>
|
||||
|
||||
<% if @user.unconfirmed_email.present? %>
|
||||
<p class="mt-2 text-sm text-gray-600">
|
||||
You have requested to change your email to <%= @user.unconfirmed_email %>. Please go to your email and confirm for the change to take effect.
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-4">
|
||||
<%= form.text_field :first_name, placeholder: t(".first_name"), label: t(".first_name") %>
|
||||
<%= form.text_field :last_name, placeholder: t(".last_name"), label: t(".last_name") %>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-4">
|
||||
<%= form.submit t(".save"), class: "btn btn--primary md:w-auto w-full" %>
|
||||
<%= render ButtonComponent.new(text: t(".save"), class: "md:w-auto w-full justify-center") %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
@ -40,7 +43,7 @@
|
|||
<% @users.each do |user| %>
|
||||
<div class="flex gap-2 items-center bg-container p-4 border border-alpha-black-25 rounded-lg">
|
||||
<div class="w-9 h-9 shrink-0">
|
||||
<%= render "settings/user_avatar", user: user %>
|
||||
<%= render "settings/user_avatar", avatar_url: user.profile_image.url %>
|
||||
</div>
|
||||
<p class="text-primary font-medium text-sm"><%= user.display_name %></p>
|
||||
<div class="rounded-md bg-surface px-1.5 py-0.5">
|
||||
|
@ -48,17 +51,13 @@
|
|||
</div>
|
||||
<% if Current.user.admin? && user != Current.user %>
|
||||
<div class="ml-auto">
|
||||
<%= button_to settings_profile_path(user_id: user),
|
||||
method: :delete,
|
||||
class: "text-red-500 hover:text-red-700",
|
||||
data: { turbo_confirm: {
|
||||
title: t(".confirm_remove_member.title"),
|
||||
body: t(".confirm_remove_member.body", name: user.display_name),
|
||||
accept: t(".remove_member"),
|
||||
acceptClass: "w-full btn btn--destructive text-white rounded-xl text-center p-[10px] mb-2"
|
||||
}} do %>
|
||||
<%= lucide_icon "x", class: "w-5 h-5" %>
|
||||
<% end %>
|
||||
<%= render ButtonComponent.new(
|
||||
variant: "icon",
|
||||
icon: "x",
|
||||
href: settings_profile_path(user_id: user),
|
||||
method: :delete,
|
||||
confirm: CustomConfirm.for_resource_deletion(user.display_name, high_severity: true)
|
||||
) %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
@ -89,26 +88,23 @@
|
|||
class="text-sm bg-gray-50 px-2 py-1 rounded border border-secondary w-72">
|
||||
<button data-action="clipboard#copy" class="text-secondary hover:text-gray-700">
|
||||
<span data-clipboard-target="iconDefault">
|
||||
<%= lucide_icon "copy", class: "w-5 h-5" %>
|
||||
<%= icon "copy" %>
|
||||
</span>
|
||||
<span class="hidden" data-clipboard-target="iconSuccess">
|
||||
<%= lucide_icon "check", class: "w-5 h-5" %>
|
||||
<%= icon "check" %>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if Current.user.admin? %>
|
||||
<%= button_to invitation_path(invitation),
|
||||
method: :delete,
|
||||
class: "text-red-500 hover:text-red-700",
|
||||
data: { turbo_confirm: {
|
||||
title: t(".confirm_remove_invitation.title"),
|
||||
body: t(".confirm_remove_invitation.body", email: invitation.email),
|
||||
accept: t(".remove_invitation"),
|
||||
acceptClass: "w-full btn btn--destructive text-white rounded-xl text-center p-[10px] mb-2"
|
||||
}} do %>
|
||||
<%= lucide_icon "x", class: "w-5 h-5" %>
|
||||
<% end %>
|
||||
<%= render ButtonComponent.new(
|
||||
variant: "icon",
|
||||
icon: "x",
|
||||
href: invitation_path(invitation),
|
||||
method: :delete,
|
||||
confirm: CustomConfirm.for_resource_deletion(invitation.email, high_severity: true)
|
||||
) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -118,7 +114,7 @@
|
|||
<%= link_to new_invitation_path,
|
||||
class: "bg-container-inset flex items-center justify-center gap-2 text-secondary mt-1 hover:bg-container-inset-hover rounded-lg px-4 py-2 w-full text-center",
|
||||
data: { turbo_frame: :modal } do %>
|
||||
<%= lucide_icon("plus", class: "w-5 h-5 text-secondary") %>
|
||||
<%= icon("plus") %>
|
||||
<%= t(".invite_member") %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -134,16 +130,14 @@
|
|||
<h3 class="font-medium text-primary"><%= t(".reset_account") %></h3>
|
||||
<p class="text-secondary text-sm"><%= t(".reset_account_warning") %></p>
|
||||
</div>
|
||||
<%=
|
||||
button_to t(".reset_account"), reset_user_path(@user), method: :delete,
|
||||
class: "w-full md:w-auto btn btn--destructive",
|
||||
data: { turbo_confirm: {
|
||||
title: t(".confirm_reset.title"),
|
||||
body: t(".confirm_reset.body"),
|
||||
accept: t(".reset_account"),
|
||||
acceptClass: "w-full btn btn--destructive text-primary rounded-xl text-center p-[10px] mb-2"
|
||||
}}
|
||||
%>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
text: t(".reset_account"),
|
||||
variant: "destructive",
|
||||
href: reset_user_path(@user),
|
||||
method: :delete,
|
||||
confirm: CustomConfirm.for_resource_deletion("Account", high_severity: true)
|
||||
) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
|
||||
|
@ -151,16 +145,14 @@
|
|||
<h3 class="font-medium text-primary"><%= t(".delete_account") %></h3>
|
||||
<p class="text-secondary text-sm"><%= t(".delete_account_warning") %></p>
|
||||
</div>
|
||||
<%=
|
||||
button_to t(".delete_account"), user_path(@user), method: :delete,
|
||||
class: "w-full md:w-auto btn btn--destructive",
|
||||
data: { turbo_confirm: {
|
||||
title: t(".confirm_delete.title"),
|
||||
body: t(".confirm_delete.body"),
|
||||
accept: t(".delete_account"),
|
||||
acceptClass: "w-full btn btn--destructive text-white rounded-xl text-center p-[10px] mb-2"
|
||||
}}
|
||||
%>
|
||||
|
||||
<%= render ButtonComponent.new(
|
||||
text: t(".delete_account"),
|
||||
variant: "destructive",
|
||||
href: user_path(@user),
|
||||
method: :delete,
|
||||
confirm: CustomConfirm.for_resource_deletion("your account", high_severity: true)
|
||||
) %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue