Add an /e/:event_id route that resolves a NIP-19 event reference (nevent with relay hints, note, naddr, raw hex id, an optional nostr: prefix, or a full permalink) to the event, reads its i tag and opens the place. When the event is a place photo, focus it in the place details carousel via a ?photo= query param. Also keep the selected place's photo subscription open instead of completing on the first relay's EOSE, so photos that live on a slower relay are no longer dropped (the submission relay holds only a subset).
12 lines
446 B
JavaScript
12 lines
446 B
JavaScript
import Controller from '@ember/controller';
|
|
|
|
// `photo` carries the event id of a deep-linked place photo (e.g. from
|
|
// `/e/:event_id`) so the place details carousel can focus it. Declared here so
|
|
// Ember tracks it as a query parameter; `refreshModel: false` on the route
|
|
// keeps the place model from reloading when only the photo changes.
|
|
export default class PlaceController extends Controller {
|
|
queryParams = ['photo'];
|
|
|
|
photo = null;
|
|
}
|