mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-04-27 17:15:51 +00:00
refactor(messages): format
This commit is contained in:
@@ -865,10 +865,10 @@ export default {
|
||||
},
|
||||
discoveryAutoconnectMetadataPresent() {
|
||||
const fromActive = (this.discoveredActive || []).some(
|
||||
(a) => a.autoconnect_source != null && a.autoconnect_source !== undefined,
|
||||
(a) => a.autoconnect_source != null && a.autoconnect_source !== undefined
|
||||
);
|
||||
const fromStats = (this.activeInterfaceStats || []).some(
|
||||
(s) => s.autoconnect_source != null && s.autoconnect_source !== undefined,
|
||||
(s) => s.autoconnect_source != null && s.autoconnect_source !== undefined
|
||||
);
|
||||
return fromActive || fromStats;
|
||||
},
|
||||
|
||||
@@ -3429,9 +3429,7 @@ export default {
|
||||
const la = a.telemetry?.location;
|
||||
const lb = b.telemetry?.location;
|
||||
if (!la || !lb || la.latitude == null || lb.latitude == null) return false;
|
||||
return (
|
||||
Math.abs(la.latitude - lb.latitude) < 0.005 && Math.abs(la.longitude - lb.longitude) < 0.005
|
||||
);
|
||||
return Math.abs(la.latitude - lb.latitude) < 0.005 && Math.abs(la.longitude - lb.longitude) < 0.005;
|
||||
};
|
||||
const out = [];
|
||||
for (const t of sorted) {
|
||||
|
||||
@@ -307,9 +307,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="flex w-full flex-wrap items-center gap-0.5 px-0.5"
|
||||
class="flex w-fit max-w-full flex-wrap items-center gap-0.5 px-0.5"
|
||||
:class="[
|
||||
entry.items[0].is_outbound ? 'justify-end' : 'justify-start',
|
||||
entry.items[0].is_outbound ? 'self-end justify-end' : 'self-start justify-start',
|
||||
(entry.items[0].lxmf_message.reactions?.length ?? 0) > 0 ? 'mt-0.5' : 'mt-0',
|
||||
]"
|
||||
>
|
||||
@@ -317,6 +317,9 @@
|
||||
v-for="(r, ridx) in entry.items[0].lxmf_message.reactions"
|
||||
:key="r.reactionHash || ridx"
|
||||
class="inline-flex min-h-[1.125rem] min-w-[1.125rem] cursor-default select-none items-center justify-center rounded-full border border-gray-200/90 bg-white px-1 py-0 text-sm leading-none shadow-sm dark:border-zinc-600/90 dark:bg-zinc-900"
|
||||
:style="{
|
||||
order: entry.items[0].is_outbound ? ridx + 2 : ridx + 1,
|
||||
}"
|
||||
:title="cv.reactionReactorLabel(r.sender)"
|
||||
>{{ r.emoji }}</span
|
||||
>
|
||||
@@ -328,6 +331,11 @@
|
||||
? 'min-h-[1.125rem] min-w-[1.125rem] px-1 py-0'
|
||||
: 'h-4 w-4 min-h-0 p-0'
|
||||
"
|
||||
:style="{
|
||||
order: entry.items[0].is_outbound
|
||||
? 1
|
||||
: (entry.items[0].lxmf_message.reactions?.length ?? 0) + 1,
|
||||
}"
|
||||
:title="$t('messages.react')"
|
||||
@click.stop="cv.openReactionPicker(entry.items[0])"
|
||||
>
|
||||
@@ -948,9 +956,9 @@
|
||||
|
||||
<div
|
||||
v-if="chatItem.lxmf_message.reactions?.length || !chatItem.lxmf_message.is_reaction"
|
||||
class="flex w-full flex-wrap items-center gap-0.5 px-0.5"
|
||||
class="flex w-fit max-w-full flex-wrap items-center gap-0.5 px-0.5"
|
||||
:class="[
|
||||
chatItem.is_outbound ? 'justify-end' : 'justify-start',
|
||||
chatItem.is_outbound ? 'self-end justify-end' : 'self-start justify-start',
|
||||
(chatItem.lxmf_message.reactions?.length ?? 0) > 0 ? 'mt-0.5' : 'mt-0',
|
||||
]"
|
||||
>
|
||||
@@ -958,6 +966,9 @@
|
||||
v-for="(r, ridx) in chatItem.lxmf_message.reactions"
|
||||
:key="r.reactionHash || ridx"
|
||||
class="inline-flex min-h-[1.125rem] min-w-[1.125rem] cursor-default select-none items-center justify-center rounded-full border border-gray-200/90 bg-white px-1 py-0 text-sm leading-none shadow-sm dark:border-zinc-600/90 dark:bg-zinc-900"
|
||||
:style="{
|
||||
order: chatItem.is_outbound ? ridx + 2 : ridx + 1,
|
||||
}"
|
||||
:title="cv.reactionReactorLabel(r.sender)"
|
||||
>{{ r.emoji }}</span
|
||||
>
|
||||
@@ -970,6 +981,11 @@
|
||||
? 'min-h-[1.125rem] min-w-[1.125rem] px-1 py-0'
|
||||
: 'h-4 w-4 min-h-0 p-0'
|
||||
"
|
||||
:style="{
|
||||
order: chatItem.is_outbound
|
||||
? 1
|
||||
: (chatItem.lxmf_message.reactions?.length ?? 0) + 1,
|
||||
}"
|
||||
:title="$t('messages.react')"
|
||||
@click.stop="cv.openReactionPicker(chatItem)"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user