mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-22 07:52:43 +00:00
Cleanup getting instance's languages in AboutInstance
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
9c7a4f0079
commit
68065a611a
2 changed files with 5 additions and 10 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue