From b93b10db8dd458d2ffbf7abd9b9cab2b04bf4a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Lesn=C3=A9?= Date: Thu, 13 Jul 2023 13:54:40 +0200 Subject: [PATCH] UI: Make index page title two lines --- src/conversation-ui/src/Conversation.jsx | 85 ++++++++++++----------- src/conversation-ui/src/conversation.scss | 30 +++++--- 2 files changed, 64 insertions(+), 51 deletions(-) diff --git a/src/conversation-ui/src/Conversation.jsx b/src/conversation-ui/src/Conversation.jsx index 72e21db3..6a0c9815 100644 --- a/src/conversation-ui/src/Conversation.jsx +++ b/src/conversation-ui/src/Conversation.jsx @@ -264,48 +264,51 @@ function Conversation() {
{conversationId &&

{conversation.title ? conversation.title : "New chat"}

}
-
- {conversation.messages.length == 0 && ( -
- 🔒 Private GPT -
-
-

💡

-
-
-

Examples

-

Generating content that is tailored to specific audiences or personas.

-

Help on technical language and jargon in specific industries (such as finance or healthcare).

-
-
-

⚡️

-
-
-

Capabilities

-

Analyzing large amounts of qualitative data (such as news articles or earnings calls) to inform investment decisions.

-

Generating summaries of court cases or contracts to save time on manual review.

-
-
-

⚠️

-
-
-

Limitations

-

Ensuring that generated content adheres to applicable regulations in a given industry or region.

-

Mitigating any risks associated with automated content creation (such as reputational harm or inadvertent bias).

-
+ {conversation.messages.length == 0 && ( +
+
+ 🔒 + Welcome to Private GPT +
+
+
+

💡

+
+
+

Examples

+

Generating content that is tailored to specific audiences or personas.

+

Help on technical language and jargon in specific industries (such as finance or healthcare).

+
+
+

⚡️

+
+
+

Capabilities

+

Analyzing large amounts of qualitative data (such as news articles or earnings calls) to inform investment decisions.

+

Generating summaries of court cases or contracts to save time on manual review.

+
+
+

⚠️

+
+
+

Limitations

+

Ensuring that generated content adheres to applicable regulations in a given industry or region.

+

Mitigating any risks associated with automated content creation (such as reputational harm or inadvertent bias).

- {!auth.userData && ( -
- )} + {!auth.userData && ( +
+ )} + {conversation.messages.length > 0 &&
{conversation.messages.map((message) => ( ))} -
+
} {auth.userData && (
h2 { // Disable line wrapping - white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + white-space: nowrap; } } @@ -36,22 +36,32 @@ > *:not(:last-child) { margin-bottom: var(--conversation-padding-v); } + } + + .conversation__empty { + align-items: center; + display: flex; + flex-direction: column; + flex-grow: 1; + justify-content: center; + + > *:not(:last-child) { + margin-bottom: calc(var(--conversation-padding-v) * 2); + } - .conversation__messages__empty { + .conversation__empty__header { align-items: center; display: flex; flex-direction: column; + text-align: center; - // Center the content vertically and horizontally - align-self: center; - margin: auto 0; - - > *:not(:last-child) { - margin-bottom: 1em; + > span { + font-size: 800%; + line-height: 1; } } - .conversation__messages__empty__doc { + .conversation__empty__doc { background-color: var(--background-muted); border-radius: var(--radius); display: grid;