Move AI button to logo and add left chat sidebar
Some checks failed
Build Docker Image / build (push) Failing after 1m50s
Some checks failed
Build Docker Image / build (push) Failing after 1m50s
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<div class="min-h-screen flex flex-col bg-base-300">
|
||||
<!-- Fixed Header Container -->
|
||||
<div class="fixed top-0 left-0 right-0 z-40" :style="headerContainerStyle">
|
||||
<AiChatSidebar
|
||||
:open="isChatOpen"
|
||||
:width="chatWidth"
|
||||
@close="isChatOpen = false"
|
||||
/>
|
||||
|
||||
<div class="flex-1 flex flex-col" :style="contentStyle">
|
||||
<!-- Fixed Header Container -->
|
||||
<div class="fixed top-0 left-0 right-0 z-40" :style="headerContainerStyle">
|
||||
<!-- Animated background for home page -->
|
||||
<HeroBackground v-if="isHomePage" :collapse-progress="collapseProgress" />
|
||||
|
||||
@@ -34,7 +41,9 @@
|
||||
:is-collapsed="isHomePage ? heroIsCollapsed : (isCatalogSection || isClientArea)"
|
||||
:is-home-page="isHomePage"
|
||||
:is-client-area="isClientArea"
|
||||
:chat-open="isChatOpen"
|
||||
@toggle-theme="toggleTheme"
|
||||
@toggle-chat="isChatOpen = !isChatOpen"
|
||||
@set-catalog-mode="setCatalogMode"
|
||||
@sign-out="onClickSignOut"
|
||||
@sign-in="signIn()"
|
||||
@@ -64,12 +73,13 @@
|
||||
v-if="!isHomePage && !isCatalogSection && !isClientArea"
|
||||
:section="currentSection"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Page content - padding-top compensates for fixed header -->
|
||||
<main class="flex-1 flex flex-col min-h-0 px-3 lg:px-6" :style="mainStyle">
|
||||
<slot />
|
||||
</main>
|
||||
<!-- Page content - padding-top compensates for fixed header -->
|
||||
<main class="flex-1 flex flex-col min-h-0 px-3 lg:px-6" :style="mainStyle">
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -83,6 +93,14 @@ const localePath = useLocalePath()
|
||||
const { locale, locales } = useI18n()
|
||||
const switchLocalePath = useSwitchLocalePath()
|
||||
|
||||
const isChatOpen = useState('ai-chat-open', () => false)
|
||||
const chatWidth = computed(() => (isChatOpen.value ? 'clamp(240px, 15vw, 360px)' : '0px'))
|
||||
const contentStyle = computed(() => ({
|
||||
transform: isChatOpen.value ? `translateX(${chatWidth.value})` : 'translateX(0)',
|
||||
width: isChatOpen.value ? `calc(100% - ${chatWidth.value})` : '100%',
|
||||
transition: 'transform 250ms ease, width 250ms ease'
|
||||
}))
|
||||
|
||||
// Catalog search state
|
||||
const {
|
||||
selectMode,
|
||||
|
||||
Reference in New Issue
Block a user