1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +02:00

Standardize & improve a bunch of corners, fix some backgrounds, fix merchants for dark mode

This commit is contained in:
hatz 2025-05-14 20:39:16 -05:00
parent cb8383c04b
commit 0328919b6e
No known key found for this signature in database
10 changed files with 22 additions and 23 deletions

View file

@ -8,7 +8,7 @@
<p><%= accounts.count %></p> <p><%= accounts.count %></p>
<p class="ml-auto"><%= totals_by_currency(collection: accounts, money_method: :balance_money) %></p> <p class="ml-auto"><%= totals_by_currency(collection: accounts, money_method: :balance_money) %></p>
</div> </div>
<div class="bg-container"> <div class="bg-container rounded-lg shadow-border-xs">
<% accounts.each do |account| %> <% accounts.each do |account| %>
<%= render account %> <%= render account %>
<% end %> <% end %>

View file

@ -75,7 +75,6 @@
</div> </div>
<div> <div>
<div class="rounded-tl-lg rounded-tr-lg bg-container border-alpha-black-25 shadow-xs">
<div class="space-y-4"> <div class="space-y-4">
<% calculator = Balance::TrendCalculator.new(@account.balances) %> <% calculator = Balance::TrendCalculator.new(@account.balances) %>
@ -85,7 +84,6 @@
<% end %> <% end %>
<% end %> <% end %>
</div> </div>
</div>
<div class="p-4 bg-container rounded-bl-lg rounded-br-lg"> <div class="p-4 bg-container rounded-bl-lg rounded-br-lg">
<%= render "shared/pagination", pagy: @pagy %> <%= render "shared/pagination", pagy: @pagy %>

View file

@ -7,8 +7,8 @@
<p><%= categories.count %></p> <p><%= categories.count %></p>
</div> </div>
<div class="shadow-border-xs rounded-md bg-container"> <div class="shadow-border-xs rounded-lg bg-container">
<div class="overflow-hidden rounded-md"> <div class="overflow-hidden rounded-lg">
<% Category::Group.for(categories).each_with_index do |group, idx| %> <% Category::Group.for(categories).each_with_index do |group, idx| %>
<%= render group.category %> <%= render group.category %>

View file

@ -21,7 +21,7 @@
</div> </div>
<% end %> <% end %>
</div> </div>
<div class="bg-container shadow-border-xs rounded-md divide-y divide-alpha-black-50"> <div class="bg-container shadow-border-xs rounded-lg">
<%= content %> <%= content %>
</div> </div>
</div> </div>

View file

@ -1,6 +1,6 @@
<%# locals: (family_merchant:) %> <%# locals: (family_merchant:) %>
<div class="flex justify-between items-center p-4 bg-white"> <div class="flex justify-between items-center p-4 bg-container">
<div class="flex w-full items-center gap-2.5"> <div class="flex w-full items-center gap-2.5">
<% if family_merchant.logo_url %> <% if family_merchant.logo_url %>
<div class="w-8 h-8 rounded-full flex justify-center items-center"> <div class="w-8 h-8 rounded-full flex justify-center items-center">

View file

@ -18,8 +18,8 @@
<p><%= @merchants.count %></p> <p><%= @merchants.count %></p>
</div> </div>
<div class="border border-alpha-black-25 rounded-md bg-container shadow-border-xs"> <div class="border border-alpha-black-25 rounded-lg bg-container shadow-border-xs">
<div class="overflow-hidden rounded-md"> <div class="overflow-hidden rounded-lg">
<%= render partial: "family_merchants/family_merchant", collection: @merchants, spacer_template: "shared/ruler" %> <%= render partial: "family_merchants/family_merchant", collection: @merchants, spacer_template: "shared/ruler" %>
</div> </div>
</div> </div>

View file

