Skip to content

Commit d49c3bc

Browse files
committed
feat(chat): enhance send button positioning and styling in chat component
chore(i18n): update extension description for clarity and accuracy
1 parent 8a02ae1 commit d49c3bc

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

entrypoints/content/components/Chat/index.vue

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
<div>
5353
<TabSelector v-model:selectedTabs="contextTabs" />
5454
</div>
55-
<div class="flex gap-1">
55+
<div class="flex gap-1 relative">
5656
<ScrollContainer
5757
class="max-h-72 grow shadow-02 bg-white rounded-md"
5858
itemContainerClass="p-1"
@@ -68,29 +68,35 @@
6868
: 'Ask follow up...'
6969
"
7070
class="w-full block outline-none border-none resize-none p-2 field-sizing-content leading-5 text-sm wrap-anywhere"
71+
:style="{ paddingRight: `${sendButtonContainerWidth}px` }"
7172
@keydown="onKeydown"
7273
@compositionstart="isComposing = true"
7374
@compositionend="isComposing = false"
7475
/>
75-
<Button
76-
v-if="chat.isAnswering()"
77-
variant="secondary"
78-
class="px-2 grow-0 shrink-0"
79-
@click="onStop"
80-
>
81-
{{ "Stop" }}
82-
</Button>
83-
<Button
84-
v-else
85-
variant="primary"
86-
class="px-2 grow-0 shrink-0"
87-
:disabled="!allowAsk"
88-
@click="onSubmit"
89-
>
90-
<IconSendFill class="w-4 h-4 text-white" />
91-
</Button>
9276
</div>
9377
</ScrollContainer>
78+
<div
79+
ref="sendButtonContainerRef"
80+
class="absolute right-0 top-0 bottom-0 p-1"
81+
>
82+
<Button
83+
v-if="chat.isAnswering()"
84+
variant="secondary"
85+
class="px-2 grow-0 shrink-0 h-full"
86+
@click="onStop"
87+
>
88+
{{ "Stop" }}
89+
</Button>
90+
<Button
91+
v-else
92+
variant="primary"
93+
class="px-2 grow-0 shrink-0 h-full"
94+
:disabled="!allowAsk"
95+
@click="onSubmit"
96+
>
97+
<IconSendFill class="w-4 h-4 text-white" />
98+
</Button>
99+
</div>
94100
</div>
95101
</div>
96102
</div>
@@ -118,7 +124,9 @@ import MessageAssistant from './Messages/Assistant.vue'
118124
import MessageTask from './Messages/Task.vue'
119125
120126
const inputContainerRef = ref<HTMLDivElement>()
127+
const sendButtonContainerRef = ref<HTMLDivElement>()
121128
const { height: inputContainerHeight } = useElementBounding(inputContainerRef)
129+
const { width: sendButtonContainerWidth } = useElementBounding(sendButtonContainerRef)
122130
123131
const userInput = ref('')
124132
const isComposing = ref(false)

public/_locales/en/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"message": "NativeMind: Your fully private, open-source, on-device AI assistant"
44
},
55
"extDesc": {
6-
"message": "Summarize, translate, and search webpages with AI models running securely on your device."
6+
"message": "NativeMind connects to local LLMs via Ollama to bring powerful AI into your browser — with zero data sent to the cloud."
77
}
88
}

0 commit comments

Comments
 (0)