From 5a6300f473b8be0e90a16e2b5992299b0ea1ddff Mon Sep 17 00:00:00 2001 From: winter Date: Mon, 27 Jan 2025 19:45:39 +0000 Subject: context menus and note deletion --- templates/actor_profile.php | 24 +++++++++++++++++------- templates/actor_profile_block_button.php | 8 +++++--- templates/infinite_scroll_trigger.php | 2 +- templates/menu_button.php | 14 ++++++++++++++ templates/note.php | 17 +++++++++++++++++ 5 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 templates/menu_button.php (limited to 'templates') diff --git a/templates/actor_profile.php b/templates/actor_profile.php index cfcc510..1e37f28 100644 --- a/templates/actor_profile.php +++ b/templates/actor_profile.php @@ -5,6 +5,7 @@ $user = UserAccount::findByCurrentSession(); ?>
+ @@ -12,20 +13,28 @@ $user = UserAccount::findByCurrentSession(); +
displayName) ?>
@getFullHandle() ?>
-
created->format('Y-m-d')) ?>
+
created->format('Y-m-d')) ?> +
+
- actor != $actor) - call_template('actor_profile_block_button', ['actor' => $actor, 'user' => $user]); ?> - isLocal): ?> - - + + actor != $actor): ?> +
  • $user, 'actor' => $actor]) ?>
  • + +
    +
    + bio) && $actor->bio != '') { ?>
    bio) ?>
    + \ No newline at end of file diff --git a/templates/actor_profile_block_button.php b/templates/actor_profile_block_button.php index f82cc9a..1b71613 100644 --- a/templates/actor_profile_block_button.php +++ b/templates/actor_profile_block_button.php @@ -2,6 +2,8 @@ $blocks = $user->actor->blocks($actor); $action = $blocks ? 'unblock' : 'block'; ?> - \ No newline at end of file + \ No newline at end of file diff --git a/templates/infinite_scroll_trigger.php b/templates/infinite_scroll_trigger.php index dce1343..3a19ebe 100644 --- a/templates/infinite_scroll_trigger.php +++ b/templates/infinite_scroll_trigger.php @@ -1,4 +1,4 @@ - +
    0]); ?>
    diff --git a/templates/menu_button.php b/templates/menu_button.php new file mode 100644 index 0000000..da47569 --- /dev/null +++ b/templates/menu_button.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/templates/note.php b/templates/note.php index e5c2942..74ce566 100644 --- a/templates/note.php +++ b/templates/note.php @@ -94,6 +94,23 @@ if ($user != null) { 'disabled' => $actionsDisabled ]); ?> +
    + + author == $user?->actor || $user?->isAdmin): ?> +
  • + +
  • + + +
    $note]); ?> -- cgit v1.3