Show settings only on demand
Change-Id: Ib9f639613bbffdfa987f7e6b60c556fe3f3deeb4
diff --git a/Changes b/Changes
index cc2f5af..2772909 100755
--- a/Changes
+++ b/Changes
@@ -31,6 +31,7 @@
- Add option to toggle password fields.
- Add "copy to clipboard" feature for input fields.
- Add "copy to clipboard" for client id.
+ - Show settings only on demand.
WARNING: Upgrading to Mojolicious 9.19 will
invalidate all sessions. This is a security update.
diff --git a/t/plugin/auth-oauth.t b/t/plugin/auth-oauth.t
index b63c668..7db935f 100644
--- a/t/plugin/auth-oauth.t
+++ b/t/plugin/auth-oauth.t
@@ -208,7 +208,7 @@
->element_exists('div.notify-success')
->text_is('div.notify-success', 'Login successful')
->element_exists_not('aside.off')
- ->element_exists('aside.active')
+ ->element_exists_not('aside.active')
->element_exists('aside.settings')
;
@@ -434,7 +434,7 @@
->element_exists('div.notify-success')
->text_is('div.notify-success', 'Login successful')
->element_exists_not('aside.off')
- ->element_exists('aside.active')
+ ->element_exists_not('aside.active')
->element_exists('aside.settings')
;
diff --git a/templates/de/intro.html.ep b/templates/de/intro.html.ep
index 671174f..970aa7a 100644
--- a/templates/de/intro.html.ep
+++ b/templates/de/intro.html.ep
@@ -1,4 +1,4 @@
-% layout 'main', sidebar_active => 1;
+% layout 'main', login_active => 1;
<div class="intro">
<p><strong>KorAP</strong> ist eine neue Korpusanalyseplattform, optimiert für große, mehrfach annotierte Korpora und komplexe Suchmechanismen. Dabei versucht KorAP unabhängig von spezifischen Forschungsfragen zu sein.</p>
diff --git a/templates/intro.html.ep b/templates/intro.html.ep
index d7bc769..975a9ab 100644
--- a/templates/intro.html.ep
+++ b/templates/intro.html.ep
@@ -1,4 +1,4 @@
-% layout 'main', sidebar_active => 1;
+% layout 'main', login_active => 1;
<div class="intro">
diff --git a/templates/partial/side.html.ep b/templates/partial/side.html.ep
index 950339c..a8deb0e 100644
--- a/templates/partial/side.html.ep
+++ b/templates/partial/side.html.ep
@@ -9,10 +9,12 @@
% };
% }
-% unless (length($side_bar) > 1) {
+% if (length($side_bar) == 0) {
% $classes .= ' off';
% } elsif (stash('sidebar_active')) {
% $classes .= ' active';
+% } elsif (stash('login_active') && !$classes) {
+% $classes .= ' active';
% };