mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-04 11:41:04 +02:00
Cleaner Layout (#1857)
This commit is contained in:
@ -54,11 +54,13 @@ export function PagesTab({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const isHistoryEmpty = !existingChats || existingChats.length === 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mb-1 ml-3 relative miniscroll overflow-y-auto h-full">
|
<div className="mb-1 ml-3 relative miniscroll overflow-y-auto h-full">
|
||||||
{folders && folders.length > 0 && (
|
{folders && folders.length > 0 && (
|
||||||
<div className="py-2 border-b border-border">
|
<div className="py-2 border-b border-border">
|
||||||
<div className="text-xs text-subtle flex pb-0.5 mb-1.5 mt-2 font-medium">
|
<div className="text-xs text-subtle flex pb-0.5 mb-1.5 mt-2 font-bold">
|
||||||
Folders
|
Folders
|
||||||
</div>
|
</div>
|
||||||
<FolderList
|
<FolderList
|
||||||
@ -80,13 +82,20 @@ export function PagesTab({
|
|||||||
} rounded-md`}
|
} rounded-md`}
|
||||||
>
|
>
|
||||||
{(page == "chat" || page == "search") && (
|
{(page == "chat" || page == "search") && (
|
||||||
<p className="my-2 text-xs text-subtle flex font-semibold">
|
<p className="my-2 text-xs text-subtle flex font-bold">
|
||||||
{page == "chat" && "Chat "}
|
{page == "chat" && "Chat "}
|
||||||
{page == "search" && "Search "}
|
{page == "search" && "Search "}
|
||||||
History
|
History
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
{Object.entries(groupedChatSessions).map(
|
{isHistoryEmpty ? (
|
||||||
|
<p className="text-sm text-subtle mt-2 w-[250px]">
|
||||||
|
{page === "search"
|
||||||
|
? "Try running a search! Your search history will appear here."
|
||||||
|
: "Try sending a message! Your chat history will appear here."}
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
Object.entries(groupedChatSessions).map(
|
||||||
([dateRange, chatSessions], ind) => {
|
([dateRange, chatSessions], ind) => {
|
||||||
if (chatSessions.length > 0) {
|
if (chatSessions.length > 0) {
|
||||||
return (
|
return (
|
||||||
@ -117,6 +126,7 @@ export function PagesTab({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user