@ -27,6 +27,7 @@
<div class="flex items-center gap-2 text-sm"> <div class="flex items-center gap-2 text-sm">
<div class="h-2.5 w-2.5 rounded-full" style="background-color: <%= account_group.color %>;"></div> <div class="h-2.5 w-2.5 rounded-full" style="background-color: <%= account_group.color %>;"></div>
<p class="text-secondary"><%= account_group.name %></p> <p class="text-secondary"><%= account_group.name %></p>
<span class="text-secondary">&middot;</span>
<p class="text-primary font-mono"><%= number_to_percentage(account_group.weight, precision: 0) %></p> <p class="text-primary font-mono"><%= number_to_percentage(account_group.weight, precision: 0) %></p>
</div> </div>
<% end %> <% end %>
@ -46,10 +47,10 @@
</div> </div>
</div> </div>
<div class="shadow-border-xs rounded-lg bg-container min-w-fit"> <div class="shadow-border-xs rounded-lg font-medium text-sm bg-container min-w-fit">
<% classification_group.account_groups.each do |account_group| %> <% classification_group.account_groups.each do |account_group| %>
<details class="group rounded-lg open:bg-surface font-medium text-sm"> <details class="group">
<summary class="focus-visible:outline-none focus-visible:ring-0 cursor-pointer p-4 group-open:bg-surface bg-container rounded-lg flex items-center justify-between"> <summary class="cursor-pointer p-4 group-open:bg-surface bg-container rounded-lg flex items-center justify-between">
<div class="w-40 shrink-0 flex items-center gap-4"> <div class="w-40 shrink-0 flex items-center gap-4">
<%= icon("chevron-right", class: "group-open:rotate-90") %> <%= icon("chevron-right", class: "group-open:rotate-90") %>
@ -69,7 +70,7 @@
<div> <div>
<% account_group.accounts.each_with_index do |account, idx| %> <% account_group.accounts.each_with_index do |account, idx| %>
<div class="pl-12 pr-4 py-3 flex items-center justify-between text-sm font-medium"> <div class="pl-12 pr-4 py-3 flex items-center bg-container justify-between text-sm font-medium">
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<%= render "accounts/logo", account: account, size: "sm", color: account_group.color %> <%= render "accounts/logo", account: account, size: "sm", color: account_group.color %>

View file

@ -58,7 +58,7 @@
</div> </div>
</div> </div>
<div class="p-1"> <div class="p-1">
<div class="flex flex-col bg-container rounded-xl shadow-border-xs first_child:rounded-t-xl last_child:rounded-b-xl"> <div class="flex flex-col bg-container rounded-lg shadow-border-xs rounded-lg">
<%= render partial: "rule", collection: @rules, spacer_template: "shared/ruler" %> <%= render partial: "rule", collection: @rules, spacer_template: "shared/ruler" %>
</div> </div>
</div> </div>

View file

@ -41,7 +41,7 @@
<p class="uppercase text-xs text-secondary font-medium"><%= Current.family.name %> &middot; <%= Current.family.users.size %></p> <p class="uppercase text-xs text-secondary font-medium"><%= Current.family.name %> &middot; <%= Current.family.users.size %></p>
</div> </div>
<% @users.each do |user| %> <% @users.each do |user| %>
<div class="flex gap-2 mt-2 items-center bg-container p-4 border border-alpha-black-25 rounded-lg"> <div class="flex gap-2 mt-2 items-center bg-container p-4 shadow-border-xs rounded-lg">
<div class="w-9 h-9 shrink-0"> <div class="w-9 h-9 shrink-0">
<%= render "settings/user_avatar", avatar_url: user.profile_image&.variant(:small)&.url, initials: user.initials %> <%= render "settings/user_avatar", avatar_url: user.profile_image&.variant(:small)&.url, initials: user.initials %>
</div> </div>

View file

@ -33,8 +33,8 @@
<p><%= @tags.count %></p> <p><%= @tags.count %></p>
</div> </div>
<div class="border border-alpha-black-25 rounded-md bg-container shadow-border-xs"> <div class="border border-alpha-black-25 rounded-lg bg-container shadow-border-xs">
<div class="overflow-hidden rounded-md"> <div class="overflow-hidden rounded-lg">
<%= render partial: @tags, spacer_template: "shared/ruler" %> <%= render partial: @tags, spacer_template: "shared/ruler" %>
</div> </div>
</div> </div>