67b906cc96
- Load the language files correctly when language is changed - Save user language in localstorage so that we can have it even if disconnected (but still load it from user settings eventually since user might be on a different device) - Load all locales from Cldr with Gettext - Fix pt-PT -> pt-BR - Clean some obsolete config.exs comments Later changes will allow to set the language without an account https://framagit.org/framasoft/mobilizon/-/issues/375 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
60 lines
1.3 KiB
TypeScript
60 lines
1.3 KiB
TypeScript
import { IEvent, IParticipant } from "@/types/event.model";
|
|
import { IPerson } from "@/types/actor/person.model";
|
|
import { Paginate } from "./paginate";
|
|
|
|
export enum ICurrentUserRole {
|
|
USER = "USER",
|
|
MODERATOR = "MODERATOR",
|
|
ADMINISTRATOR = "ADMINISTRATOR",
|
|
}
|
|
|
|
export interface ICurrentUser {
|
|
id: string;
|
|
email: string;
|
|
isLoggedIn: boolean;
|
|
role: ICurrentUserRole;
|
|
defaultActor?: IPerson;
|
|
}
|
|
|
|
export enum INotificationPendingParticipationEnum {
|
|
NONE = "NONE",
|
|
DIRECT = "DIRECT",
|
|
ONE_DAY = "ONE_DAY",
|
|
ONE_HOUR = "ONE_HOUR",
|
|
}
|
|
|
|
export interface IUserSettings {
|
|
timezone: string;
|
|
notificationOnDay: boolean;
|
|
notificationEachWeek: boolean;
|
|
notificationBeforeEvent: boolean;
|
|
notificationPendingParticipation: INotificationPendingParticipationEnum;
|
|
}
|
|
|
|
export interface IUser extends ICurrentUser {
|
|
confirmedAt: Date;
|
|
confirmationSendAt: Date;
|
|
actors: IPerson[];
|
|
disabled: boolean;
|
|
participations: Paginate<IParticipant>;
|
|
drafts: IEvent[];
|
|
settings: IUserSettings;
|
|
locale: string;
|
|
provider?: string;
|
|
lastSignInAt: string;
|
|
lastSignInIp: string;
|
|
currentSignInIp: string;
|
|
currentSignInAt: string;
|
|
}
|
|
|
|
export enum IAuthProvider {
|
|
LDAP = "ldap",
|
|
GOOGLE = "google",
|
|
DISCORD = "discord",
|
|
GITHUB = "github",
|
|
KEYCLOAK = "keycloak",
|
|
FACEBOOK = "facebook",
|
|
GITLAB = "gitlab",
|
|
TWITTER = "twitter",
|
|
}
|