diff --git a/android/app/build.gradle b/android/app/build.gradle index bea30dad..f0d25c85 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "nexus.concepts.dust" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 192 - versionName "2.136" + versionCode 193 + versionName "2.137" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/ios/App/App.xcodeproj/project.pbxproj b/ios/App/App.xcodeproj/project.pbxproj index 4173d9f7..5ffd882c 100644 --- a/ios/App/App.xcodeproj/project.pbxproj +++ b/ios/App/App.xcodeproj/project.pbxproj @@ -72,7 +72,15 @@ /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ - 61DA5071303A8BD300AF4161 /* Dust Watch App */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = "Dust Watch App"; sourceTree = ""; }; + 61DA5071303A8BD300AF4161 /* Dust Watch App */ = { + isa = PBXFileSystemSynchronizedRootGroup; + explicitFileTypes = { + }; + explicitFolders = ( + ); + path = "Dust Watch App"; + sourceTree = ""; + }; /* End PBXFileSystemSynchronizedRootGroup section */ /* Begin PBXFrameworksBuildPhase section */ @@ -475,7 +483,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.136; + MARKETING_VERSION = 2.137; OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\""; PRODUCT_BUNDLE_IDENTIFIER = nexus.concepts.dust; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -506,7 +514,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.136; + MARKETING_VERSION = 2.137; PRODUCT_BUNDLE_IDENTIFIER = nexus.concepts.dust; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -549,7 +557,7 @@ "@executable_path/Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 2.137; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = nexus.concepts.dust.watchkitapp; @@ -604,7 +612,7 @@ "@executable_path/Frameworks", ); LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 2.137; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = nexus.concepts.dust.watchkitapp; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/src/app/event/event.page.html b/src/app/event/event.page.html index 4511de56..237223a5 100644 --- a/src/app/event/event.page.html +++ b/src/app/event/event.page.html @@ -73,10 +73,10 @@

{{event.title}}

{{event.camp}} - @if (event.location) { + @if (locationLabel()) { - {{event.location}} + {{locationLabel()}} } @for (occurrence of event.occurrence_set; track $index) { diff --git a/src/app/event/event.page.ts b/src/app/event/event.page.ts index 4e1bd0bc..8793cbee 100644 --- a/src/app/event/event.page.ts +++ b/src/app/event/event.page.ts @@ -177,17 +177,26 @@ export class EventPage implements OnInit, OnDestroy { this.event = event; this.mapTitle = event.camp; this.mapSubtitle = event.location; - const features = await buildEventMapFeatures( - event, - (uid) => this.db.findCamp(uid), - (gps) => this.db.gpsToPoint(gps), - 0, - ); - if (features && features.point.x === undefined && features.point.y === undefined) { - features.point.gps = await this.db.getMapPointGPS(features.point); + // Events hosted at art behave like the art detail page: when art + // locations are hidden, do not reveal the location on the map. + const hideArtLocation = this.isAtArt() && this.db.artLocationsHidden(); + if (hideArtLocation) { + this.showMap = false; + this.mapPoints = []; + this.mapPolygons = []; + } else { + const features = await buildEventMapFeatures( + event, + (uid) => this.db.findCamp(uid), + (gps) => this.db.gpsToPoint(gps), + 0, + ); + if (features && features.point.x === undefined && features.point.y === undefined) { + features.point.gps = await this.db.getMapPointGPS(features.point); + } + this.mapPoints = features ? [features.point] : []; + this.mapPolygons = features?.polygon ? [features.polygon] : []; } - this.mapPoints = features ? [features.point] : []; - this.mapPolygons = features?.polygon ? [features.polygon] : []; const selectedDay = this.db.selectedDay(); const occurrences = JSON.parse(JSON.stringify(event.occurrence_set)); const isNoDate = sameDay(selectedDay, noDate()); @@ -244,8 +253,28 @@ export class EventPage implements OnInit, OnDestroy { this._change.detectChanges(); } + // Whether this event is hosted at an art installation. + private isAtArt(): boolean { + return !!this.event?.located_at_art; + } + + // The location label to display. Events hosted at art behave like the art + // detail page: when art locations are hidden, show the art message. + locationLabel(): string { + if (this.isAtArt() && this.db.artLocationsHidden()) { + return this.db.locationsHidden().artMessage; + } + return this.event?.location ?? ''; + } + async showLocationInfo(e: any) { this.locationPopover().event = e; + if (this.isAtArt() && this.db.artLocationsHidden()) { + this.locationInfo = `Art locations cannot be displayed yet. ${this.db.locationsHidden().artMessage}.`; + this.isLocationInfoOpen = true; + this._change.detectChanges(); + return; + } if (this.db.locationsHidden().camps) { this.locationInfo = `Locations cannot be display yet. ${this.db.locationsHidden().campMessage}.`; this.isLocationInfoOpen = true;