Replace sidebar with compact header and shared friend dashboards
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user