mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-10-29 22:23:01 +00:00
refactor(context-menu):format
This commit is contained in:
4 files changed
+22
-23
No files matched your search
@@ -140,12 +140,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Contact context menu -->
|
||||
<ContextMenuPanel
|
||||
:show="contextMenu.visible"
|
||||
:x="contextMenu.x"
|
||||
:y="contextMenu.y"
|
||||
panel-class="z-[210]"
|
||||
>
|
||||
<ContextMenuPanel :show="contextMenu.visible" :x="contextMenu.x" :y="contextMenu.y" panel-class="z-[210]">
|
||||
<ContextMenuItem @click="openConversation(contextMenu.contact)">
|
||||
<MaterialDesignIcon icon-name="message-text-outline" class="size-4" />
|
||||
{{ $t("contacts.send_message") }}
|
||||
|
||||
@@ -1323,7 +1323,8 @@
|
||||
:key="r.reactionHash || ridx"
|
||||
class="inline-flex min-h-[1.35rem] min-w-[1.35rem] cursor-default select-none items-center justify-center rounded-full border border-gray-200/90 bg-white px-1.5 py-0.5 text-sm leading-none shadow-sm dark:border-zinc-600/90 dark:bg-zinc-900"
|
||||
:title="reactionReactorLabel(r.sender)"
|
||||
>{{ r.emoji }}</span>
|
||||
>{{ r.emoji }}</span
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- expanded message details -->
|
||||
@@ -1836,16 +1837,16 @@
|
||||
<!-- Message Context Menu (Teleport to body to avoid overflow clipping) -->
|
||||
<Teleport to="body">
|
||||
<ContextMenuPanel
|
||||
:show="messageContextMenu.show"
|
||||
:x="messageContextMenu.x"
|
||||
:y="messageContextMenu.y"
|
||||
panel-class="z-[200]"
|
||||
v-click-outside="{
|
||||
handler: () => {
|
||||
if (!messageContextMenu.justOpened) messageContextMenu.show = false;
|
||||
},
|
||||
capture: true,
|
||||
}"
|
||||
:show="messageContextMenu.show"
|
||||
:x="messageContextMenu.x"
|
||||
:y="messageContextMenu.y"
|
||||
panel-class="z-[200]"
|
||||
>
|
||||
<ContextMenuItem @click="replyToMessage(messageContextMenu.chatItem)">
|
||||
<MaterialDesignIcon icon-name="reply" class="size-4 text-indigo-500" />
|
||||
@@ -3876,7 +3877,7 @@ export default {
|
||||
);
|
||||
}
|
||||
const conv = this.conversations.find(
|
||||
(c) => c.destination_hash && String(c.destination_hash).toLowerCase() === hex,
|
||||
(c) => c.destination_hash && String(c.destination_hash).toLowerCase() === hex
|
||||
);
|
||||
if (conv) {
|
||||
return conv.custom_display_name ?? conv.display_name ?? this.formatDestinationHash(hex);
|
||||
|
||||
@@ -519,11 +519,11 @@
|
||||
|
||||
<!-- Context Menu -->
|
||||
<ContextMenuPanel
|
||||
v-click-outside="{ handler: () => (contextMenu.show = false), capture: true }"
|
||||
:show="contextMenu.show"
|
||||
:x="contextMenu.x"
|
||||
:y="contextMenu.y"
|
||||
panel-class="z-[100]"
|
||||
v-click-outside="{ handler: () => (contextMenu.show = false), capture: true }"
|
||||
>
|
||||
<ContextMenuItem @click="bulkMarkAsRead">
|
||||
<MaterialDesignIcon icon-name="email-open-outline" class="size-4 text-gray-400" />
|
||||
|
||||
@@ -278,16 +278,16 @@
|
||||
<!-- Favourite Context Menu (Teleport to body to avoid overflow clipping) -->
|
||||
<Teleport to="body">
|
||||
<ContextMenuPanel
|
||||
:show="favouriteContextMenu.show"
|
||||
:x="favouriteContextMenu.x"
|
||||
:y="favouriteContextMenu.y"
|
||||
panel-class="z-[200] min-w-56"
|
||||
v-click-outside="{
|
||||
handler: () => {
|
||||
if (!favouriteContextMenu.justOpened) closeContextMenus();
|
||||
},
|
||||
capture: true,
|
||||
}"
|
||||
:show="favouriteContextMenu.show"
|
||||
:x="favouriteContextMenu.x"
|
||||
:y="favouriteContextMenu.y"
|
||||
panel-class="z-[200] min-w-56"
|
||||
>
|
||||
<ContextMenuItem @click="renameFavouriteFromContext">
|
||||
<MaterialDesignIcon icon-name="pencil" class="size-4 text-gray-400" />
|
||||
@@ -309,7 +309,10 @@
|
||||
<MaterialDesignIcon icon-name="check-circle" class="size-4 text-emerald-500" />
|
||||
{{ $t("nomadnet.lift_banishment") }}
|
||||
</ContextMenuItem>
|
||||
<ContextMenuItem item-class="text-red-600 dark:text-red-400" @click="removeFavouriteFromContext">
|
||||
<ContextMenuItem
|
||||
item-class="text-red-600 dark:text-red-400"
|
||||
@click="removeFavouriteFromContext"
|
||||
>
|
||||
<MaterialDesignIcon icon-name="trash-can" class="size-4 text-red-400" />
|
||||
{{ $t("nomadnet.remove") }}
|
||||
</ContextMenuItem>
|
||||
@@ -331,11 +334,11 @@
|
||||
<!-- Section Context Menu (Teleport to body) -->
|
||||
<Teleport to="body">
|
||||
<ContextMenuPanel
|
||||
v-click-outside="{ handler: closeContextMenus, capture: true }"
|
||||
:show="sectionContextMenu.show"
|
||||
:x="sectionContextMenu.x"
|
||||
:y="sectionContextMenu.y"
|
||||
panel-class="z-[200]"
|
||||
v-click-outside="{ handler: closeContextMenus, capture: true }"
|
||||
>
|
||||
<ContextMenuItem @click="renameSectionFromContext">
|
||||
<MaterialDesignIcon icon-name="pencil" class="size-4 text-gray-400" />
|
||||
@@ -462,16 +465,16 @@
|
||||
<!-- Announce Context Menu (right-click, Teleport to body) -->
|
||||
<Teleport to="body">
|
||||
<ContextMenuPanel
|
||||
:show="announceContextMenu.show"
|
||||
:x="announceContextMenu.x"
|
||||
:y="announceContextMenu.y"
|
||||
panel-class="z-[200]"
|
||||
v-click-outside="{
|
||||
handler: () => {
|
||||
if (!announceContextMenu.justOpened) closeContextMenus();
|
||||
},
|
||||
capture: true,
|
||||
}"
|
||||
:show="announceContextMenu.show"
|
||||
:x="announceContextMenu.x"
|
||||
:y="announceContextMenu.y"
|
||||
panel-class="z-[200]"
|
||||
>
|
||||
<ContextMenuItem
|
||||
v-if="!isFavourite(announceContextMenu.node?.destination_hash)"
|
||||
|
||||
Reference in new issue
Block a user