From 6b78446c1d5b76438d40bbe68aa0397de533e61a Mon Sep 17 00:00:00 2001 From: winter Date: Mon, 20 Jan 2025 17:43:17 +0000 Subject: various avatar tweaks and profile above note form --- routes/actor_profile_fragment.php | 7 +++++++ routes/note_fragment.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/actor_profile_fragment.php b/routes/actor_profile_fragment.php index 0a07924..0a2a881 100644 --- a/routes/actor_profile_fragment.php +++ b/routes/actor_profile_fragment.php @@ -70,4 +70,11 @@ Router::getInstance()->mount('/fragment/profile', function (array $args) { } else { render_template('actor_profile_editable', ['actor' => $actor]); } +}); + +Router::getInstance()->mount('/fragment/profile/resetAvatar', function (array $args) { + $user = UserAccount::requireByCurrentSession(); + $user->actor->avatar = null; + $user->actor->save(); + render_template('actor_profile_reset_avatar', ['reset' => true]); }); \ No newline at end of file diff --git a/routes/note_fragment.php b/routes/note_fragment.php index 5fe979a..02399e6 100644 --- a/routes/note_fragment.php +++ b/routes/note_fragment.php @@ -84,5 +84,5 @@ Router::getInstance()->mount('/fragment/note', function (array $args) { $note->processTimelineAdditions(); $note->processNotifications(); } - render_template('write_note_form'); + render_template('write_note_form', ['actor' => $author->actor]); }); \ No newline at end of file -- cgit v1.3