aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/actor_profile.php
diff options
context:
space:
mode:
authorwinter2025-01-27 19:45:39 +0000
committerwinter2025-01-27 19:45:39 +0000
commit5a6300f473b8be0e90a16e2b5992299b0ea1ddff (patch)
tree844d3422a1c9575a4cecd56f32c1c7eba0358efd /templates/actor_profile.php
parent9d59fd65b70b5b7588e4786f52f9cff1c3807426 (diff)
context menus and note deletion
Diffstat (limited to 'templates/actor_profile.php')
-rw-r--r--templates/actor_profile.php24
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