Skip to content

Commit 723ec95

Browse files
Resize when minimized
1 parent 96ee372 commit 723ec95

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

browser-extension/src/pages/Index.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const agent = ref<Agent>()
2222
let sidebarSize = 400
2323
let displaying = false
2424
const minSidebarSize = 200
25+
const minimizedSidebarSize = 300
2526
let lastResizePos = 0
2627
const messages = ref<ChatMessage[]>([])
2728
const isMinimized = ref(false)
@@ -145,6 +146,12 @@ const onMinimizeSidebar = async () => {
145146
isMinimized.value ? "bottom" : "top"
146147
)
147148
)
149+
150+
if (isMinimized.value) {
151+
resizeSidebar(minimizedSidebarSize)
152+
} else {
153+
resizeSidebar(sidebarSize)
154+
}
148155
}
149156
150157
const onActivateAgent = async (agentId: string) => {
@@ -219,7 +226,7 @@ const onClearChat = () => {
219226
const sidebarClasses = computed(() => [
220227
'fixed flex flex-col bg-white border border-gray-300',
221228
isMinimized.value
222-
? 'bottom-4 right-4 w-80 rounded-xl shadow-lg cursor-pointer hover:shadow-xl transition-shadow'
229+
? 'bottom-4 right-4 w-100 rounded-xl shadow-lg cursor-pointer hover:shadow-xl transition-shadow'
223230
: 'm-2 -left-2 w-full h-[calc(100%-16px)] rounded-tl-3xl rounded-bl-3xl'
224231
])
225232
</script>

0 commit comments

Comments
 (0)