diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b5ce90da8069387063f62a6fc7d85e4a2d4c3ac2..8cb401a23aa2ad0a9449226d30e1ac11d990e830 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -21,6 +21,8 @@ Fixed * The icons were loaded from external servers instead from local server. * Weekdays were not translated if system locales were missing * Added locales-all to base image and note to docs +* The icons in the account menu were still the old ones. +* Due to a merge error, the once removed account menu in the sidenav appeared again. Changed ~~~~~~~ diff --git a/aleksis/core/menus.py b/aleksis/core/menus.py index 4d2a2d08328de7a4f9c3ce52d91a088d90dd1a88..a714559e822ebe69e3e32e7c3d1bdd1791436a1d 100644 --- a/aleksis/core/menus.py +++ b/aleksis/core/menus.py @@ -45,90 +45,10 @@ MENUS = { "validators": [ ( "aleksis.core.util.predicates.permission_validator", - "core.view_notifications", + "core.view_notifications_rule", ), ], }, - { - "name": _("Account"), - "url": "#", - "svg_icon": "mdi:account-outline", - "root": True, - "validators": ["menu_generator.validators.is_authenticated"], - "submenu": [ - { - "name": _("Stop impersonation"), - "url": "impersonate-stop", - "svg_icon": "mdi:stop", - "validators": [ - "menu_generator.validators.is_authenticated", - "aleksis.core.util.core_helpers.is_impersonate", - ], - }, - { - "name": _("Logout"), - "url": "logout", - "svg_icon": "mdi:logout-variant", - "validators": ["menu_generator.validators.is_authenticated"], - }, - { - "name": _("2FA"), - "url": "two_factor:profile", - "svg_icon": "mdi:two-factor-authentication", - "validators": [ - "menu_generator.validators.is_authenticated", - ], - }, - { - "name": _("Change password"), - "url": "account_change_password", - "svg_icon": "mdi:form-textbox-password", - "validators": [ - "menu_generator.validators.is_authenticated", - ( - "aleksis.core.util.predicates.permission_validator", - "core.can_change_password", - ), - ], - }, - { - "name": _("Me"), - "url": "person", - "svg_icon": "mdi:emoticon-outline", - "validators": [ - "menu_generator.validators.is_authenticated", - "aleksis.core.util.core_helpers.has_person", - ], - }, - { - "name": _("Preferences"), - "url": "preferences_person", - "svg_icon": "mdi:cog-outline", - "validators": [ - "menu_generator.validators.is_authenticated", - "aleksis.core.util.core_helpers.has_person", - ], - }, - { - "name": _("Third-party accounts"), - "url": "socialaccount_connections", - "svg_icon": "mdi:earth", - "validators": [ - "menu_generator.validators.is_authenticated", - "aleksis.core.util.core_helpers.has_person", - ], - }, - { - "name": _("Authorized applications"), - "url": "oauth2_provider:authorized-token-list", - "svg_icon": "mdi:gesture-tap-hold", - "validators": [ - "menu_generator.validators.is_authenticated", - "aleksis.core.util.core_helpers.has_person", - ], - }, - ], - }, { "name": _("Admin"), "url": "#", @@ -333,7 +253,7 @@ MENUS = { { "name": _("Stop impersonation"), "url": "impersonate-stop", - "icon": "stop", + "svg_icon": "mdi:stop", "validators": [ "menu_generator.validators.is_authenticated", "aleksis.core.util.core_helpers.is_impersonate", @@ -342,7 +262,7 @@ MENUS = { { "name": _("Account"), "url": "person", - "icon": "person", + "svg_icon": "mdi:account-outline", "validators": [ "menu_generator.validators.is_authenticated", "aleksis.core.util.core_helpers.has_person", @@ -351,7 +271,7 @@ MENUS = { { "name": _("Preferences"), "url": "preferences_person", - "icon": "settings", + "svg_icon": "mdi:cog-outline", "validators": [ "menu_generator.validators.is_authenticated", "aleksis.core.util.core_helpers.has_person", @@ -360,7 +280,7 @@ MENUS = { { "name": _("2FA"), "url": "two_factor:profile", - "icon": "phonelink_lock", + "svg_icon": "mdi:two-factor-authentication", "validators": [ "menu_generator.validators.is_authenticated", ], @@ -368,7 +288,7 @@ MENUS = { { "name": _("Change password"), "url": "account_change_password", - "icon": "lock", + "svg_icon": "mdi:form-textbox-password", "validators": [ "menu_generator.validators.is_authenticated", ( @@ -380,7 +300,7 @@ MENUS = { { "name": _("Third-party accounts"), "url": "socialaccount_connections", - "icon": "public", + "svg_icon": "mdi:earth", "validators": [ "menu_generator.validators.is_authenticated", "aleksis.core.util.core_helpers.has_person", @@ -389,7 +309,7 @@ MENUS = { { "name": _("Authorized applications"), "url": "oauth2_provider:authorized-token-list", - "icon": "touch_app", + "svg_icon": "mdi:gesture-tap-hold", "validators": [ "menu_generator.validators.is_authenticated", "aleksis.core.util.core_helpers.has_person", @@ -399,7 +319,7 @@ MENUS = { "divider": True, "name": _("Logout"), "url": "logout", - "icon": "exit_to_app", + "svg_icon": "mdi:logout-variant", "validators": ["menu_generator.validators.is_authenticated"], }, ], diff --git a/aleksis/core/static/public/style.scss b/aleksis/core/static/public/style.scss index 26ac19ca5d715923f279e9eb07b8e172110aa4bf..832a80c4b2c5e4fd8395790284c468996a8d5c8e 100644 --- a/aleksis/core/static/public/style.scss +++ b/aleksis/core/static/public/style.scss @@ -850,15 +850,15 @@ $person-logo-size: 20vh; } } -i.material-icons.new-notification { +a.new-notification { position: relative; &:after { content: ""; position: absolute; - width: 12px; - height: 12px; - bottom: 27%; - right: -4%; + width: 10px; + height: 10px; + bottom: 30%; + right: 19%; background-color: $secondary-color; border-radius: 50%; } diff --git a/aleksis/core/templates/core/base.html b/aleksis/core/templates/core/base.html index 56ba89c532ea7fbbbe20f8ebfb68830d16d61044..3158986ac5ed921244b43663e64c2fe9d728cd32 100644 --- a/aleksis/core/templates/core/base.html +++ b/aleksis/core/templates/core/base.html @@ -80,11 +80,10 @@ <ul class="account-nav"> {% trans "Notifications" as notifications_text %} <li> - <a href="{% url "notifications" %}" class="tooltipped" data-position="bottom" + <a href="{% url "notifications" %}" data-position="bottom" + class="tooltipped {% if request.user.person.unread_notifications_count > 0 %}new-notification{% endif %}" data-tooltip="{{ notifications_text }}" aria-label="{{ notifications_text }}"> - <i class="material-icons {% if request.user.person.unread_notifications_count > 0 %}new-notification{% endif %}"> - notifications - </i> + <i class="material-icons iconify" data-icon="mdi:bell-outline"></i> </a> </li> <li> @@ -113,6 +112,8 @@ <a href="{{ item.url }}"> {% if item.icon %} <i class="material-icons">{{ item.icon }}</i> + {% elif item.svg_icon %} + <i class="material-icons iconify" data-icon="{{ item.svg_icon }}"></i> {% endif %} {{ item.name }} </a>