locale + darktheme support, fixes boolean profilefield
This commit is contained in:
@@ -8,7 +8,7 @@ import {environment} from '../../environments/environment';
|
||||
export class I18nService {
|
||||
|
||||
locale: string = "de-informal";
|
||||
locales: any = ["de-informal"];
|
||||
locales: any[] = ["de-informal"];
|
||||
i18n: any;
|
||||
|
||||
constructor(private http: HttpClient) {
|
||||
@@ -42,7 +42,9 @@ export class I18nService {
|
||||
}
|
||||
|
||||
try {
|
||||
this.locales = await this.http.get(environment.apiUrl + "/i18n").toPromise();
|
||||
await this.http.get(environment.apiUrl + "/i18n").toPromise().then((response: any) => {
|
||||
this.locales = response;
|
||||
});
|
||||
} catch(e) {
|
||||
console.debug("fallback to default locales");
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ export class ProfileService {
|
||||
constructor(private http: HttpClient) {
|
||||
}
|
||||
|
||||
getAll() {
|
||||
return this.http.get(environment.apiUrl + "/profiles");
|
||||
getAll(filter?: any[]) {
|
||||
return this.http.get(environment.apiUrl + "/profiles" + (filter ? "?filter=" + filter.join(",") : ""));
|
||||
}
|
||||
|
||||
getAllForUser(username) {
|
||||
|
||||
Reference in New Issue
Block a user