Skip to content

Commit 39c7b73

Browse files
authored
Merge pull request #382 from antalike/fix/assistant
Optimize header display on small screens when AI Assistant is open
2 parents 0e550c6 + ab29628 commit 39c7b73

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

app/components/AppHeader.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function gotoHome() {
3838
:to="homePath"
3939
:ui="{
4040
root: 'border-0 h-(--ui-topbar-height)',
41-
container: 'lg:px-10',
41+
container: 'lg:px-10 @container',
4242
header: 'h-(--ui-topbar-height)'
4343
}"
4444
>
@@ -50,28 +50,28 @@ function gotoHome() {
5050

5151
<UContentSearchButton
5252
v-if="header?.search"
53-
class="cursor-pointer"
53+
class="cursor-pointer w-90 @max-3xl:w-60"
5454
:collapsed="false"
5555
:kbds="[]"
5656
:label="$t('header.searchPlaceholder')"
5757
:ui="{
58-
base: 'w-90 h-10 text-[#94A3B8] rounded-lg ring-slate-600'
58+
base: 'h-10 text-[#94A3B8] rounded-lg ring-slate-600'
5959
}"
6060
/>
6161
<AssistantCollapse class="ml-2.5" />
6262

6363
<template #right>
64-
<LanguageSwitcher />
65-
<JoinCommunityButton />
64+
<LanguageSwitcher class="shrink-0" />
65+
<JoinCommunityButton class="shrink-0 flex @max-2xl:hidden" />
6666
<button
67-
class="hidden sm:flex items-center gap-1.5 h-7 px-2.5 bg-linear-270 from-15% from-linear-primary to-118% to-primary-light rounded-md cursor-pointer"
67+
class="hidden sm:flex items-center gap-1.5 h-7 px-2.5 bg-linear-270 from-15% from-linear-primary to-118% to-primary-light rounded-md cursor-pointer shrink-0 whitespace-nowrap"
6868
@click="gotoHome"
6969
>
7070
<UIcon
7171
name="ri:home-4-line"
7272
class="size-4"
7373
/>
74-
<span class="text-xs font-medium">
74+
<span class="text-xs font-medium flex @max-5xl:hidden">
7575
{{ $t('header.backToHome') }}
7676
</span>
7777
</button>

app/components/Assistant/Collapse.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ function onToggleOpen() {
1919
}"
2020
@click="onToggleOpen"
2121
>
22-
Ask AI
22+
<span class="inline-block @max-3xl:hidden">Ask AI</span>
2323
</UButton>
2424
</template>

0 commit comments

Comments
 (0)