Commit 0ba824d9 authored by Kantz's avatar Kantz
Browse files

chat hat eigene Scrollbar

parent dbf6c396
...@@ -34,6 +34,12 @@ export default function MessageInput({ ...@@ -34,6 +34,12 @@ export default function MessageInput({
rows={3} rows={3}
value={value} value={value}
onChange={(event) => onChange(event.target.value)} onChange={(event) => onChange(event.target.value)}
onKeyDown={(event) => {
if (event.key === "Enter" && event.ctrlKey) {
event.preventDefault();
onSend();
}
}}
/> />
</div> </div>
); );
......
...@@ -31,7 +31,7 @@ const mockDocs: RetrievedDoc[] = [ ...@@ -31,7 +31,7 @@ const mockDocs: RetrievedDoc[] = [
export default function App() { export default function App() {
const [messages, setMessages] = useState<ChatMessage[]>(initialMessages); const [messages, setMessages] = useState<ChatMessage[]>(initialMessages);
const [draft, setDraft] = useState(""); const [draft, setDraft] = useState("");
const [isCanvasVisible, setIsCanvasVisible] = useState(true); const [isCanvasVisible, setIsCanvasVisible] = useState(false);
const handleSend = async () => { const handleSend = async () => {
const trimmed = draft.trim(); const trimmed = draft.trim();
......
...@@ -13,10 +13,16 @@ body { ...@@ -13,10 +13,16 @@ body {
margin: 0; margin: 0;
} }
.app-shell { #root {
min-height: 100vh; min-height: 100vh;
}
.app-shell {
height: 100vh;
padding: 24px; padding: 24px;
background: radial-gradient(circle at top left, #fff7e6, #f4f1ea); background: radial-gradient(circle at top left, #fff7e6, #f4f1ea);
display: flex;
flex-direction: column;
} }
.app-header { .app-header {
...@@ -73,12 +79,16 @@ body { ...@@ -73,12 +79,16 @@ body {
display: grid; display: grid;
grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
gap: 24px; gap: 24px;
flex: 1;
min-height: 0;
overflow: hidden;
} }
.chat-column { .chat-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 16px;
min-height: 0;
} }
.chat-window { .chat-window {
...@@ -89,7 +99,8 @@ body { ...@@ -89,7 +99,8 @@ body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 16px; gap: 16px;
min-height: 420px; min-height: 0;
flex: 1;
} }
.chat-title { .chat-title {
...@@ -102,6 +113,7 @@ body { ...@@ -102,6 +113,7 @@ body {
flex-direction: column; flex-direction: column;
gap: 12px; gap: 12px;
overflow-y: auto; overflow-y: auto;
min-height: 0;
} }
.message-bubble { .message-bubble {
...@@ -135,6 +147,10 @@ body { ...@@ -135,6 +147,10 @@ body {
flex-wrap: wrap; flex-wrap: wrap;
} }
.composer-row .btn.primary {
margin-left: auto;
}
.composer-input { .composer-input {
width: 100%; width: 100%;
resize: vertical; resize: vertical;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment