From e0588a6113ff6b3c1000fa6c82629f81fb5e05b5 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 15 Mar 2025 18:53:29 +0000 Subject: [refactor] move some templates to subdirs --- routes/actor_profile_fragment.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'routes/actor_profile_fragment.php') diff --git a/routes/actor_profile_fragment.php b/routes/actor_profile_fragment.php index e5fe33f..d189f87 100644 --- a/routes/actor_profile_fragment.php +++ b/routes/actor_profile_fragment.php @@ -9,7 +9,7 @@ use Digitigrade\Router; use Digitigrade\StorageProvider\FilesystemStorage; Router::getInstance()->mount('/fragment/actor/:id', function (array $args) { - render_template('actor_profile', ['actor' => Actor::find($args['id'])]); + render_template('actor/profile', ['actor' => Actor::find($args['id'])]); }); Router::getInstance()->mount('/fragment/actor/:id/followButton', function (array $args) { @@ -27,7 +27,7 @@ Router::getInstance()->mount('/fragment/actor/:id/followButton', function (array $user->actor->follow($actor); } - render_template('actor_profile_follow_button', ['user' => $user, 'actor' => $actor]); + render_template('actor/profile_follow_button', ['user' => $user, 'actor' => $actor]); }); Router::getInstance()->mount('/fragment/actor/:id/acceptPending', function (array $args) { @@ -36,7 +36,7 @@ Router::getInstance()->mount('/fragment/actor/:id/acceptPending', function (arra $user->actor->acceptPendingFollowFrom($actor); - render_template('actor_profile_pending_follow', ['response' => 'accepted']); + render_template('actor/profile_pending_follow', ['response' => 'accepted']); }); Router::getInstance()->mount('/fragment/actor/:id/rejectPending', function (array $args) { @@ -45,7 +45,7 @@ Router::getInstance()->mount('/fragment/actor/:id/rejectPending', function (arra $user->actor->rejectPendingFollowFrom($actor); - render_template('actor_profile_pending_follow', ['response' => 'rejected']); + render_template('actor/profile_pending_follow', ['response' => 'rejected']); }); Router::getInstance()->mount('/fragment/actor/:id/blockButton', function (array $args) { @@ -59,7 +59,7 @@ Router::getInstance()->mount('/fragment/actor/:id/blockButton', function (array $user->actor->block($actor); } - render_template('actor_profile_block_button', ['user' => $user, 'actor' => $actor]); + render_template('actor/profile_block_button', ['user' => $user, 'actor' => $actor]); }); Router::getInstance()->mount('/fragment/profile', function (array $args) { @@ -86,9 +86,9 @@ Router::getInstance()->mount('/fragment/profile', function (array $args) { $actor->save(); $actor->publish(); - render_template('actor_profile', ['actor' => $actor]); + render_template('actor/profile', ['actor' => $actor]); } else { - render_template('actor_profile_editable', ['actor' => $actor]); + render_template('actor/profile_editable', ['actor' => $actor]); } }); @@ -96,5 +96,5 @@ Router::getInstance()->mount('/fragment/profile/resetAvatar', function (array $a $user = UserAccount::requireByCurrentSession(); $user->actor->avatar = null; $user->actor->save(); - render_template('actor_profile_reset_avatar', ['reset' => true]); + render_template('actor/profile_reset_avatar', ['reset' => true]); }); \ No newline at end of file -- cgit v1.3