Skip to content

Commit

Permalink
move computed config to this.store
Browse files Browse the repository at this point in the history
  • Loading branch information
OmgImAlexis committed Jul 3, 2018
1 parent b76c8bd commit 6963ada
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
9 changes: 6 additions & 3 deletions themes-default/slim/static/js/templates/config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@
</template>

<script>
const { store } = window;
module.exports = {
name: 'config',
computed: store.mapState(['config']),
store,
computed: {
config() {
return this.store.state.config;
}
},
methods: {
prettyPrintJSON: str => JSON.stringify(str, undefined, 4)
}
Expand Down
9 changes: 6 additions & 3 deletions themes/dark/assets/js/templates/config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@
</template>

<script>
const { store } = window;
module.exports = {
name: 'config',
computed: store.mapState(['config']),
store,
computed: {
config() {
return this.store.state.config;
}
},
methods: {
prettyPrintJSON: str => JSON.stringify(str, undefined, 4)
}
Expand Down
9 changes: 6 additions & 3 deletions themes/light/assets/js/templates/config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@
</template>

<script>
const { store } = window;
module.exports = {
name: 'config',
computed: store.mapState(['config']),
store,
computed: {
config() {
return this.store.state.config;
}
},
methods: {
prettyPrintJSON: str => JSON.stringify(str, undefined, 4)
}
Expand Down

0 comments on commit 6963ada

Please sign in to comment.