Take the support drawer back out of the topbar (sow-nodebb-plugin-support#10)
Support case notifications now live in the notification bell, as a "Cases" filter button added by nodebb-plugin-support on core's own hooks. The plugin owns all of it, so this theme's second bell — its icon, drawer, client code, language keys and tests — comes out. The theme was the wrong home for it. The drawer's markup and JS lived here, so whether the support plugin could notify anyone depended on which theme a forum ran. Nothing about support belongs in a theme. The `/support` link is unaffected; it comes from the ACP navigation, which this theme already renders in both the desktop bar and the mobile drawer. Checked in a browser on the dev stack: no support icon in the topbar, and the bell's new tab filters a mixed notification list correctly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,52 +0,0 @@
|
||||
<a data-bs-toggle="dropdown" data-bs-auto-close="outside" href="#" role="button" class="nav-link dropdown-toggle d-flex align-items-center justify-content-center" aria-haspopup="true" aria-expanded="false" aria-label="[[westgate:support-inbox.title]]">
|
||||
<span class="position-relative">
|
||||
<i component="support/icon" class="fa fa-fw fa-life-ring" aria-hidden="true"></i>
|
||||
<span component="support/count" class="position-absolute top-0 start-100 translate-middle badge rounded-1 bg-primary {{{ if !support.unreadCount }}}hidden{{{ end }}}">{support.unreadCount}</span>
|
||||
</span>
|
||||
</a>
|
||||
<ul class="notifications-dropdown dropdown-menu wg-topbar__dropdown p-1 shadow" role="menu">
|
||||
{{{ if !config.hideReadNotifications }}}
|
||||
<li class="d-flex gap-1 align-items-center">
|
||||
<button type="button" class="btn btn-ghost btn-sm ff-secondary active px-3" data-filter="all">[[notifications:all]]</button>
|
||||
<button type="button" class="btn btn-ghost btn-sm ff-secondary d-flex align-items-center gap-2" data-filter="unread">[[unread:title]] <span component="support/count" class="{{{ if !support.unreadCount }}}hidden{{{ end }}}">{support.unreadCount}</span></button>
|
||||
</li>
|
||||
<li class="dropdown-divider"></li>
|
||||
{{{ end }}}
|
||||
<li>
|
||||
<div component="support/list" class="list-container notification-list overscroll-behavior-contain pe-1 ff-base ghost-scrollbar">
|
||||
<div class="mb-2 p-1">
|
||||
<div class="d-flex gap-1 justify-content-between">
|
||||
<div class="d-flex gap-2 flex-grow-1 placeholder-wave">
|
||||
<div class="placeholder" style="width: 32px; height: 32px;"></div>
|
||||
<div class="flex-grow-1">
|
||||
<div class="d-flex flex-column">
|
||||
<div class="text-sm">
|
||||
<span class="placeholder placeholder-sm col-4"></span>
|
||||
<span class="placeholder placeholder-sm col-6"></span>
|
||||
<span class="placeholder placeholder-sm col-7"></span>
|
||||
<span class="placeholder placeholder-sm col-2"></span>
|
||||
<span class="placeholder placeholder-sm col-5"></span>
|
||||
</div>
|
||||
<div class="text-xs">
|
||||
<div class="placeholder placeholder-xs col-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button class="mark-read btn btn-ghost btn-sm d-flex align-items-center justify-content-center flex-grow-0 flex-shrink-0 p-1" style="width: 1.5rem; height: 1.5rem;">
|
||||
<i class="unread fa fa-2xs fa-circle text-primary"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li class="dropdown-divider"></li>
|
||||
<li>
|
||||
<div class="d-flex justify-content-center gap-1 flex-wrap">
|
||||
<a role="button" href="#" class="btn btn-sm btn-light mark-all-read flex-fill text-nowrap text-truncate ff-secondary"><i class="fa fa-check-double" aria-hidden="true"></i> [[notifications:mark-all-read]]</a>
|
||||
<a class="btn btn-sm btn-primary flex-fill text-nowrap text-truncate ff-secondary" href="{relative_path}/support"><i class="fa fa-life-ring" aria-hidden="true"></i> [[westgate:support-inbox.view-all]]</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -45,12 +45,6 @@
|
||||
<!-- IMPORT partials/sidebar/notifications.tpl -->
|
||||
</li>
|
||||
|
||||
{{{ if support.visible }}}
|
||||
<li component="support" class="nav-item support dropdown" title="[[westgate:support-inbox.title]]">
|
||||
<!-- IMPORT partials/header/support-drawer.tpl -->
|
||||
</li>
|
||||
{{{ end }}}
|
||||
|
||||
{{{ if canChat }}}
|
||||
<li class="nav-item chats dropdown" title="[[global:header.chats]]">
|
||||
<!-- IMPORT partials/sidebar/chats.tpl -->
|
||||
@@ -121,9 +115,6 @@
|
||||
<div class="wg-topbar__drawer-actions">
|
||||
<a href="{relative_path}/unread"><i class="fa fa-fw fa-inbox" aria-hidden="true"></i><span>[[unread:title]]</span><span component="unread/count" class="badge rounded-1 bg-primary {{{ if !unreadCount.topic }}}hidden{{{ end }}}">{unreadCount.topic}</span></a>
|
||||
<a href="{relative_path}/notifications"><i class="fa fa-fw fa-bell" aria-hidden="true"></i><span>[[global:header.notifications]]</span><span component="notifications/count" class="badge rounded-1 bg-primary {{{ if !unreadCount.notification }}}hidden{{{ end }}}">{unreadCount.notification}</span></a>
|
||||
{{{ if support.visible }}}
|
||||
<a href="{relative_path}/support"><i class="fa fa-fw fa-life-ring" aria-hidden="true"></i><span>[[westgate:support-inbox.title]]</span><span component="support/count" class="badge rounded-1 bg-primary {{{ if !support.unreadCount }}}hidden{{{ end }}}">{support.unreadCount}</span></a>
|
||||
{{{ end }}}
|
||||
{{{ if canChat }}}
|
||||
<a href="{relative_path}/user/{user.userslug}/chats{{{ if user.lastRoomId }}}/{user.lastRoomId}{{{ end }}}"><i class="fa fa-fw fa-comment" aria-hidden="true"></i><span>[[global:header.chats]]</span><span component="chat/count" class="badge rounded-1 bg-primary {{{ if !unreadCount.chat }}}hidden{{{ end }}}">{unreadCount.chat}</span></a>
|
||||
{{{ end }}}
|
||||
|
||||
Reference in New Issue
Block a user