mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-28 07:20:49 -04:00
[optim] don't fetch profile terms if not necessary
This commit is contained in:
parent
8b73ed6ac5
commit
5b4946ea14
@ -178,14 +178,19 @@
|
|||||||
glue: ' ' + this.$t('pronouns.or') + ' ',
|
glue: ' ' + this.$t('pronouns.or') + ' ',
|
||||||
allFlags: process.env.FLAGS,
|
allFlags: process.env.FLAGS,
|
||||||
saving: false,
|
saving: false,
|
||||||
|
terms: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async asyncData({ app, route }) {
|
async asyncData({ app, route }) {
|
||||||
return {
|
return {
|
||||||
profiles: await app.$axios.$get(`/profile/get/${encodeURIComponent(route.params.pathMatch)}`),
|
profiles: await app.$axios.$get(`/profile/get/${encodeURIComponent(route.params.pathMatch)}`),
|
||||||
terms: await app.$axios.$get(`/terms`),
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
async mounted() {
|
||||||
|
if (this.config.nouns.terms.enabled) {
|
||||||
|
this.terms = await this.$axios.$get(`/terms`);
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
username() {
|
username() {
|
||||||
const base = this.$route.params.pathMatch;
|
const base = this.$route.params.pathMatch;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user