feat: replace notifications with import status in profile dropdown
Remove the notification system entirely and show import progress directly in the user dropdown menu. Block new imports while one is already running. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{% if app.user %}
|
||||
<div data-controller="import-modal">
|
||||
<nav class="navbar" data-controller="notifications">
|
||||
<nav class="navbar">
|
||||
<div class="navbar-left">
|
||||
<a href="{{ path('app_homepage') }}" class="navbar-brand">Actorle</a>
|
||||
</div>
|
||||
@@ -12,33 +12,21 @@
|
||||
</svg>
|
||||
</a>
|
||||
|
||||
{# Notifications #}
|
||||
<div class="navbar-item" data-controller="dropdown">
|
||||
<button class="navbar-icon" data-action="click->dropdown#toggle click->notifications#markRead" data-dropdown-target="trigger">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/>
|
||||
<path d="M13.73 21a2 2 0 0 1-3.46 0"/>
|
||||
</svg>
|
||||
<span class="badge" data-notifications-target="badge" hidden></span>
|
||||
</button>
|
||||
<div class="dropdown-menu" data-dropdown-target="menu" hidden>
|
||||
<div class="dropdown-header">Notifications</div>
|
||||
<div data-notifications-target="list" class="notifications-list">
|
||||
<p class="dropdown-empty">Aucune notification</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# User menu #}
|
||||
<div class="navbar-item" data-controller="dropdown">
|
||||
<div class="navbar-item" data-controller="dropdown import-status">
|
||||
<button class="navbar-icon" data-action="click->dropdown#toggle" data-dropdown-target="trigger">
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/>
|
||||
<circle cx="12" cy="7" r="4"/>
|
||||
</svg>
|
||||
<span class="badge" data-import-status-target="badge" hidden></span>
|
||||
</button>
|
||||
<div class="dropdown-menu" data-dropdown-target="menu" hidden>
|
||||
<button class="dropdown-item" data-action="click->import-modal#open">Importer ses films</button>
|
||||
<div class="import-status-item" data-import-status-target="item">
|
||||
<button class="dropdown-item" data-action="click->import-modal#open" data-import-status-target="importBtn">
|
||||
Importer ses films
|
||||
</button>
|
||||
</div>
|
||||
<a href="{{ path('app_logout') }}" class="dropdown-item">Se déconnecter</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user