Feature: Ratings, Lightbox, Forum-Standort, Notifications, Routen-Recording, Chat-Picker
- Bewertungssystem (ratings.py): Sterne für Sitter/Walks/Places/Routen - Admin: Server-Log-Viewer + OSM-Cache-Statistiken - Chat: "Neue Nachricht"-Button mit Freundesliste-Picker - Forum: 5 neue Kategorien, Standorteingabe (locationPicker), Absende-Toast, Lightbox - Freunde: Aktivitäts-Filter (Chips), Freundschaftsanfrage → In-App-Notification - Sitter: locationPicker statt manuelle Koordinateneingabe + ratingStars - Tagebuch: Bilder-Lightbox im Detail-View, iOS-Modal-Header-Fix (90svh) - Routen: Start/Stopp-Button wechselt Zustand, nutzt Page_map.isRecording() - Benachrichtigungen: Delete-Button sichtbar, typ-basierte Navigation, Toast-Feedback - OSM: globales Semaphore + 429-Retry-Logic; Scheduler: München-Umland, täglich - SW by-v225, APP_VER 202
This commit is contained in:
parent
aa70a838f2
commit
e56183b642
21 changed files with 648 additions and 175 deletions
|
|
@ -196,36 +196,56 @@ window.Page_friends = (() => {
|
|||
}
|
||||
}
|
||||
|
||||
let _activityFilter = 'alle';
|
||||
let _activityAll = [];
|
||||
|
||||
function _renderActivity(items) {
|
||||
_activityAll = items;
|
||||
const el = _container.querySelector('#fr-activity');
|
||||
if (!el) return;
|
||||
|
||||
if (!items.length) {
|
||||
el.innerHTML = `
|
||||
<div style="margin-top:var(--space-6)">
|
||||
<div class="by-section-label">Aktivitäten</div>
|
||||
<div style="text-align:center;padding:var(--space-8) var(--space-4)">
|
||||
<svg class="ph-icon" style="width:40px;height:40px;color:var(--c-border);
|
||||
margin-bottom:var(--space-3)" aria-hidden="true">
|
||||
<use href="/icons/phosphor.svg#paw-print"></use>
|
||||
</svg>
|
||||
<p style="font-size:var(--text-sm);color:var(--c-text-secondary);margin:0">
|
||||
Noch keine Aktivitäten. Füge Freunde hinzu!
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
return;
|
||||
}
|
||||
const FILTERS = [
|
||||
{ key: 'alle', label: 'Alle' },
|
||||
{ key: 'diary', label: 'Tagebuch' },
|
||||
{ key: 'walk', label: 'Gassi-Treffen' },
|
||||
{ key: 'health', label: 'Gesundheit' },
|
||||
{ key: 'new_dog', label: 'Neuer Hund' },
|
||||
];
|
||||
|
||||
const chips = FILTERS.map(f => `
|
||||
<button class="rk-chip${_activityFilter === f.key ? ' active' : ''}"
|
||||
data-af="${f.key}">${f.label}</button>
|
||||
`).join('');
|
||||
|
||||
const filtered = _activityFilter === 'alle'
|
||||
? items
|
||||
: items.filter(i => i.type === _activityFilter);
|
||||
|
||||
el.innerHTML = `
|
||||
<div style="margin-top:var(--space-6)">
|
||||
<div class="by-section-label">Aktivitäten</div>
|
||||
<div class="fr-activity-timeline">
|
||||
${items.map(item => _activityItem(item)).join('')}
|
||||
<div class="rk-filter-group" style="margin-bottom:var(--space-3);flex-wrap:wrap">
|
||||
${chips}
|
||||
</div>
|
||||
${!filtered.length
|
||||
? `<div style="text-align:center;padding:var(--space-8) var(--space-4)">
|
||||
<p style="font-size:var(--text-sm);color:var(--c-text-secondary);margin:0">
|
||||
Keine Einträge in dieser Kategorie.
|
||||
</p>
|
||||
</div>`
|
||||
: `<div class="fr-activity-timeline">
|
||||
${filtered.map(item => _activityItem(item)).join('')}
|
||||
</div>`
|
||||
}
|
||||
</div>
|
||||
`;
|
||||
|
||||
el.querySelectorAll('[data-af]').forEach(btn => {
|
||||
btn.addEventListener('click', () => {
|
||||
_activityFilter = btn.dataset.af;
|
||||
_renderActivity(_activityAll);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function _activityItem(item) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue