-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(header): Chevron right for collapsed - chevron down for expanded #4318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -310,7 +310,7 @@ function getNormalNavBarHTML($running, $user, $bandwidth_options, $view, $skin) | |
| </nav><!-- End First Navbar --> | ||
|
|
||
| <nav class="navbar navbar-expand-md justify-content-center" id="navbar-two" | ||
| <?php echo ( isset($_COOKIE['zmHeaderFlip']) and $_COOKIE['zmHeaderFlip'] == 'down' ) ? 'style="display:none;"' : '' ?> | ||
| <?php echo ( isset($_COOKIE['zmHeaderFlip']) and $_COOKIE['zmHeaderFlip'] == 'hidden' ) ? 'style="display:none;"' : '' ?> | ||
| > | ||
| <div class="container-fluid" id="panel"> | ||
| <?php | ||
|
|
@@ -889,7 +889,7 @@ function getMapHTML($view) { | |
| function getHeaderFlipHTML() { | ||
| $result = ''; | ||
|
|
||
| $header = ( isset($_COOKIE['zmHeaderFlip']) and $_COOKIE['zmHeaderFlip'] == 'down') ? 'down' : 'up'; | ||
| $header = ( isset($_COOKIE['zmHeaderFlip']) and $_COOKIE['zmHeaderFlip'] == 'shown') ? 'down' : 'right'; | ||
| $result .= '<li id="getHeaderFlipHTML" class="nav-item dropdown"><a class="nav-link" href="#"><i id="flip" class="material-icons md-18" style="display: inline-block;">keyboard_arrow_' .$header. '</i></a></li>'.PHP_EOL; | ||
|
Comment on lines
+892
to
893
|
||
|
|
||
| return $result; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -301,12 +301,12 @@ if ( currentView != 'none' && currentView != 'login' ) { | |
| function navbarTwoFlip() { | ||
| $j("#navbar-two").slideToggle("slow"); | ||
| const flip = $j("#flip"); | ||
| if ( flip.html() == 'keyboard_arrow_up' ) { | ||
| flip.html('keyboard_arrow_down'); | ||
| setCookie('zmHeaderFlip', 'down'); | ||
| if ( flip.html() == 'keyboard_arrow_down' ) { | ||
| flip.html('keyboard_arrow_right'); | ||
| setCookie('zmHeaderFlip', 'hidden'); | ||
| } else { | ||
| flip.html('keyboard_arrow_up'); | ||
| setCookie('zmHeaderFlip', 'up'); | ||
| flip.html('keyboard_arrow_down'); | ||
| setCookie('zmHeaderFlip', 'shown'); | ||
|
Comment on lines
301
to
+309
|
||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new cookie value check only hides
#navbar-twowhenzmHeaderFlip == 'hidden'. Users with an existing cookie from previous versions (downwas used to indicate the hidden state) will now get the navbar shown unexpectedly and can end up with icon/state mismatches. Consider treating legacy values (e.g.,down) as equivalent tohidden, or migrating/clearing the cookie.