Skip to content

Commit 1ddfcba

Browse files
committed
feat(style): update ModelSelector container position
1 parent 9e04d69 commit 1ddfcba

File tree

3 files changed

+13
-16
lines changed

3 files changed

+13
-16
lines changed

components/ModelSelector.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
class="text-xs max-w-full"
1111
:disabled="modelList.length === 0"
1212
dropdownClass="text-xs text-black w-52"
13-
containerClass="max-w-full"
13+
:containerClass="classNames('max-w-full', containerClass)"
1414
:dropdownAlign="dropdownAlign"
1515
>
1616
<template #button="{ option }">
@@ -84,13 +84,15 @@ import { formatSize } from '@/utils/formatter'
8484
import { SUPPORTED_MODELS } from '@/utils/llm/web-llm'
8585
import { getTabStore } from '@/utils/tab-store'
8686
import { getUserConfig } from '@/utils/user-config'
87+
import { classNames } from '@/utils/vue/utils'
8788
8889
import Selector from './Selector.vue'
8990
9091
defineProps<{
9192
showDetails?: boolean
9293
allowDelete?: boolean
9394
dropdownAlign?: 'left' | 'center' | 'right' | 'stretch' | undefined
95+
containerClass?: string
9496
}>()
9597
9698
const { modelList: ollamaModelList } = toRefs(useOllamaStatusStore())

entrypoints/content/components/Chat/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@
4747
</ScrollContainer>
4848
<div
4949
ref="inputContainerRef"
50-
class="p-3 absolute bottom-0 left-0 right-0 flex flex-col gap-3 z-50"
50+
class="p-4 pt-2 absolute bottom-0 left-0 right-0 flex flex-col gap-3 z-50"
5151
>
5252
<div>
5353
<TabSelector v-model:selectedTabs="contextTabs" />
5454
</div>
5555
<div class="flex gap-1">
5656
<ScrollContainer
5757
class="max-h-72 grow shadow-02 bg-white rounded-md"
58-
itemContainerClass="p-2"
58+
itemContainerClass="p-1"
5959
>
6060
<div class="flex gap-1 items-stretch">
6161
<AutoExpandTextArea

entrypoints/content/components/Main.vue

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,23 @@
44
ref="topRef"
55
class="bg-[#E9E9EC]"
66
>
7-
<div class="h-13 px-3 flex items-center justify-between border-b border-gray-200 ">
7+
<div class="h-15 px-4 flex items-center justify-between border-b border-gray-200 ">
88
<div class="left flex items-center gap-2">
99
<Logo
10-
showText
1110
class="font-bold text-base"
1211
/>
12+
<ModelSelector
13+
containerClass="h-7"
14+
class="max-w-44"
15+
dropdownAlign="left"
16+
/>
17+
</div>
18+
<div class="right flex items-center gap-4">
1319
<IconAdd
1420
v-if="!chat.historyManager.onlyHasDefaultMessages()"
1521
class="w-4 cursor-pointer hover:text-gray-500"
1622
@click="onNewChat"
1723
/>
18-
</div>
19-
<div class="right flex items-center gap-4">
2024
<IconSetting
2125
class="w-4 cursor-pointer hover:text-gray-500 ml-1"
2226
@click="onClickSetting"
@@ -38,15 +42,6 @@
3842
/>
3943
</div>
4044
</div>
41-
<div
42-
class="w-full flex justify-end px-4 pb-px"
43-
:style="{ top: `${topBounding.height.value}px` }"
44-
>
45-
<ModelSelector
46-
class="max-w-44"
47-
dropdownAlign="right"
48-
/>
49-
</div>
5045
</div>
5146
<div class="px-5 py-2">
5247
<div

0 commit comments

Comments
 (0)