Move AI button to logo and add left chat sidebar
Some checks failed
Build Docker Image / build (push) Failing after 1m50s

This commit is contained in:
Ruslan Bakiev
2026-02-07 16:57:05 +07:00
parent 8ff44c42bc
commit bef34eeaa5
3 changed files with 202 additions and 18 deletions

View File

@@ -11,12 +11,24 @@
:class="isHeroLayout ? 'items-start pt-4' : 'items-center'"
:style="rowStyle"
>
<!-- Left: Logo + Nav links (top aligned) -->
<!-- Left: Logo + AI button + Nav links (top aligned) -->
<div class="flex items-center flex-shrink-0 rounded-full glass-bright">
<div class="flex items-center gap-2 px-4 py-2">
<NuxtLink :to="localePath('/')" class="flex items-center gap-2">
<span class="font-bold text-xl" :class="useWhiteText ? 'text-white' : 'text-base-content'">Optovia</span>
</NuxtLink>
<button
class="w-8 h-8 rounded-full flex items-center justify-center transition-colors"
:class="[
useWhiteText
? (chatOpen ? 'bg-white/20 text-white' : 'text-white/70 hover:text-white hover:bg-white/10')
: (chatOpen ? 'bg-base-300 text-base-content' : 'text-base-content/70 hover:text-base-content hover:bg-base-200')
]"
aria-label="Toggle AI assistant"
@click="$emit('toggle-chat')"
>
<Icon name="lucide:bot" size="18" />
</button>
</div>
<!-- Service nav links -->
@@ -226,18 +238,9 @@
</template>
</div>
<!-- Right: AI + Globe + Team + User (top aligned like logo) -->
<!-- Right: Globe + Team + User (top aligned like logo) -->
<div class="flex items-center flex-shrink-0 rounded-full glass-bright">
<div class="flex items-center px-2 py-2">
<!-- AI Assistant button -->
<NuxtLink
:to="localePath('/clientarea/ai')"
class="w-8 h-8 rounded-full flex items-center justify-center transition-colors"
:class="useWhiteText ? 'text-white/70 hover:text-white hover:bg-white/10' : 'text-base-content/70 hover:text-base-content hover:bg-base-200'"
>
<Icon name="lucide:bot" size="18" />
</NuxtLink>
</div>
<div class="w-px h-6 bg-white/20 self-center" />
<div class="flex items-center px-2 py-2">
@@ -413,6 +416,8 @@ const props = withDefaults(defineProps<{
isHomePage?: boolean
// Client area flag - shows cabinet tabs instead of search
isClientArea?: boolean
// AI chat sidebar state
chatOpen?: boolean
// Dynamic height for hero effect
height?: number
// Collapse progress for hero layout
@@ -423,6 +428,7 @@ const props = withDefaults(defineProps<{
})
defineEmits([
'toggle-chat',
'toggle-theme',
'sign-out',
'sign-in',
@@ -445,6 +451,7 @@ const route = useRoute()
const { locale, locales } = useI18n()
const switchLocalePath = useSwitchLocalePath()
const { t } = useI18n()
const { chatOpen } = toRefs(props)
// Check if client area tab is active
const isClientAreaTabActive = (path: string) => {