aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/actor_avatar.php2
-rw-r--r--templates/actor_profile_editable.php3
-rw-r--r--templates/actor_profile_reset_avatar.php3
-rw-r--r--templates/mobilepane_left.php4
-rw-r--r--templates/skeleton.php2
-rw-r--r--templates/write_note_form.php9
6 files changed, 19 insertions, 4 deletions
diff --git a/templates/actor_avatar.php b/templates/actor_avatar.php
index 439072b..16b529b 100644
--- a/templates/actor_avatar.php
+++ b/templates/actor_avatar.php
@@ -1,5 +1,5 @@
<?php if (isset($actor->avatar)): ?>
<img class="avatar" src="<?= $actor->avatar ?>">
<?php else: ?>
- <img class="avatar" src="/static/default-avatar.svg">
+ <img class="avatar" src="/static/default-avatar.png">
<?php endif; ?> \ No newline at end of file
diff --git a/templates/actor_profile_editable.php b/templates/actor_profile_editable.php
index 2c0ef5c..1370e53 100644
--- a/templates/actor_profile_editable.php
+++ b/templates/actor_profile_editable.php
@@ -14,7 +14,8 @@
<div class="row">
<label for="profileAvatar"><?= __('user.profile.changeAvatar') ?></label>
- <input type="file" id="profileAvatar" name="avatar" accept="image/*">
+ <input style="display: inline-block" type="file" id="profileAvatar" name="avatar" accept="image/*">
+ <?php call_template('actor_profile_reset_avatar'); ?>
</div>
<div class="row">
diff --git a/templates/actor_profile_reset_avatar.php b/templates/actor_profile_reset_avatar.php
new file mode 100644
index 0000000..86a3507
--- /dev/null
+++ b/templates/actor_profile_reset_avatar.php
@@ -0,0 +1,3 @@
+<button type="button" class="secondary inline" hx-post="/fragment/profile/resetAvatar" <?= ($reset ?? false) ? 'disabled' : '' ?>>
+ <?= __(($reset ?? false) ? 'user.profile.avatarReset' : 'user.profile.resetAvatar') ?>
+</button> \ No newline at end of file
diff --git a/templates/mobilepane_left.php b/templates/mobilepane_left.php
index f71279c..daab401 100644
--- a/templates/mobilepane_left.php
+++ b/templates/mobilepane_left.php
@@ -1,6 +1,8 @@
<?php
use Digitigrade\GlobalSettings;
+use Digitigrade\Model\UserAccount;
+$user = UserAccount::requireByCurrentSession();
$settings = GlobalSettings::getInstance();
?>
<!DOCTYPE html>
@@ -29,7 +31,7 @@ $settings = GlobalSettings::getInstance();
];
call_template('navigation_links', ['links' => $links]);
- call_template('write_note_form');
+ call_template('write_note_form', ['actor' => $user->actor]);
call_template('left_side_navigation');
?>
<p class="versionInfo"><?= sprintf(__('version'), get_version()) ?></p>
diff --git a/templates/skeleton.php b/templates/skeleton.php
index f7670c0..afe7321 100644
--- a/templates/skeleton.php
+++ b/templates/skeleton.php
@@ -59,7 +59,7 @@ $settings = GlobalSettings::getInstance();
<section id="leftPane">
<?php
if ($user != null) {
- call_template('write_note_form');
+ call_template('write_note_form', ['actor' => $user->actor]);
}
call_template('left_side_navigation');
?>
diff --git a/templates/write_note_form.php b/templates/write_note_form.php
index 2d50896..914c48b 100644
--- a/templates/write_note_form.php
+++ b/templates/write_note_form.php
@@ -1,5 +1,14 @@
<form id="writeNoteForm" action="/todo" method="post" hx-post="/fragment/note" hx-swap="outerHTML"
hx-disabled-elt="find button" _="on submit wait 1s then trigger update on #liveTimelineUpdater">
+ <div class="row miniProfile">
+ <a href="/@/<?= $actor->handle ?>">
+ <?php call_template('actor_avatar', ['actor' => $actor]); ?>
+ </a>
+ <div class="basicInfo">
+ <a class="displayName" href="/@/<?= $actor->handle ?>"><?= $actor->displayName ?></a>
+ <div class="handle">@<?= $actor->handle ?></div>
+ </div>
+ </div>
<div class="row">
<label for="noteContent"><?= __('writeNote.label') ?></label>
<textarea name="content" id="noteContent" required autocomplete="off"></textarea>