forked from potsda.mn/mobilizon
Cleanup getting instance's languages in AboutInstance
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
9c7a4f0079
commit
68065a611a
|
@ -103,12 +103,13 @@ import { Component, Vue } from "vue-property-decorator";
|
|||
import { CONFIG } from "@/graphql/config";
|
||||
import { IConfig } from "@/types/config.model";
|
||||
import RouteName from "../router/name";
|
||||
import { CURRENT_USER_CLIENT } from "@/graphql/user";
|
||||
import { ICurrentUser } from "@/types/current-user.model";
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
config: {
|
||||
query: CONFIG,
|
||||
},
|
||||
config: CONFIG,
|
||||
currentUser: CURRENT_USER_CLIENT,
|
||||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
|
@ -122,6 +123,7 @@ import RouteName from "../router/name";
|
|||
})
|
||||
export default class About extends Vue {
|
||||
config!: IConfig;
|
||||
currentUser!: ICurrentUser;
|
||||
|
||||
RouteName = RouteName;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,6 @@ import { ABOUT } from "../../graphql/config";
|
|||
import { STATISTICS } from "../../graphql/statistics";
|
||||
import { IConfig } from "../../types/config.model";
|
||||
import { IStatistics } from "../../types/statistics.model";
|
||||
import langs from "../../i18n/langs.json";
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
|
@ -159,12 +158,6 @@ export default class AboutInstance extends Vue {
|
|||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
getLanguageNameForCode(code: string): string {
|
||||
const languageMaps = langs as Record<string, any>;
|
||||
return languageMaps[code];
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue