mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-25 22:19:28 -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') + ' ',
|
||||
allFlags: process.env.FLAGS,
|
||||
saving: false,
|
||||
terms: [],
|
||||
}
|
||||
},
|
||||
async asyncData({ app, route }) {
|
||||
return {
|
||||
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: {
|
||||
username() {
|
||||
const base = this.$route.params.pathMatch;
|
||||
|
Loading…
x
Reference in New Issue
Block a user