diff options
Diffstat (limited to 'templates/actor_profile.php')
| -rw-r--r-- | templates/actor_profile.php | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/templates/actor_profile.php b/templates/actor_profile.php index cfcc510..1e37f28 100644 --- a/templates/actor_profile.php +++ b/templates/actor_profile.php @@ -5,6 +5,7 @@ $user = UserAccount::findByCurrentSession(); ?> <div class="fullProfile"> <div class="basicInfo"> + <?php if ($addLink ?? false): ?> <a href="/@/<?= $actor->getFullHandle() ?>"> <?php endif; ?> @@ -12,20 +13,28 @@ $user = UserAccount::findByCurrentSession(); <?php if ($addLink ?? false): ?> </a> <?php endif; ?> + <div> <div class="displayName"><?= htmlspecialchars($actor->displayName) ?></div> <div class="handle">@<?= $actor->getFullHandle() ?></div> - <div class="joinedDate"><?= sprintf(__('user.profile.createdAt'), $actor->created->format('Y-m-d')) ?></div> + <div class="joinedDate"><?= sprintf(__('user.profile.createdAt'), $actor->created->format('Y-m-d')) ?> + </div> </div> + <div class="profileMiniActions"> - <?php if ($user != null && $user->actor != $actor) - call_template('actor_profile_block_button', ['actor' => $actor, 'user' => $user]); ?> - <?php if (!$actor->isLocal): ?> - <a class="material-symbols open-in-new" href="<?= $actor->homepage ?>" - title="<?= __('user.profile.openRemote') ?>" target="_blank"></a> - <?php endif; ?> + <?php call_template('menu_button', [], function () { + global $actor; + // i don't know why but `global $user` just straight up doesnt work? + $user = UserAccount::findByCurrentSession(); + ?> + <?php if ($user != null && $user->actor != $actor): ?> + <li><?php call_template('actor_profile_block_button', ['user' => $user, 'actor' => $actor]) ?></li> + <?php endif; ?> + <?php }); ?> </div> + </div> + <?php if (isset($actor->bio) && $actor->bio != '') { ?> <pre class="bio"><?= htmlspecialchars($actor->bio) ?></pre> <?php } else { @@ -48,4 +57,5 @@ $user = UserAccount::findByCurrentSession(); </button> </div> <?php endif; ?> + </div>
\ No newline at end of file |
