navbar conditionals
This commit is contained in:
parent
333ea8847b
commit
92fd236572
@ -1,4 +1,12 @@
|
|||||||
Vue.component("nav-bar", {
|
Vue.component("nav-bar", {
|
||||||
|
computed: {
|
||||||
|
has_moreblocks: function(){
|
||||||
|
return mtinfo.items["moreblocks:circular_saw"];
|
||||||
|
},
|
||||||
|
has_technic_cnc: function(){
|
||||||
|
return mtinfo.items["technic:cnc"];
|
||||||
|
}
|
||||||
|
},
|
||||||
template: /*html*/`
|
template: /*html*/`
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||||
<router-link to="/" class="navbar-brand">MT Info</router-link>
|
<router-link to="/" class="navbar-brand">MT Info</router-link>
|
||||||
@ -19,12 +27,12 @@ Vue.component("nav-bar", {
|
|||||||
<i class="fa fa-search"></i> Search
|
<i class="fa fa-search"></i> Search
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li v-if="has_moreblocks" class="nav-item">
|
||||||
<router-link to="/moreblocks" class="nav-link">
|
<router-link to="/moreblocks" class="nav-link">
|
||||||
<i class="fa fa-th-large"></i> Moreblocks
|
<i class="fa fa-th-large"></i> Moreblocks
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li v-if="has_technic_cnc" class="nav-item">
|
||||||
<router-link to="/cnc" class="nav-link">
|
<router-link to="/cnc" class="nav-link">
|
||||||
<i class="fa fa-th"></i> Technic CNC
|
<i class="fa fa-th"></i> Technic CNC
|
||||||
</router-link>
|
</router-link>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user