Fix hash navigation for sidebar footer buttons.

This commit is contained in:
Richard Lewis 2019-08-02 16:29:30 +03:00 committed by Pavel Djundik
parent addd4124bf
commit b994ecd1f1
2 changed files with 10 additions and 5 deletions

View File

@ -25,7 +25,8 @@
aria-label="Sign in" aria-label="Sign in"
><button ><button
class="icon sign-in" class="icon sign-in"
data-target="SignIn" data-target="#sign-in"
data-component="SignIn"
aria-label="Sign in" aria-label="Sign in"
role="tab" role="tab"
aria-controls="sign-in" aria-controls="sign-in"
@ -36,7 +37,8 @@
aria-label="Connect to network" aria-label="Connect to network"
><button ><button
class="icon connect" class="icon connect"
data-target="Connect" data-target="#connect"
data-component="Connect"
aria-label="Connect to network" aria-label="Connect to network"
role="tab" role="tab"
aria-controls="connect" aria-controls="connect"
@ -47,7 +49,8 @@
aria-label="Settings" aria-label="Settings"
><button ><button
class="icon settings" class="icon settings"
data-target="Settings" data-target="#settings"
data-component="Settings"
aria-label="Settings" aria-label="Settings"
role="tab" role="tab"
aria-controls="settings" aria-controls="settings"
@ -58,7 +61,8 @@
aria-label="Help" aria-label="Help"
><button ><button
class="icon help" class="icon help"
data-target="Help" data-target="#help"
data-component="Help"
aria-label="Help" aria-label="Help"
role="tab" role="tab"
aria-controls="help" aria-controls="help"

View File

@ -107,7 +107,8 @@ window.vueMounted = () => {
} }
} else { } else {
vueApp.activeChannel = null; vueApp.activeChannel = null;
vueApp.$store.commit("activeWindow", target); const component = self.attr("data-component");
vueApp.$store.commit("activeWindow", component);
if (!keepSidebarOpen && $(window).outerWidth() <= utils.mobileViewportPixels) { if (!keepSidebarOpen && $(window).outerWidth() <= utils.mobileViewportPixels) {
vueApp.setSidebar(false); vueApp.setSidebar(false);