mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2025-02-17 03:48:25 +00:00
#7 setup for a getter
This commit is contained in:
parent
eed2fb5b43
commit
819e99e7a5
2 changed files with 23 additions and 2 deletions
|
@ -10,6 +10,14 @@
|
|||
<br>
|
||||
<h1 class="title is-5">{{ $t("Modules.About.PlexPoCredits") }}</h1>
|
||||
|
||||
<div class="container">
|
||||
<div class="notification">
|
||||
{{ poTranslators }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -22,9 +30,15 @@
|
|||
export default {
|
||||
name: 'about',
|
||||
methods: {
|
||||
|
||||
}, created() {
|
||||
this.$store.dispatch('fetchPOEContrib');
|
||||
this.$store.getters.poTranslators
|
||||
}, computed: {
|
||||
poTranslators(){
|
||||
console.log(this.$store.getters.poTranslators)
|
||||
console.log('computed:contrip'+this.$store.getters.getContrip)
|
||||
return this.$store.getters.getContrip
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ const actions = {
|
|||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
}
|
||||
|
||||
axios.post('https://api.poeditor.com/v2/contributors/list', qs.stringify(requestBody), config)
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
|
@ -43,6 +42,14 @@ const actions = {
|
|||
}
|
||||
|
||||
const getters = {
|
||||
getTranslators: state => {
|
||||
state.contributors.forEach(element => {
|
||||
return element.name
|
||||
});
|
||||
},
|
||||
getContrip: state => state.contributors,
|
||||
|
||||
|
||||
};
|
||||
|
||||
const serverModule = {
|
||||
|
|
Loading…
Add table
Reference in a new issue