Rende il CRM comodo da usare anche da cellulare.
Aggiunge navigazione mobile dedicata e trasforma le principali liste operative in layout più leggibili e facili da toccare. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -11,8 +11,10 @@
|
||||
})();
|
||||
</script>
|
||||
<title><%= page_title %><% if current_project %> · <%= current_project.name %><% end %> · <%= app_name %></title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||
<meta name="application-name" content="<%= app_name %>">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
@@ -60,63 +62,58 @@
|
||||
</aside>
|
||||
|
||||
<div class="flex min-w-0 flex-1 flex-col">
|
||||
<header class="sticky top-0 z-20 border-b border-zinc-200 bg-white/90 backdrop-blur dark:border-zinc-800 dark:bg-zinc-950/90">
|
||||
<div class="flex flex-wrap items-center gap-3 px-4 py-3 md:px-6">
|
||||
<div class="md:hidden">
|
||||
<%= link_to root_path, class: "flex items-center gap-2 font-semibold tracking-tight" do %>
|
||||
<header class="sticky top-0 z-20 border-b border-zinc-200 bg-white/90 pt-[env(safe-area-inset-top)] backdrop-blur dark:border-zinc-800 dark:bg-zinc-950/90">
|
||||
<div class="flex items-center gap-2 px-3 py-2 md:gap-3 md:px-6 md:py-3">
|
||||
<div class="min-w-0 md:hidden">
|
||||
<%= link_to root_path, class: "flex max-w-[9rem] items-center gap-2 font-semibold tracking-tight" do %>
|
||||
<%= render "shared/logo", variant: :mark, size: :xs %>
|
||||
<span><%= current_project.name %></span>
|
||||
<span class="truncate"><%= current_project.name %></span>
|
||||
<% end %>
|
||||
<%= link_to "Progetti", root_path, class: "text-xs text-zinc-500" %>
|
||||
</div>
|
||||
<%= form_with url: search_path, method: :get, class: "flex min-w-0 flex-1" do %>
|
||||
<%= text_field_tag :q, params[:q], placeholder: "Cerca in #{current_project.name}…", class: input_class %>
|
||||
<%= form_with url: search_path, method: :get, class: "min-w-0 flex-1" do %>
|
||||
<%= text_field_tag :q, params[:q], placeholder: "Cerca…", class: "#{input_class} min-h-10 py-2", aria: { label: "Cerca in #{current_project.name}" } %>
|
||||
<% end %>
|
||||
<div class="relative" data-controller="dropdown">
|
||||
<button type="button" data-action="dropdown#toggle" class="<%= btn_primary %>">+ Nuovo</button>
|
||||
<div class="relative shrink-0" data-controller="dropdown">
|
||||
<button type="button" data-action="dropdown#toggle" class="<%= btn_primary %> px-3">
|
||||
<span class="md:hidden">+</span>
|
||||
<span class="hidden md:inline">+ Nuovo</span>
|
||||
</button>
|
||||
<div data-dropdown-target="menu" class="absolute right-0 z-30 mt-2 hidden w-48 rounded-lg border border-zinc-200 bg-white py-1 shadow-lg dark:border-zinc-700 dark:bg-zinc-900">
|
||||
<%= link_to "Organizzazione", new_organization_path, class: "block px-4 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Contatto", new_contact_path, class: "block px-4 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Opportunità", new_opportunity_path, class: "block px-4 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Task", new_task_path, class: "block px-4 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Invio email", new_mailing_path, class: "block px-4 py-2 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Organizzazione", new_organization_path, class: "block px-4 py-2.5 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Contatto", new_contact_path, class: "block px-4 py-2.5 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Opportunità", new_opportunity_path, class: "block px-4 py-2.5 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Task", new_task_path, class: "block px-4 py-2.5 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
<%= link_to "Invio email", new_mailing_path, class: "block px-4 py-2.5 text-sm hover:bg-zinc-50 dark:hover:bg-zinc-800" %>
|
||||
</div>
|
||||
</div>
|
||||
<%= render "shared/theme_toggle" %>
|
||||
<%= render "shared/user_menu" %>
|
||||
</div>
|
||||
<nav class="flex gap-1 overflow-x-auto border-t border-zinc-100 px-2 py-2 dark:border-zinc-800 md:hidden">
|
||||
<%= link_to "Home", project_root_path, class: "whitespace-nowrap rounded px-2 py-1 text-xs font-medium text-zinc-700 dark:text-zinc-300" %>
|
||||
<%= link_to "Oggi", today_path, class: "whitespace-nowrap rounded px-2 py-1 text-xs font-medium text-zinc-700 dark:text-zinc-300" %>
|
||||
<%= link_to "Org", organizations_path, class: "whitespace-nowrap rounded px-2 py-1 text-xs font-medium text-zinc-700 dark:text-zinc-300" %>
|
||||
<%= link_to "Pipeline", pipeline_path, class: "whitespace-nowrap rounded px-2 py-1 text-xs font-medium text-zinc-700 dark:text-zinc-300" %>
|
||||
<%= link_to "Task", tasks_path, class: "whitespace-nowrap rounded px-2 py-1 text-xs font-medium text-zinc-700 dark:text-zinc-300" %>
|
||||
<%= link_to "Email", dashboard_mailings_path, class: "whitespace-nowrap rounded px-2 py-1 text-xs font-medium text-zinc-700 dark:text-zinc-300" %>
|
||||
<% if current_user.admin? %>
|
||||
<%= link_to "Utenti", users_path, class: "whitespace-nowrap rounded px-2 py-1 text-xs font-medium text-zinc-700 dark:text-zinc-300" %>
|
||||
<% end %>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="min-w-0 flex-1 overflow-x-hidden p-4 md:p-6">
|
||||
<main class="min-w-0 flex-1 overflow-x-hidden p-4 pb-24 md:p-6">
|
||||
<div id="flash"><%= render "shared/flash" %></div>
|
||||
<%= yield %>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
<div class="md:hidden" data-controller="sheet">
|
||||
<%= render "shared/mobile_bottom_nav" %>
|
||||
<%= render "shared/mobile_more_sheet" %>
|
||||
</div>
|
||||
<% elsif logged_in? %>
|
||||
<div data-controller="modal" data-modal-open-value="<%= params[:new_project].present? %>">
|
||||
<header class="border-b border-zinc-200 bg-white dark:border-zinc-800 dark:bg-zinc-950">
|
||||
<div class="mx-auto flex max-w-5xl items-center justify-between gap-3 px-4 py-4">
|
||||
<div>
|
||||
<header class="border-b border-zinc-200 bg-white pt-[env(safe-area-inset-top)] dark:border-zinc-800 dark:bg-zinc-950">
|
||||
<div class="mx-auto flex max-w-5xl items-center justify-between gap-3 px-4 py-3 md:py-4">
|
||||
<div class="min-w-0">
|
||||
<%= link_to root_path, class: "text-zinc-900 dark:text-zinc-100" do %>
|
||||
<%= render "shared/logo", subtitle: (@page_title || "Seleziona un'istanza progetto") %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<div class="flex shrink-0 items-center gap-2">
|
||||
<% if current_user.admin? %>
|
||||
<button type="button" data-action="modal#show" class="<%= btn_primary %>" aria-label="Nuovo progetto" title="Nuovo progetto">+</button>
|
||||
<%= link_to "Impostazioni", admin_path, class: btn_secondary %>
|
||||
<%= link_to "Impostazioni", admin_path, class: "#{btn_secondary} hidden sm:inline-flex" %>
|
||||
<% end %>
|
||||
<%= render "shared/theme_toggle" %>
|
||||
<%= render "shared/user_menu" %>
|
||||
@@ -132,7 +129,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="absolute right-4 top-4 z-10">
|
||||
<div class="absolute right-4 top-[max(1rem,env(safe-area-inset-top))] z-10">
|
||||
<%= render "shared/theme_toggle" %>
|
||||
</div>
|
||||
<main class="min-h-screen">
|
||||
|
||||
Reference in New Issue
Block a user