Add navi-list to dropdown box, fix display of dropdown-items.
Change-Id: I217c1904ecb85a75dae045dc0994145870622019
diff --git a/dev/scss/header/header.scss b/dev/scss/header/header.scss
index ccd13bd..560d04e 100644
--- a/dev/scss/header/header.scss
+++ b/dev/scss/header/header.scss
@@ -246,7 +246,9 @@
}
&-item {
- display: block;
+ display: flex;
+ align-items: center;
+ gap: 5px;
padding: .75rem;
font-size: 1rem;
color: $nearly-white;
diff --git a/lib/Kalamar/Plugin/Auth/templates/partial/auth/logout.html.ep b/lib/Kalamar/Plugin/Auth/templates/partial/auth/logout.html.ep
index 5424e57..1b7fd80 100644
--- a/lib/Kalamar/Plugin/Auth/templates/partial/auth/logout.html.ep
+++ b/lib/Kalamar/Plugin/Auth/templates/partial/auth/logout.html.ep
@@ -7,7 +7,11 @@
</h3>
</div>
<div class="dropdown-content dropdown-content--left">
- <%= link_to loc('settings') => 'settings', class => 'dropdown-item' %>
+ <% foreach my $item ($c->navi->list('settings')) { %>
+ <a href="<%= $item->{url} %>" class="dropdown-item" title="<%= $item->{title} %>">
+ <span><%= $item->{title} %></span>
+ </a>
+ <% } %>
<a href="<%= url_for 'logout' %>"
class="dropdown-item logout"
title="<%= loc 'logout' %>: <%= user_handle %>">
diff --git a/t/plugin/auth-oauth.t b/t/plugin/auth-oauth.t
index 9bba5cf..b135f96 100644
--- a/t/plugin/auth-oauth.t
+++ b/t/plugin/auth-oauth.t
@@ -479,8 +479,10 @@
->element_exists_not('aside.off')
->element_exists_not('aside.active')
->element_exists('aside.settings')
+ ->text_is('nav.dropdown a:first-child span','OAuth')
;
+
$t->get_ok('/settings/oauth')
->text_is('form.form-table legend', 'Register new client application')
->attr_is('form.oauth-register','action', '/settings/oauth/register')