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).
24 lines
683 B
JavaScript
24 lines
683 B
JavaScript
import EmberRouter from '@embroider/router';
|
|
import config from 'marco/config/environment';
|
|
|
|
export default class Router extends EmberRouter {
|
|
location = config.locationType;
|
|
rootURL = config.rootURL;
|
|
}
|
|
|
|
Router.map(function () {
|
|
this.route('place', { path: '/place/:place_id' });
|
|
this.route('place.new', { path: '/place/new' });
|
|
this.route('event', { path: '/e/:event_id' });
|
|
this.route('search');
|
|
this.route('menu');
|
|
this.route('lists', function () {
|
|
this.route('list', { path: '/:list_id' });
|
|
});
|
|
this.route('contributions');
|
|
this.route('activity');
|
|
this.route('oauth', function () {
|
|
this.route('osm-callback', { path: '/osm/callback' });
|
|
});
|
|
});
|