aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorwinter2025-02-07 19:45:36 +0000
committerwinter2025-02-07 19:45:36 +0000
commitcc5ab7a365e2e045cc1af43727e56f56d088a0df (patch)
tree1e80a0aedba4cb4dcdda098d7e4497a52cb105a9 /templates
parentd18ec187847893f94418b29bc6a087d6b2dd9a2d (diff)
more stuff :3
- post form detects images better - post form is preserved across navigations - post form has most options hidden - details/summaries use nicer icons
Diffstat (limited to 'templates')
-rw-r--r--templates/write_note_form.php40
1 files changed, 22 insertions, 18 deletions
diff --git a/templates/write_note_form.php b/templates/write_note_form.php
index 82964c5..9294a7c 100644
--- a/templates/write_note_form.php
+++ b/templates/write_note_form.php
@@ -4,7 +4,8 @@
</form>
<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">
+ hx-disabled-elt="find button" _="on submit wait 1s then trigger update on #liveTimelineUpdater"
+ <?= ($_SERVER['REQUEST_METHOD'] == 'GET') ? 'hx-preserve' : '' ?>>
<div class="row miniProfile">
<a href="/@/<?= $actor->handle ?>">
<?php call_template('actor_avatar', ['actor' => $actor]); ?>
@@ -21,23 +22,26 @@
<textarea name="content" id="noteContent" required autocomplete="off"
placeholder="<?= __('writeNote.placeholder') ?>"></textarea>
</div>
- <div class="row">
- <label class="standalone"><?= __('writeNote.mentions.label') ?></label>
- <?php call_template('user_mention_pill'); ?>
- </div>
- <div class="row">
- <label class="standalone"><?= __('writeNote.attachments.label') ?></label>
- <?php call_template('attachment_pill'); ?>
- </div>
- <div class="row">
- <label for="noteScope"><?= __('writeNote.scope.label') ?></label>
- <select name="scope" id="noteScope" required autocomplete="off">
- <option value="none"><?= __('note.privacy.scope.none') ?></option>
- <option value="mutuals"><?= __('note.privacy.scope.mutuals') ?></option>
- <option value="followers"><?= __('note.privacy.scope.followers') ?></option>
- <option value="public" selected><?= __('note.privacy.scope.public') ?></option>
- </select>
- </div>
+ <details>
+ <summary><?= __('writeNote.moreOptions') ?></summary>
+ <div class="row">
+ <label class="standalone"><?= __('writeNote.mentions.label') ?></label>
+ <?php call_template('user_mention_pill'); ?>
+ </div>
+ <div class="row">
+ <label class="standalone"><?= __('writeNote.attachments.label') ?></label>
+ <?php call_template('attachment_pill'); ?>
+ </div>
+ <div class="row">
+ <label for="noteScope"><?= __('writeNote.scope.label') ?></label>
+ <select name="scope" id="noteScope" required autocomplete="off">
+ <option value="none"><?= __('note.privacy.scope.none') ?></option>
+ <option value="mutuals"><?= __('note.privacy.scope.mutuals') ?></option>
+ <option value="followers"><?= __('note.privacy.scope.followers') ?></option>
+ <option value="public" selected><?= __('note.privacy.scope.public') ?></option>
+ </select>
+ </div>
+ </details>
<div class="row">
<button class="primary"><?= __('writeNote.action') ?></button>
</div>