From 645e8bd0b2cf5f020585047d683ed0b26e892204 Mon Sep 17 00:00:00 2001 From: winter Date: Sun, 16 Feb 2025 20:09:16 +0000 Subject: share button in context menus --- templates/menu_button.php | 2 +- templates/note.php | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/menu_button.php b/templates/menu_button.php index da47569..4d5dc48 100644 --- a/templates/menu_button.php +++ b/templates/menu_button.php @@ -4,7 +4,7 @@ set menu to next .popupMenu toggle @hidden on menu measure me then set pos to it - set menu.style.top to `${scrollY + pos.top}px` + set menu.style.top to `${(scrollY + pos.top) - 8}px` set menu.style.right to `${(scrollX + innerWidth) - pos.right}px` on click from elsewhere set @hidden of next .popupMenu to false "> diff --git a/templates/note.php b/templates/note.php index 4cdcd94..19a1895 100644 --- a/templates/note.php +++ b/templates/note.php @@ -15,6 +15,7 @@ if ($user != null) { $interactions = $note->getInteractionsWithAuthor($user->actor); $interKinds = array_map(fn($inter) => $inter->kind, $interactions); } +$pathToSelf = '/@/' . $note->author->getFullHandle() . '/note/' . $note->id; ?>
@@ -33,8 +34,7 @@ if ($user != null) { @author->getFullHandle()) ?> - + created, $prefs?->get('locale.timezone')) . (isset($note->modified) && $note->modified != $note->created ? ' (' . format_datetime($note->modified, $prefs?->get('locale.timezone')) . ')' @@ -126,6 +126,17 @@ if ($user != null) { global $note; $user = UserAccount::findByCurrentSession(); ?> +
  • + +
  • author->isLocal && ($note->author == $user?->actor || $user?->isAdmin)): ?>
  • + author->isLocal): ?> +
  • + + + + +
  • + -- cgit v1.3