fix(chat-ui): move source settings to thread header
This commit is contained in:
@@ -4784,10 +4784,6 @@ async function decideFeedCard(card: FeedCard, decision: "accepted" | "rejected")
|
||||
:contact-initials="contactInitials"
|
||||
:format-thread-time="formatThreadTime"
|
||||
:thread-channel-label="threadChannelLabel"
|
||||
:thread-inboxes="threadInboxes"
|
||||
:set-inbox-hidden="setInboxHidden"
|
||||
:format-inbox-label="formatInboxLabel"
|
||||
:is-inbox-toggle-loading="isInboxToggleLoading"
|
||||
:people-deal-list="peopleDealList"
|
||||
:selected-deal-id="selectedDealId"
|
||||
:is-review-highlighted-deal="isReviewHighlightedDeal"
|
||||
@@ -4809,6 +4805,40 @@ async function decideFeedCard(card: FeedCard, decision: "accepted" | "rejected")
|
||||
<div v-else-if="selectedCommThread">
|
||||
<p class="font-medium">{{ selectedCommThread.contact }}</p>
|
||||
</div>
|
||||
<div v-if="selectedCommThread" class="dropdown dropdown-end" @click.stop>
|
||||
<button
|
||||
tabindex="0"
|
||||
class="btn btn-ghost btn-sm btn-square"
|
||||
title="Source visibility settings"
|
||||
>
|
||||
<svg viewBox="0 0 24 24" class="h-4 w-4 fill-current">
|
||||
<path d="M19.14 12.94a7.43 7.43 0 0 0 .05-.94 7.43 7.43 0 0 0-.05-.94l2.03-1.58a.5.5 0 0 0 .12-.63l-1.92-3.32a.5.5 0 0 0-.6-.22l-2.39.96a7.2 7.2 0 0 0-1.62-.94l-.36-2.54A.5.5 0 0 0 13.9 2h-3.8a.5.5 0 0 0-.49.41L9.25 4.95a7.2 7.2 0 0 0-1.62.94l-2.39-.96a.5.5 0 0 0-.6.22L2.72 8.47a.5.5 0 0 0 .12.63l2.03 1.58a7.43 7.43 0 0 0-.05.94c0 .31.02.63.05.94l-2.03 1.58a.5.5 0 0 0-.12.63l1.92 3.32c.13.23.39.32.6.22l2.39-.96c.5.39 1.05.71 1.62.94l.36 2.54c.04.24.25.41.49.41h3.8c.24 0 .45-.17.49-.41l.36-2.54c.57-.23 1.12-.55 1.62-.94l2.39.96c.22.09.47 0 .6-.22l1.92-3.32a.5.5 0 0 0-.12-.63zM12 15.5A3.5 3.5 0 1 1 12 8a3.5 3.5 0 0 1 0 7.5Z" />
|
||||
</svg>
|
||||
</button>
|
||||
<div tabindex="0" class="dropdown-content z-20 mt-1 w-60 rounded-xl border border-base-300 bg-base-100 p-2 shadow-lg">
|
||||
<p class="px-1 pb-1 text-[10px] font-semibold uppercase tracking-wide text-base-content/55">Sources</p>
|
||||
<div v-if="threadInboxes(selectedCommThread).length" class="space-y-1">
|
||||
<button
|
||||
v-for="inbox in threadInboxes(selectedCommThread)"
|
||||
:key="`thread-header-inbox-setting-${inbox.id}`"
|
||||
class="btn btn-ghost btn-xs h-auto min-h-0 w-full justify-between px-2 py-1 text-left normal-case"
|
||||
@click.stop="setInboxHidden(inbox.id, !inbox.isHidden)"
|
||||
>
|
||||
<span class="min-w-0 truncate">{{ formatInboxLabel(inbox) }}</span>
|
||||
<span class="shrink-0 text-[10px] text-base-content/70">
|
||||
{{
|
||||
isInboxToggleLoading(inbox.id)
|
||||
? "..."
|
||||
: inbox.isHidden
|
||||
? "Hidden"
|
||||
: "Visible"
|
||||
}}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<p v-else class="px-1 py-1 text-[11px] text-base-content/60">No sources.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<article class="h-full min-h-0 border-r border-base-300 flex flex-col">
|
||||
|
||||
Reference in New Issue
Block a user