Sfoglia il codice sorgente

Closes #17222: Improve visibility of notifications icon (#20035)

Jeremy Stretch 6 mesi fa
parent
commit
fce10c73b7

+ 2 - 2
netbox/templates/htmx/notifications.html

@@ -15,14 +15,14 @@
           <div class="d-block text-secondary fs-5">{{ notification.event }} {{ notification.created|timesince }} {% trans "ago" %}</div>
           <div class="d-block text-secondary fs-5">{{ notification.event }} {{ notification.created|timesince }} {% trans "ago" %}</div>
         </div>
         </div>
         <div class="col-auto">
         <div class="col-auto">
-          <a href="#" hx-get="{% url 'extras:notification_dismiss' pk=notification.pk %}" hx-target="closest .notifications" class="list-group-item-actions text-secondary" title="{% trans "Dismiss" %}">
+          <a href="#" hx-get="{% url 'extras:notification_dismiss' pk=notification.pk %}" hx-target="closest .notifications" class="list-group-item-actions text-red" title="{% trans "Dismiss" %}">
             <i class="mdi mdi-close"></i>
             <i class="mdi mdi-close"></i>
           </a>
           </a>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
   {% empty %}
   {% empty %}
-    <div class="dropdown-item text-muted">
+    <div class="dropdown-item disabled">
       {% trans "No unread notifications" %}
       {% trans "No unread notifications" %}
     </div>
     </div>
   {% endfor %}
   {% endfor %}

+ 2 - 2
netbox/templates/inc/light_toggle.html

@@ -1,10 +1,10 @@
 {% load i18n %}
 {% load i18n %}
 
 
 <div class="d-flex ms-2">
 <div class="d-flex ms-2">
-  <button class="btn color-mode-toggle hide-theme-dark" title="{% trans "Enable dark mode" %}" data-bs-toggle="tooltip" data-bs-placement="bottom">
+  <button class="nav-link color-mode-toggle hide-theme-dark fs-2 p-0 text-secondary" title="{% trans "Enable dark mode" %}" data-bs-toggle="tooltip" data-bs-placement="bottom">
     <i class="mdi mdi-lightbulb"></i>
     <i class="mdi mdi-lightbulb"></i>
   </button>
   </button>
-  <button class="btn color-mode-toggle hide-theme-light" title="{% trans "Enable light mode" %}" data-bs-toggle="tooltip" data-bs-placement="bottom">
+  <button class="nav-link color-mode-toggle hide-theme-light fs-2 p-0 text-secondary" title="{% trans "Enable light mode" %}" data-bs-toggle="tooltip" data-bs-placement="bottom">
     <i class="mdi mdi-lightbulb-on"></i>
     <i class="mdi mdi-lightbulb-on"></i>
   </button>
   </button>
 </div>
 </div>

+ 2 - 1
netbox/templates/inc/notification_bell.html

@@ -1,6 +1,7 @@
 {% if notifications %}
 {% if notifications %}
   <span class="text-primary" id="notifications-alert" hx-swap-oob="true">
   <span class="text-primary" id="notifications-alert" hx-swap-oob="true">
-    <i class="mdi mdi-bell-badge"></i>
+    <i class="mdi mdi-bell-ring"></i>
+    <span class="badge bg-red"></span>
   </span>
   </span>
 {% else %}
 {% else %}
   <span class="text-muted" id="notifications-alert" hx-swap-oob="true">
   <span class="text-muted" id="notifications-alert" hx-swap-oob="true">

+ 2 - 2
netbox/templates/inc/user_menu.html

@@ -12,9 +12,9 @@
   {# Notifications #}
   {# Notifications #}
   {% with notifications=request.user.notifications.unread.exists %}
   {% with notifications=request.user.notifications.unread.exists %}
     <div class="dropdown">
     <div class="dropdown">
-      <a href="#" class="nav-link px-1" data-bs-toggle="dropdown" hx-get="{% url 'extras:notifications' %}" hx-target="next .notifications" aria-label="{% trans "Notifications" %}">
+      <button class="nav-link fs-2 p-0" data-bs-toggle="dropdown" hx-get="{% url 'extras:notifications' %}" hx-target="next .notifications" aria-label="{% trans "Notifications" %}">
         {% include 'inc/notification_bell.html' %}
         {% include 'inc/notification_bell.html' %}
-      </a>
+      </button>
       <div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow notifications"></div>
       <div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow notifications"></div>
     </div>
     </div>
   {% endwith %}
   {% endwith %}