2024-02-02 09:05:04 -06:00
|
|
|
<!DOCTYPE html>
|
2024-03-11 09:01:50 -05:00
|
|
|
<html class="h-full bg-gray-25">
|
2024-02-02 09:05:04 -06:00
|
|
|
<head>
|
|
|
|
<title><%= content_for(:title) || "Maybe" %></title>
|
|
|
|
<meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
|
|
<meta name="apple-mobile-web-app-title" content="Maybe">
|
|
|
|
<%= csrf_meta_tags %>
|
|
|
|
<%= csp_meta_tag %>
|
2024-03-11 09:01:50 -05:00
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
|
|
|
<link rel="manifest" href="/site.webmanifest">
|
|
|
|
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#ffffff">
|
|
|
|
<meta name="msapplication-TileColor" content="#ffffff">
|
|
|
|
<meta name="theme-color" content="#ffffff">
|
2024-02-02 09:05:04 -06:00
|
|
|
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
|
|
|
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
|
|
|
<%= javascript_importmap_tags %>
|
|
|
|
<%= hotwire_livereload_tags if Rails.env.development? %>
|
2024-02-02 16:15:44 +00:00
|
|
|
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
|
|
|
|
<%= yield :head %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</head>
|
|
|
|
<body class="h-full">
|
2024-03-11 09:01:50 -05:00
|
|
|
<div id="notification-tray" class="fixed z-50 space-y-1 top-6 right-6"></div>
|
2024-02-13 15:19:11 +00:00
|
|
|
<%= safe_join(flash.map { |type, message| notification(message, type: type) }) %>
|
2024-02-02 09:05:04 -06:00
|
|
|
<div class="flex">
|
|
|
|
<div class="flex-col p-5 min-w-80">
|
|
|
|
<div class="flex items-center justify-between">
|
|
|
|
<%= link_to root_path do %>
|
2024-04-09 16:08:58 +04:00
|
|
|
<%= image_tag "logo.svg", alt: "Maybe", class: "h-[22px]" %>
|
2024-02-02 09:05:04 -06:00
|
|
|
<% end %>
|
2024-04-03 17:32:27 -04:00
|
|
|
<div class="relative" data-controller="menu">
|
|
|
|
<button data-menu-target="button">
|
|
|
|
<div class="text-white w-9 h-9 bg-gray-400 rounded-full flex items-center justify-center text-lg uppercase"><%= Current.user.email.first %></div>
|
|
|
|
</button>
|
2024-04-09 16:08:58 +04:00
|
|
|
<div
|
|
|
|
data-menu-target="content"
|
|
|
|
class="hidden absolute min-w-[200px] z-10 top-10 right-0 bg-white p-1 rounded-sm shadow-xs border border-alpha-black-25 w-fit">
|
2024-04-03 17:32:27 -04:00
|
|
|
<%= link_to edit_settings_path, class: "flex gap-1 items-center hover:bg-gray-50 rounded-md p-2" do %>
|
|
|
|
<%= lucide_icon("pencil-line", class: "w-5 h-5 text-gray-500 shrink-0") %>
|
2024-04-13 09:28:45 -04:00
|
|
|
<span class="text-gray-900 text-sm">General Settings</span>
|
|
|
|
<% end %>
|
|
|
|
<% if self_hosted? %>
|
|
|
|
<%= link_to edit_settings_self_hosting_path, class: "flex gap-1 items-center hover:bg-gray-50 rounded-md p-2" do %>
|
|
|
|
<%= lucide_icon("pencil-line", class: "w-5 h-5 text-gray-500 shrink-0") %>
|
|
|
|
<span class="text-gray-900 text-sm">Self Host Settings</span>
|
|
|
|
<% end %>
|
2024-04-03 17:32:27 -04:00
|
|
|
<% end %>
|
|
|
|
<%= button_to session_path, method: :delete, class: "w-full text-gray-900 flex gap-1 items-center hover:bg-gray-50 rounded-md p-2" do %>
|
|
|
|
<%= lucide_icon("log-out", class: "w-5 h-5 shrink-0") %>
|
|
|
|
<span class="text-sm">Logout</span>
|
|
|
|
<% end %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<nav>
|
2024-02-11 12:56:23 -06:00
|
|
|
<ul class="mt-6 space-y-1">
|
2024-02-02 09:05:04 -06:00
|
|
|
<li>
|
2024-04-09 16:08:58 +04:00
|
|
|
<%= sidebar_link_to t(".dashboard"), root_path, icon: "layout-grid" %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</li>
|
2024-02-10 19:12:20 -06:00
|
|
|
<li>
|
2024-04-09 16:08:58 +04:00
|
|
|
<%= sidebar_link_to t(".accounts"), accounts_path, icon: "layers" %>
|
2024-02-10 19:12:20 -06:00
|
|
|
</li>
|
|
|
|
<li>
|
2024-04-09 16:08:58 +04:00
|
|
|
<%= sidebar_link_to t(".transactions"), transactions_path, icon: "credit-card" %>
|
2024-02-10 19:12:20 -06:00
|
|
|
</li>
|
2024-02-02 09:05:04 -06:00
|
|
|
</ul>
|
|
|
|
</nav>
|
2024-02-02 11:45:06 -06:00
|
|
|
<div class="flex flex-col mt-6">
|
2024-02-02 09:05:04 -06:00
|
|
|
<div class="flex items-center justify-between">
|
2024-04-09 16:08:58 +04:00
|
|
|
<%= link_to accounts_path, class: "text-xs uppercase text-gray-500 font-bold tracking-wide" do %>
|
|
|
|
<%= t(".accounts") %>
|
2024-02-06 22:50:11 +03:00
|
|
|
<% end %>
|
2024-04-09 16:08:58 +04:00
|
|
|
<%= link_to new_account_path, class: "block hover:bg-gray-100 p-2 text-sm font-semibold text-gray-900 flex items-center rounded", title: t(".new_account"), data: { turbo_frame: "modal" } do %>
|
2024-02-10 19:39:18 -06:00
|
|
|
<%= lucide_icon("plus", class: "w-5 h-5 text-gray-500") %>
|
2024-02-02 09:05:04 -06:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2024-02-12 17:20:50 -05:00
|
|
|
<%= link_to new_account_path, class: "flex items-center gap-4 px-2 py-3 mb-1 text-gray-500 text-sm font-medium rounded-[10px] hover:bg-gray-100", data: { turbo_frame: "modal" } do %>
|
2024-02-08 21:46:27 +00:00
|
|
|
<%= lucide_icon("plus", class: "w-5 h-5") %>
|
2024-04-09 16:08:58 +04:00
|
|
|
<p><%= t(".new_account") %></p>
|
2024-02-08 21:46:27 +00:00
|
|
|
<% end %>
|
2024-03-21 13:39:10 -04:00
|
|
|
<% account_groups.each do |group| %>
|
2024-04-09 16:08:58 +04:00
|
|
|
<%= render "accounts/account_list", group: group %>
|
2024-02-08 21:46:27 +00:00
|
|
|
<% end %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-03-11 09:01:50 -05:00
|
|
|
<main class="flex-grow px-20 py-6">
|
2024-02-02 09:05:04 -06:00
|
|
|
<%= yield %>
|
|
|
|
</main>
|
|
|
|
</div>
|
2024-02-08 10:46:05 -06:00
|
|
|
<%= turbo_frame_tag "modal" %>
|
2024-04-09 16:08:58 +04:00
|
|
|
<%= render "shared/custom_confirm_modal" %>
|
2024-04-13 09:28:45 -04:00
|
|
|
<%= render "shared/upgrade_notification" %>
|
2024-02-02 09:05:04 -06:00
|
|
|
</body>
|
|
|
|
</html>
|