aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates/interaction_button.php
diff options
context:
space:
mode:
Diffstat (limited to 'templates/interaction_button.php')
-rw-r--r--templates/interaction_button.php22
1 files changed, 0 insertions, 22 deletions
diff --git a/templates/interaction_button.php b/templates/interaction_button.php
deleted file mode 100644
index 2b4fb82..0000000
--- a/templates/interaction_button.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-$active = $active ?? false;
-$tooltip = match ($action) {
- 'like' => __('note.action.like'),
- 'dislike' => __('note.action.dislike'),
- 'reshare' => __('note.action.reshare')
-};
-$icon = match ($action) {
- 'like' => $active ? 'favorite' : 'favorite-outline',
- 'dislike' => $active ? 'heart-broken' : 'heart-broken-outline',
- 'reshare' => $active ? 'repeat-on' : 'repeat'
-};
-$id = "interactButton-$action-$note->id";
-?>
-<div class="interactButtonContainer <?= $action . ($active ? ' active' : '') ?>">
- <button title="<?= $tooltip ?>" class="material-symbols <?= $icon ?>"
- hx-post="<?= "/fragment/note/$note->id/$action" ?>" hx-swap="outerHTML"
- hx-target="closest .interactButtonContainer" hx-disabled-elt="this" id="<?= $id ?>"
- _="on htmx:afterOnLoad trigger update on #liveTimelineUpdater" <?= ($disabled ?? false) ? 'disabled' : '' ?>>
- </button>
- <label for="<?= $id ?>" class="interactionCount"><?= $count ?? '' ?></label>
-</div> \ No newline at end of file