forked from potsda.mn/mobilizon
Improve "AboutInstance" page load
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b4229e2e09
commit
c94e431618
|
@ -47,7 +47,7 @@
|
||||||
<table class="table is-fullwidth">
|
<table class="table is-fullwidth">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $t("Instance languages") }}</td>
|
<td>{{ $t("Instance languages") }}</td>
|
||||||
<td :title="this.config.languages.join(', ')">
|
<td :title="this.config ? this.config.languages.join(', ') : ''">
|
||||||
{{ formattedLanguageList }}
|
{{ formattedLanguageList }}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -105,7 +105,7 @@ import langs from "../../i18n/langs.json";
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
skip() {
|
skip() {
|
||||||
return !this.config.languages;
|
return !this.config || !this.config.languages;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -126,9 +126,12 @@ export default class AboutInstance extends Vue {
|
||||||
}
|
}
|
||||||
|
|
||||||
get formattedLanguageList(): string {
|
get formattedLanguageList(): string {
|
||||||
|
if (this.languages) {
|
||||||
const list = this.languages.map(({ name }) => name);
|
const list = this.languages.map(({ name }) => name);
|
||||||
return formatList(list);
|
return formatList(list);
|
||||||
}
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line class-methods-use-this
|
// eslint-disable-next-line class-methods-use-this
|
||||||
getLanguageNameForCode(code: string): string {
|
getLanguageNameForCode(code: string): string {
|
||||||
|
|
Loading…
Reference in a new issue