diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index df1f55e..3ae0fd1 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -29,15 +29,17 @@
@@ -71,23 +73,33 @@ export default { data: () => { return { + translation: 'Add Translation...', translations: {}, } }, computed: { savedTranslations() { - let o = {} - let counter = 0 - for(const tr in this.translations){ - if(counter>2) - break; - o = {...o, [tr]:this.translations[tr]} - counter +=1 - // Object.assign({}, o,{[tr]: this.translations[tr]}) - } - console.log(o); - return o + // let o = {} + // let counter = 0 + // for(const tr in this.translations){ + // if(counter>2) + // break; + // o = {...o, [tr]:this.translations[tr]} + // counter +=1 + // // Object.assign({}, o,{[tr]: this.translations[tr]}) + // } + // console.log(o); + return this.$store.state.settings.savedTr; + } + }, + methods: { + add(tr){ + if(!tr) return; + this.$store.dispatch('add', tr) + }, + remove(tr){ + this.$store.dispatch('remove', tr) } }, async created(){