File tree Expand file tree Collapse file tree 12 files changed +49
-31
lines changed Expand file tree Collapse file tree 12 files changed +49
-31
lines changed Original file line number Diff line number Diff line change @@ -153,13 +153,15 @@ export default function SidebarWrapper<T extends object>({
153
153
/>
154
154
155
155
< div
156
- className = { `mt-4 w-full ${ size == "lg" ? "max-w-4xl" : "max-w-3xl" } mx-auto` }
156
+ className = { `mt-4 w-full ${
157
+ size == "lg" ? "max-w-4xl" : "max-w-3xl"
158
+ } mx-auto`}
157
159
>
158
160
{ children }
159
161
</ div >
160
162
</ div >
161
163
</ div >
162
- < FixedLogo />
164
+ < FixedLogo backgroundToggled = { toggledSidebar || showDocSidebar } />
163
165
</ div >
164
166
) ;
165
167
}
Original file line number Diff line number Diff line change @@ -2512,7 +2512,7 @@ export function ChatPage({
2512
2512
) }
2513
2513
</ div >
2514
2514
</ div >
2515
- < FixedLogo chat />
2515
+ < FixedLogo backgroundToggled = { toggledSidebar || showDocSidebar } />
2516
2516
</ div >
2517
2517
</ div >
2518
2518
< DocumentSidebar
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export function ChatSessionDisplay({
122
122
) ;
123
123
} }
124
124
>
125
- < BasicSelectable chat padding = "extra" fullWidth selected = { isSelected } >
125
+ < BasicSelectable padding = "extra" fullWidth selected = { isSelected } >
126
126
< >
127
127
< div className = "flex relative" >
128
128
{ isRenamingChat ? (
@@ -144,8 +144,8 @@ export function ChatSessionDisplay({
144
144
className = { `absolute right-0 top-0 h-full w-8 bg-gradient-to-r from-transparent
145
145
${
146
146
isSelected
147
- ? "to-background-chat-hover "
148
- : " to-background-chat-selected group-hover:to-background-chat-hover"
147
+ ? "to-background-chat-selected "
148
+ : "group-hover:to-background-chat-hover"
149
149
} `}
150
150
/>
151
151
</ p >
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ function BackToDanswerButton() {
27
27
Back to { enterpriseSettings ?. application_name || "Danswer Chat" }
28
28
</ Button >
29
29
</ div >
30
- pr
31
30
</ div >
32
31
) ;
33
32
}
Original file line number Diff line number Diff line change @@ -8,7 +8,12 @@ import Link from "next/link";
8
8
import { useContext } from "react" ;
9
9
import { FiSidebar } from "react-icons/fi" ;
10
10
11
- export default function FixedLogo ( { chat } : { chat ?: boolean } ) {
11
+ export default function FixedLogo ( {
12
+ // Whether the sidebar is toggled or not
13
+ backgroundToggled,
14
+ } : {
15
+ backgroundToggled ?: boolean ;
16
+ } ) {
12
17
const combinedSettings = useContext ( SettingsContext ) ;
13
18
const settings = combinedSettings ?. settings ;
14
19
const enterpriseSettings = combinedSettings ?. enterpriseSettings ;
@@ -28,15 +33,17 @@ export default function FixedLogo({ chat }: { chat?: boolean }) {
28
33
< div className = "w-full" >
29
34
{ enterpriseSettings && enterpriseSettings . application_name ? (
30
35
< div >
31
- < HeaderTitle chat = { chat } >
36
+ < HeaderTitle backgroundToggled = { backgroundToggled } >
32
37
{ enterpriseSettings . application_name }
33
38
</ HeaderTitle >
34
39
{ ! NEXT_PUBLIC_DO_NOT_USE_TOGGLE_OFF_DANSWER_POWERED && (
35
40
< p className = "text-xs text-subtle" > Powered by Danswer</ p >
36
41
) }
37
42
</ div >
38
43
) : (
39
- < HeaderTitle chat = { chat } > Danswer</ HeaderTitle >
44
+ < HeaderTitle backgroundToggled = { backgroundToggled } >
45
+ Danswer
46
+ </ HeaderTitle >
40
47
) }
41
48
</ div >
42
49
</ div >
Original file line number Diff line number Diff line change @@ -81,14 +81,12 @@ export function BasicSelectable({
81
81
children,
82
82
selected,
83
83
hasBorder,
84
- chat,
85
84
fullWidth = false ,
86
85
padding = "normal" ,
87
86
} : {
88
87
children : string | JSX . Element ;
89
88
selected : boolean ;
90
89
hasBorder ?: boolean ;
91
- chat ?: boolean ;
92
90
fullWidth ?: boolean ;
93
91
padding ?: "none" | "normal" | "extra" ;
94
92
} ) {
@@ -104,12 +102,8 @@ export function BasicSelectable({
104
102
${ hasBorder ? "border border-border" : "" }
105
103
${
106
104
selected
107
- ? chat
108
- ? "bg-background-chat-selected"
109
- : "bg-hover"
110
- : chat
111
- ? "bg-background-chat-hover"
112
- : "hover:bg-hover"
105
+ ? "bg-background-chat-selected"
106
+ : "hover:bg-background-chat-hover"
113
107
}
114
108
${ fullWidth ? "w-full" : "" } ` }
115
109
>
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ export function ClientLayout({
58
58
return (
59
59
< div className = "h-screen overflow-y-hidden" >
60
60
< div className = "flex h-full" >
61
- < div className = "flex-none text-text-settings-sidebar bg-background-settings- sidebar w-[250px] z-20 pt-4 pb-8 h-full border-r border-border miniscroll overflow-auto" >
61
+ < div className = "flex-none text-text-settings-sidebar bg-background-sidebar w-[250px] z-20 pt-4 pb-8 h-full border-r border-border miniscroll overflow-auto" >
62
62
< AdminSidebar
63
63
collections = { [
64
64
{
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export function AdminSidebar({ collections }: { collections: Collection[] }) {
55
55
< div className = "flex-grow min-w-0 my-auto" >
56
56
{ enterpriseSettings && enterpriseSettings . application_name ? (
57
57
< div className = "w-full" >
58
- < HeaderTitle >
58
+ < HeaderTitle backgroundToggled = { true } >
59
59
{ enterpriseSettings . application_name }
60
60
</ HeaderTitle >
61
61
{ ! NEXT_PUBLIC_DO_NOT_USE_TOGGLE_OFF_DANSWER_POWERED && (
@@ -65,7 +65,7 @@ export function AdminSidebar({ collections }: { collections: Collection[] }) {
65
65
) }
66
66
</ div >
67
67
) : (
68
- < HeaderTitle > Danswer</ HeaderTitle >
68
+ < HeaderTitle backgroundToggled = { true } > Danswer</ HeaderTitle >
69
69
) }
70
70
</ div >
71
71
</ div >
@@ -74,7 +74,7 @@ export function AdminSidebar({ collections }: { collections: Collection[] }) {
74
74
</ div >
75
75
< div className = "flex w-full justify-center" >
76
76
< Link href = { "/chat" } >
77
- < button className = "text-sm flex items-center block w-52 py-2.5 flex px-2 text-left bg-background-200 hover:bg-background-200/ 80 cursor-pointer rounded" >
77
+ < button className = "text-sm flex items-center block w-52 py-2.5 flex px-2 text-left text-text-back-button bg-background-back-button hover:bg-opacity- 80 cursor-pointer rounded" >
78
78
< BackIcon className = "my-auto" size = { 18 } />
79
79
< p className = "ml-1 break-words line-clamp-2 ellipsis leading-none" >
80
80
Back to{ " " }
Original file line number Diff line number Diff line change @@ -4,18 +4,20 @@ import React from "react";
4
4
5
5
export function HeaderTitle ( {
6
6
children,
7
- chat ,
7
+ backgroundToggled ,
8
8
} : {
9
9
children : JSX . Element | string ;
10
- chat ?: boolean ;
10
+ backgroundToggled ?: boolean ;
11
11
} ) {
12
12
const isString = typeof children === "string" ;
13
13
const textSize = isString && children . length > 10 ? "text-xl" : "text-2xl" ;
14
14
15
15
return (
16
16
< h1
17
17
className = { `${ textSize } ${
18
- chat ? "text-text-sidebar-header" : "text-text-header"
18
+ backgroundToggled
19
+ ? "text-text-sidebar-toggled-header"
20
+ : "text-text-sidebar-header"
19
21
} break-words line-clamp-2 ellipsis text-strong leading-none font-bold`}
20
22
>
21
23
{ children }
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ export default function LogoType({
37
37
38
38
return (
39
39
< div
40
- className = { `${ hideOnMobile && "mobile:hidden" } z-[100] mb-auto shrink-0 flex items-center text-xl font-bold` }
40
+ className = { `${
41
+ hideOnMobile && "mobile:hidden"
42
+ } z-[100] mb-auto shrink-0 flex items-center text-xl font-bold`}
41
43
>
42
44
{ toggleSidebar && page == "chat" ? (
43
45
< button
@@ -55,7 +57,9 @@ export default function LogoType({
55
57
</ div >
56
58
) }
57
59
< div
58
- className = { `cursor-pointer ${ showArrow ? "desktop:invisible" : "invisible" } break-words inline-block w-fit ml-2 text-text-700 text-xl` }
60
+ className = { `cursor-pointer ${
61
+ showArrow ? "desktop:invisible" : "invisible"
62
+ } break-words inline-block w-fit ml-2 text-text-700 text-xl`}
59
63
>
60
64
< div className = "max-w-[175px]" >
61
65
{ enterpriseSettings && enterpriseSettings . application_name ? (
@@ -111,9 +115,9 @@ export default function LogoType({
111
115
} }
112
116
>
113
117
{ ! toggled && ! combinedSettings ?. isMobile ? (
114
- < RightToLineIcon />
118
+ < RightToLineIcon className = "text-sidebar-toggle" />
115
119
) : (
116
- < LeftToLineIcon />
120
+ < LeftToLineIcon className = "text-sidebar-toggle" />
117
121
) }
118
122
</ button >
119
123
</ Tooltip >
You can’t perform that action at this time.
0 commit comments