Skip to content

Commit

Permalink
Add max height to textarea
Browse files Browse the repository at this point in the history
  • Loading branch information
gencay committed Dec 11, 2022
1 parent 553f6cc commit c5b7d29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 3 additions & 1 deletion media/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ textarea::placeholder {

.textarea-wrapper {
display: grid;
max-height: 20rem;
}

.textarea-wrapper::after {
Expand All @@ -179,7 +180,8 @@ textarea::placeholder {

.textarea-wrapper>textarea {
resize: none;
overflow: hidden;
overflow: hidden auto;
max-height: 20rem;
}

.textarea-wrapper>textarea,
Expand Down
2 changes: 1 addition & 1 deletion media/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
: message.value;

list.innerHTML +=
`<div class="p-4 self-end mt-4 question-element-gnc relative" style="background: var(--vscode-list-hoverBackground)">
`<div class="p-4 self-end mt-4 question-element-gnc relative" style="background: var(--vscode-input-background)">
<p class="font-bold mb-5 flex">${userSvg}You</p>
<div class="mb-2 flex items-center">
<button title="Edit and resend this prompt" class="resend-element-gnc p-2 flex items-center rounded-lg absolute right-6 top-2">${pencilSvg}</button>
Expand Down
10 changes: 5 additions & 5 deletions src/chatgpt-view-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ export default class ChatGptViewProvider implements vscode.WebviewViewProvider {
</div>
</div>
<div id="chat-button-wrapper" class="w-full flex gap-2 justify-center items-center hidden">
<button class="flex gap-2 justify-center items-center rounded-lg p-2 m-2" id="clear-button">
<svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4 mr-1" xmlns="http://www.w3.org/2000/svg"><polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path></svg>
<div id="chat-button-wrapper" class="w-full flex gap-4 justify-center items-center hidden">
<button class="flex gap-2 justify-center items-center rounded-lg p-2" id="clear-button">
<svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4" xmlns="http://www.w3.org/2000/svg"><polyline points="1 4 1 10 7 10"></polyline><polyline points="23 20 23 14 17 14"></polyline><path d="M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15"></path></svg>
Clear conversation
</button>
<button class="flex gap-2 justify-center items-center rounded-lg p-2 m-2" id="export-button">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4 mr-1">
<button class="flex gap-2 justify-center items-center rounded-lg p-2" id="export-button">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-4 h-4">
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3" />
</svg>
Export all
Expand Down

0 comments on commit c5b7d29

Please sign in to comment.