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:
@@ -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 "";
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -178,3 +178,7 @@ export enum GroupVisibility {
|
||||
UNLISTED = "UNLISTED",
|
||||
PRIVATE = "PRIVATE",
|
||||
}
|
||||
|
||||
export enum AddressSearchType {
|
||||
ADMINISTRATIVE = "ADMINISTRATIVE",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user