diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-11-30 00:33:20 +0200 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-11-30 00:33:20 +0200 |
commit | dcc6f35266de1f56d7e9536311f0ff56b57c0fdc (patch) | |
tree | 748932c6fc1c0558dd6e36fff69c2bc1eafc84a0 /src/js/arching-kaos-spa-router.js | |
parent | 6fda741ab062decc2351a3707c7a57cdcf25a18b (diff) | |
download | arching-kaos-web-ui-dcc6f35266de1f56d7e9536311f0ff56b57c0fdc.tar.gz arching-kaos-web-ui-dcc6f35266de1f56d7e9536311f0ff56b57c0fdc.tar.bz2 arching-kaos-web-ui-dcc6f35266de1f56d7e9536311f0ff56b57c0fdc.zip |
More refactoring and fixing a bug on spa-router
Diffstat (limited to 'src/js/arching-kaos-spa-router.js')
-rw-r--r-- | src/js/arching-kaos-spa-router.js | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/js/arching-kaos-spa-router.js b/src/js/arching-kaos-spa-router.js index 162a316..d1cf2a4 100644 --- a/src/js/arching-kaos-spa-router.js +++ b/src/js/arching-kaos-spa-router.js @@ -48,19 +48,27 @@ export function locationHashOnChange() route.menuid = '#'+route.args[1]; route.subcommand = route.args[2]; menuinit(); - if ( (locationHashGetter() !== 'undefined') && (locationHashGetter() === '') ){ - getWelcomeSection.hidden=false; + if ( (locationHashGetter() !== 'undefined') && (locationHashGetter() === '') ) + { + getWelcomeSection().hidden=false; } - else if ( route.args[1] == "route" ) { - getWelcomeSection.hidden=false; - if ( route.args.length === 4 ) { - if ( route.args[2] === "zblock" ) { + else if ( route.args[1] == "route" ) + { + getWelcomeSection().hidden=false; + if ( route.args.length === 4 ) + { + if ( route.args[2] === "zblock" ) + { seekZblock(route.args[3], ['search', false]); } } - } else if ( (locationHashGetter() !== 'undefined') && ( menuids().includes(route.menuid))){ + } + else if ( (locationHashGetter() !== 'undefined') && ( menuids().includes(route.menuid))) + { document.querySelector(route.menuid).hidden=false; - } else { + } + else + { getSoftError().hidden=false; } } |