mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-07 14:35:23 +02:00
New Design System + Codebase Refresh (#1823)
Since the very first 0.1.0-alpha.1 release, we've been moving quickly to add new features to the Maybe app. In doing so, some parts of the codebase have become outdated, unnecessary, or overly-complex as a natural result of this feature prioritization. Now that "core" Maybe is complete, we're moving into a second phase of development where we'll be working hard to improve the accuracy of existing features and build additional features on top of "core". This PR is a quick overhaul of the existing codebase aimed to: - Establish the brand new and simplified dashboard view (pictured above) - Establish and move towards the conventions introduced in Cursor rules and project design overview #1788 - Consolidate layouts and improve the performance of layout queries - Organize the core models of the Maybe domain (i.e. Account::Entry, Account::Transaction, etc.) and break out specific traits of each model into dedicated concerns for better readability - Remove stale / dead code from codebase - Remove overly complex code paths in favor of simpler ones
This commit is contained in:
parent
8539ac7dec
commit
d75be2282b
278 changed files with 3428 additions and 4354 deletions
70
app/views/users/_user_menu.html.erb
Normal file
70
app/views/users/_user_menu.html.erb
Normal file
|
@ -0,0 +1,70 @@
|
|||
<%# locals: (user:) %>
|
||||
|
||||
<div id="user-menu" data-controller="menu" data-menu-placement-value="right-start" data-menu-offset-value="16">
|
||||
<button data-menu-target="button">
|
||||
<div class="w-9 h-9 cursor-pointer">
|
||||
<%= render "settings/user_avatar", user: user, variant: :small %>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div data-menu-target="content" class="hidden absolute w-[276px] z-10 divide-y divide-alpha-black-100 bg-white rounded-xl shadow-border-sm">
|
||||
<div class="px-4 py-3 flex items-center gap-3">
|
||||
<div class="w-9 h-9 shrink-0">
|
||||
<%= render "settings/user_avatar", user: user, variant: :small, lazy: true %>
|
||||
</div>
|
||||
|
||||
<div class="overflow-hidden text-ellipsis text-sm">
|
||||
<p class="font-medium"><%= user.display_name %></p>
|
||||
<% if user.display_name != user.email %>
|
||||
<p class="text-secondary"><%= user.email %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if self_hosted? %>
|
||||
<div class="p-3">
|
||||
<p class="text-sm">
|
||||
<span class="font-medium text-primary">Version:</span>
|
||||
<%= link_to Maybe.version.to_release_tag, "https://github.com/maybe-finance/maybe/releases/tag/#{Maybe.version.to_release_tag}", target: "_blank", class: "hover:underline" %>
|
||||
(<%= link_to Maybe.commit_sha.first(7), "https://github.com/maybe-finance/maybe/commit/#{Maybe.commit_sha}", target: "_blank", class: "hover:underline" %>)
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="p-1">
|
||||
<%= link_to settings_profile_path(return_to: request.fullpath), class: "btn btn--ghost flex gap-2 items-center" do %>
|
||||
<%= lucide_icon("settings", class: "w-5 h-5 text-secondary shrink-0") %>
|
||||
<span class="text-primary text-sm">Settings</span>
|
||||
<% end %>
|
||||
|
||||
<%= link_to changelog_path, class: "btn btn--ghost flex gap-2 items-center" do %>
|
||||
<%= lucide_icon("box", class: "w-5 h-5 text-secondary shrink-0") %>
|
||||
<span class="text-primary text-sm">Changelog</span>
|
||||
<% end %>
|
||||
|
||||
<%= link_to feedback_path, class: "btn btn--ghost flex gap-2 items-center" do %>
|
||||
<%= lucide_icon("megaphone", class: "w-5 h-5 text-secondary shrink-0") %>
|
||||
<span class="text-primary text-sm">Feedback</span>
|
||||
<% end %>
|
||||
|
||||
<% if self_hosted? %>
|
||||
<%= link_to "https://link.maybe.co/discord", class: "btn btn--ghost flex gap-2 items-center" do %>
|
||||
<%= lucide_icon("message-square-more", class: "w-5 h-5 text-secondary shrink-0") %>
|
||||
<span class="text-primary text-sm">Contact</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<%= link_to "mailto:hello@maybefinance.com", class: "btn btn--ghost flex gap-2 items-center", onclick: "Intercom('showNewMessage'); return false;" do %>
|
||||
<%= lucide_icon("message-square-more", class: "w-5 h-5 text-secondary shrink-0") %>
|
||||
<span class="text-primary text-sm">Contact</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="p-1">
|
||||
<%= button_to session_path(Current.session), method: :delete, class: "btn btn--ghost text-destructive w-full flex gap-2 items-center" do %>
|
||||
<%= lucide_icon("log-out", class: "w-5 h-5 shrink-0") %>
|
||||
<span class="text-sm">Logout</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue