Commit 3ba78b69 authored by janis.streib's avatar janis.streib 🦉
Browse files

ADD: navbar support for js-only-mods

parent 2407f5ab
Pipeline #106651 passed with stages
in 7 minutes and 47 seconds
...@@ -13,9 +13,12 @@ ...@@ -13,9 +13,12 @@
<!-- Collect the nav links, forms, and other content for toggling --> <!-- Collect the nav links, forms, and other content for toggling -->
<b-collapse is-nav id="navbarNavDropdown" ref="navdropdown"> <b-collapse is-nav id="navbarNavDropdown" ref="navdropdown">
<b-navbar-nav> <b-navbar-nav>
<b-nav-item v-if="$sysinfo_mods_by_name['dnsvs']" to="/dnsvs/" <b-nav-item v-if="$sysinfo_js_mods.includes('dnsvs')" to="/dnsvs/"
:active="$route.path.startsWith('/dnsvs/')">DNSVS :active="$route.path.startsWith('/dnsvs/')">DNSVS
</b-nav-item> </b-nav-item>
<b-nav-item v-if="$sysinfo_js_mods.includes('macauth')" to="/macauth/"
:active="$route.path.startsWith('/macauth/')">MACAuth
</b-nav-item>
<b-nav-item v-if="$sysinfo_mods_by_name['dhcp_leases']" to="/dhcp-leases/" <b-nav-item v-if="$sysinfo_mods_by_name['dhcp_leases']" to="/dhcp-leases/"
:active="$route.path.startsWith('/dhcp-leases/')">DHCP-Leases :active="$route.path.startsWith('/dhcp-leases/')">DHCP-Leases
</b-nav-item> </b-nav-item>
......
...@@ -289,6 +289,7 @@ SystemInfoService.getAll().then((sysinfo) => { ...@@ -289,6 +289,7 @@ SystemInfoService.getAll().then((sysinfo) => {
mods_by_name[sysinfo.data.mods[i].name] = sysinfo.data.mods[i] mods_by_name[sysinfo.data.mods[i].name] = sysinfo.data.mods[i]
} }
Vue.prototype.$sysinfo_mods_by_name = mods_by_name Vue.prototype.$sysinfo_mods_by_name = mods_by_name
Vue.prototype.$sysinfo_js_mods = sysinfo.data.js_mods
let v = new Vue({ let v = new Vue({
router, router,
store, store,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment