Skip to content

Commit bbfed45

Browse files
committed
chore: make participation generic (drop hardcoded owner/pet); remove personal notes + push debug page
1 parent 88bf710 commit bbfed45

4 files changed

Lines changed: 13 additions & 11 deletions

File tree

src/auth.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ pub async fn require_session(req: Request<Body>, next: Next) -> Response {
273273
// Pages anyone can open without logging in — the map and the challenge, only.
274274
let is_public_page = path == "/login.html"
275275
|| path == "/map.html"
276-
|| path == "/challenge.html"
277-
|| path == "/push-test.html";
276+
|| path == "/challenge.html";
278277

279278
// Read-only data the public pages need (peaks, peak events, ánimos, sign-ups).
280279
let is_public_read = method == Method::GET && (

static/challenge.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,13 +345,14 @@ <h3 id="join-title">Join this peak</h3>
345345
} catch { signups = {}; }
346346
}
347347
function signupNames(name) { return signups[name.toLowerCase()] || []; }
348-
function goingIcon(nm) { return nm.trim().toLowerCase() === 'pet' ? '🐕' : '🙋'; }
348+
function goingIcon() { return '🙋'; }
349349
function goingBadge(name) {
350350
const n = signupNames(name).length;
351351
return n > 0 ? `<span class="going-badge" style="cursor:pointer" data-peak="${esc(name)}" onclick="event.stopPropagation();showGoingList(this.dataset.peak)" title="${esc(tx.goingSee)}">👥 +${n} ${tx.going}</span>` : '';
352352
}
353353
function showGoingList(name) {
354-
const line = ['🌞 Me', ...signupNames(name).map(nm => goingIcon(nm) + ' ' + nm)].join(' · ');
354+
const going = signupNames(name);
355+
const line = going.length ? going.map(nm => goingIcon() + ' ' + nm).join(' · ') : '—';
355356
showToast('👥 ' + name + ': ' + line);
356357
}
357358

static/map.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1134,9 +1134,9 @@
11341134
}
11351135
function signupNames(peakName) { return signups[peakName.toLowerCase()] || []; }
11361136
function eventGoing(eventId) { return signupsByEvent[eventId] || []; }
1137-
// Each companion's icon: 🐕 for Pet, otherwise 🙋
1138-
function goingIcon(name) { return name.trim().toLowerCase() === 'pet' ? '🐕' : '🙋'; }
1139-
// "+n going" badge — you always go, so n = the others. Click to see who.
1137+
// Companion icon
1138+
function goingIcon() { return '🙋'; }
1139+
// "+n going" badge — n = the people signed up. Click to see who.
11401140
function goingBadgeEvent(eventId) {
11411141
const n = eventGoing(eventId).length;
11421142
return n > 0
@@ -1149,12 +1149,14 @@
11491149
? `<span class="going-badge" data-peak="${esc(peakName)}" onclick="event.stopPropagation();showGoingForPeak(this.dataset.peak)" title="${esc(t('going_see'))}" style="cursor:pointer;">👥 +${n} ${t('going_label')}</span>`
11501150
: '';
11511151
}
1152-
// Modal: who's going (🌞 Me + everyone signed up)
1152+
// Modal: who's going (everyone signed up)
11531153
function renderGoing(title, names) {
11541154
document.getElementById('going-title').textContent = title;
1155+
const rows = names.length
1156+
? names.map(nm => `<div>${goingIcon()} ${esc(nm)}</div>`).join('')
1157+
: `<div style="color:var(--muted);">${esc(t('going_label'))} —</div>`;
11551158
document.getElementById('going-list').innerHTML =
1156-
`<div style="font-size:0.9rem;line-height:2;"><div>🌞 Me</div>` +
1157-
names.map(nm => `<div>${goingIcon(nm)} ${esc(nm)}</div>`).join('') + `</div>`;
1159+
`<div style="font-size:0.9rem;line-height:2;">${rows}</div>`;
11581160
document.getElementById('overlay-going').classList.add('visible');
11591161
}
11601162
function showGoingForEvent(eventId) {

static/sw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const CACHE = 'pt-v27';
1+
const CACHE = 'pt-v28';
22
const STATIC = [
33
'/', '/map.html', '/challenge.html', '/calendar/', '/login.html',
44
'/i18n.js', '/manifest.json', '/icon-192.png', '/icon-512.png',

0 commit comments

Comments
 (0)