Replace sidebar with compact header and shared friend dashboards

This commit is contained in:
Peter Stockings
2026-10-02 15:05:02 +10:00
parent ca2926da0a
commit 794e74166a
7 changed files with 103 additions and 28 deletions
+4
View File
@@ -260,6 +260,8 @@ def profile(username):
user = db.first_or_404(db.select(User).filter_by(username=username))
if user.id != current_user.id and not are_friends(current_user.id, user.id):
abort(404)
if user.id == current_user.id:
return redirect(url_for("web.dashboard"))
filters = [Activity.owner_id == user.id, Activity.visibility == "friends"]
stats = overview(filters, user.timezone)
pagination = activity_page(filters, total=stats["count"])
@@ -271,6 +273,8 @@ def profile(username):
profile=user,
personal=False,
mapped_run=latest_mapped_run(filters),
record_book=records_for(user.id, {row.id for row in pagination.items}, shared_only=True),
pace_text=pace_text,
)