|
@@ -17,8 +17,11 @@
|
|
{{ $t('sections.' + link.to) }}
|
|
{{ $t('sections.' + link.to) }}
|
|
</b-dropdown-item>
|
|
</b-dropdown-item>
|
|
|
|
|
|
- <b-dropdown-item v-for="name in subRoutes" :key="name" :to="{ name }">
|
|
|
|
- {{ $t('sections.' + name) }}
|
|
|
|
|
|
+ <b-dropdown-item
|
|
|
|
+ v-for="page in burger" :key="page.id"
|
|
|
|
+ :to="{ name: page.name, params: page.id ? { id: page.id } : {} }"
|
|
|
|
+ >
|
|
|
|
+ {{ page.id ? page.title : $t('sections.' + page.name ) }}
|
|
</b-dropdown-item>
|
|
</b-dropdown-item>
|
|
</b-dropdown>
|
|
</b-dropdown>
|
|
|
|
|
|
@@ -57,6 +60,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
|
+
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: 'MainHeader',
|
|
name: 'MainHeader',
|
|
|
|
|
|
@@ -66,18 +72,23 @@ export default {
|
|
{ to: 'library', variant: 'dark' },
|
|
{ to: 'library', variant: 'dark' },
|
|
{ to: 'kit', variant: 'kit' },
|
|
{ to: 'kit', variant: 'kit' },
|
|
{ to: 'gallery', variant: 'creation' }
|
|
{ to: 'gallery', variant: 'creation' }
|
|
- ],
|
|
|
|
- subRoutes: ['home', 'introduction', 'contact']
|
|
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
computed: {
|
|
computed: {
|
|
|
|
+ ...mapGetters(['burger']),
|
|
|
|
+
|
|
optionsVisible: {
|
|
optionsVisible: {
|
|
get () { return this.$store.state.optionsVisible },
|
|
get () { return this.$store.state.optionsVisible },
|
|
set (value) {
|
|
set (value) {
|
|
this.$store.commit('UPDATE_OPTIONS_VISIBILITY', value)
|
|
this.$store.commit('UPDATE_OPTIONS_VISIBILITY', value)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ created () {
|
|
|
|
+ this.$store.dispatch('GET_BURGER')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|