Select the types of activity you want to include in your feed.
fix: minor defects
- add icons to precache - track-on-load should only ask on main route - list deletion now confirms first - misrouting imported bookmarks - fix address clearing
···214214 // target is more specific, so it gets the last word.
215215 this.#fitToActiveList()
216216 this.#applyPendingNav()
217217- if (app.trackOnInitialLoad) this.#geolocate?.trigger()
217217+ // `hidden` is set by the router: only geolocate when the map is what
218218+ // the user opened, not behind a deep link into another route.
219219+ if (app.trackOnInitialLoad && !this.hidden) this.#geolocate?.trigger()
218220 // The compact attribution expands once the first source with
219221 // attribution loads; minimize it after a beat, the same way
220222 // MapLibre's own drag handler does.
+17-2
www/components/m-welcome.ts
···2828 override connectedCallback() {
2929 super.connectedCallback()
3030 app.addEventListener(this.#onAppUpdate)
3131+ globalThis.addEventListener('hashchange', this.#onAppUpdate)
3132 }
32333334 override disconnectedCallback() {
3435 super.disconnectedCallback()
3536 app.removeEventListener(this.#onAppUpdate)
3737+ globalThis.removeEventListener('hashchange', this.#onAppUpdate)
3638 }
37393840 #onAppUpdate = () => this.requestUpdate()
39414242+ /**
4343+ * Only greet on the map itself. Someone deep-linked into a shared list or
4444+ * bookmark came to look at that, not to be asked for their location — the
4545+ * welcome waits until they visit the home map.
4646+ */
4747+ get #onHome(): boolean {
4848+ const path = globalThis.location.hash.replace(/^#!/, '')
4949+ return path === '' || path === '/'
5050+ }
5151+4052 get #open(): boolean {
4141- return app.preferencesLoaded && !app.hasSeenWelcome && !this.#dismissed
5353+ return this.#onHome && app.preferencesLoaded && !app.hasSeenWelcome &&
5454+ !this.#dismissed
4255 }
43564457 #requestLocation = () => {
···4962 }
5063 this.#locationStatus = 'requesting'
5164 this.requestUpdate()
5252- app.setTrackOnInitialLoad(true)
53655466 navigator.geolocation.getCurrentPosition(
5567 async (pos) => {
6868+ // Only once permission is actually granted — set eagerly, a denial
6969+ // would leave the app re-prompting on every load.
7070+ app.setTrackOnInitialLoad(true)
5671 const { latitude: lat, longitude: lng } = pos.coords
5772 this.#coords = { lat, lng }
5873 const manifest = await fetchTileManifest()
+3-1
www/models/app.ts
···306306307307 // ====== LISTS ======
308308309309- async addList(name: string, color?: string): Promise<void> {
309309+ /** Returns the new list's id. */
310310+ async addList(name: string, color?: string): Promise<string> {
310311 const now = new Date().toISOString()
311312 const id = crypto.randomUUID()
312313 await listsColl.set(
···319320 updatedAt: now,
320321 }),
321322 )
323323+ return id
322324 }
323325324326 async updateList(
+4-1
www/routes/bookmark.ts
···206206 ...b.properties,
207207 name: (fd.get('name') as string).trim() || undefined,
208208 description: (fd.get('description') as string).trim() || undefined,
209209+ // Emptying the field clears the address, matching name/description.
210210+ // The structured geocoder fields go with it — they described the old
211211+ // address, and nothing displays them without a `displayText`.
209212 address: addressText
210213 ? { ...b.properties.address, displayText: addressText }
211211- : b.properties.address,
214214+ : undefined,
212215 },
213216 categories: listIds,
214217 })
+7-3
www/routes/bookmarks.ts
···129129 this.requestUpdate()
130130 const listIdMap = new Map<string, string>()
131131 for (const folder of folders) {
132132- await app.addList(folder.name)
133133- const created = app.bookmarkLists.find((c) => c.name === folder.name)
134134- if (created) listIdMap.set(folder.tempId, created.id)
132132+ listIdMap.set(folder.tempId, await app.addList(folder.name))
135133 }
136134 for (const bm of bookmarks) {
137135 if (bm.isDuplicate) continue
···143141 }
144142145143 async #deleteList(id: string) {
144144+ const name = this.lists.find((l) => l.id === id)?.name ?? 'this list'
145145+ if (
146146+ !globalThis.confirm(
147147+ `Delete "${name}"? Its bookmarks are kept, but any shared link to the list stops working.`,
148148+ )
149149+ ) return
146150 await app.deleteList(id)
147151 this.expandedLists.delete(id)
148152 }