Add user setting to provide location and show events near location on

homepage

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-02-12 18:19:49 +01:00
parent 7d8399f4c8
commit b1cc3868a6
27 changed files with 538 additions and 112 deletions

View File

@@ -66,9 +66,9 @@ export class Address implements IAddress {
let alternativeName = "";
let poiIcon: IPOIIcon = poiIcons.default;
// Google Maps doesn't have a type
if (this.type == null && this.description === this.street)
if (this.type == null && this.description === this.street) {
this.type = "house";
}
switch (this.type) {
case "house":
name = this.description;
@@ -123,6 +123,9 @@ export class Address implements IAddress {
if (name && alternativeName) {
return `${name}, ${alternativeName}`;
}
if (name) {
return name;
}
return "";
}

View File

@@ -12,13 +12,20 @@ export interface ICurrentUser {
defaultActor?: IPerson;
}
export interface IUserPreferredLocation {
range?: number;
name?: string;
geohash?: string;
}
export interface IUserSettings {
timezone: string;
notificationOnDay: boolean;
notificationEachWeek: boolean;
notificationBeforeEvent: boolean;
notificationPendingParticipation: INotificationPendingEnum;
notificationPendingMembership: INotificationPendingEnum;
timezone?: string;
notificationOnDay?: boolean;
notificationEachWeek?: boolean;
notificationBeforeEvent?: boolean;
notificationPendingParticipation?: INotificationPendingEnum;
notificationPendingMembership?: INotificationPendingEnum;
location?: IUserPreferredLocation;
}
export interface IUser extends ICurrentUser {

View File

@@ -178,3 +178,7 @@ export enum GroupVisibility {
UNLISTED = "UNLISTED",
PRIVATE = "PRIVATE",
}
export enum AddressSearchType {
ADMINISTRATIVE = "ADMINISTRATIVE",
}