aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/actor_profile.php
diff options
context:
space:
mode:
authorwinter2025-01-18 16:01:25 +0000
committerwinter2025-01-18 16:01:25 +0000
commitc0e65d0446f928b30eecc858c5cf9a8eb1a364c1 (patch)
treebb22cd9b3e6b4a05f9bf2b41393f3aaa9048f4bb /templates/actor_profile.php
parentba61c6435b668375a411716f3a35447aa38b03a4 (diff)
implement profile editing
Diffstat (limited to 'templates/actor_profile.php')
-rw-r--r--templates/actor_profile.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/templates/actor_profile.php b/templates/actor_profile.php
index 0dc3ccd..46ee273 100644
--- a/templates/actor_profile.php
+++ b/templates/actor_profile.php
@@ -25,13 +25,13 @@ $user = UserAccount::findByCurrentSession();
</div>
</div>
<?php if (isset($actor->bio) && $actor->bio != '') { ?>
- <p class="bio"><?= $actor->bio ?></p>
+ <pre class="bio"><?= $actor->bio ?></pre>
<?php } else {
call_template('placeholder_text', ['message' => __('user.profile.bio.placeholder')]);
} ?>
<?php if (isset($user) && $actor->id != $user->actor->id): ?>
- <div class="followInfo">
+ <div class="profileActions">
<?php if ($actor->followsPending($user->actor))
call_template('actor_profile_pending_follow', ['subject' => $actor, 'object' => $user->actor]); ?>
<?php if ($actor->follows($user->actor)): ?>
@@ -39,5 +39,11 @@ $user = UserAccount::findByCurrentSession();
<?php endif; ?>
<?php call_template('actor_profile_follow_button', ['actor' => $actor, 'user' => $user]); ?>
</div>
+ <?php elseif ($actor->id == $user->actor->id): ?>
+ <div class="profileActions">
+ <button class="primary" hx-get="/fragment/profile" hx-target="closest .fullProfile" hx-swap="outerHTML">
+ <?= __('form.edit') ?>
+ </button>
+ </div>
<?php endif; ?>
</div> \ No newline at end of file