Cleanup getting instance's languages in AboutInstance

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-09-07 17:54:26 +02:00
parent 9c7a4f0079
commit 68065a611a
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 5 additions and 10 deletions

View File

@ -103,12 +103,13 @@ import { Component, Vue } from "vue-property-decorator";
import { CONFIG } from "@/graphql/config"; import { CONFIG } from "@/graphql/config";
import { IConfig } from "@/types/config.model"; import { IConfig } from "@/types/config.model";
import RouteName from "../router/name"; import RouteName from "../router/name";
import { CURRENT_USER_CLIENT } from "@/graphql/user";
import { ICurrentUser } from "@/types/current-user.model";
@Component({ @Component({
apollo: { apollo: {
config: { config: CONFIG,
query: CONFIG, currentUser: CURRENT_USER_CLIENT,
},
}, },
metaInfo() { metaInfo() {
return { return {
@ -122,6 +123,7 @@ import RouteName from "../router/name";
}) })
export default class About extends Vue { export default class About extends Vue {
config!: IConfig; config!: IConfig;
currentUser!: ICurrentUser;
RouteName = RouteName; RouteName = RouteName;
} }

View File

@ -114,7 +114,6 @@ import { ABOUT } from "../../graphql/config";
import { STATISTICS } from "../../graphql/statistics"; import { STATISTICS } from "../../graphql/statistics";
import { IConfig } from "../../types/config.model"; import { IConfig } from "../../types/config.model";
import { IStatistics } from "../../types/statistics.model"; import { IStatistics } from "../../types/statistics.model";
import langs from "../../i18n/langs.json";
@Component({ @Component({
apollo: { apollo: {
@ -159,12 +158,6 @@ export default class AboutInstance extends Vue {
} }
return ""; return "";
} }
// eslint-disable-next-line class-methods-use-this
getLanguageNameForCode(code: string): string {
const languageMaps = langs as Record<string, any>;
return languageMaps[code];
}
} }
</script> </script>