@@ -12,7 +12,7 @@ import {
12
12
13
13
export default function Header ( ) {
14
14
const [ selectedTheme , setSelectedTheme ] = useState ( StorageUtils . getTheme ( ) ) ;
15
- const { setShowSettings } = useAppContext ( ) ;
15
+ const { serverProps , setShowSettings } = useAppContext ( ) ;
16
16
17
17
const setTheme = ( theme : string ) => {
18
18
StorageUtils . setTheme ( theme ) ;
@@ -28,13 +28,25 @@ export default function Header() {
28
28
} , [ selectedTheme ] ) ;
29
29
30
30
return (
31
- < div className = "flex flex-row items-center pt-6 pb-6 sticky top-0 z-10 bg-base-100" >
31
+ < div className = "flex flex-row items-center pt-2 pb-2 sticky top-0 z-10 bg-base-100 border-b border-base-content/10 " >
32
32
{ /* open sidebar button */ }
33
- < label htmlFor = "toggle-drawer" className = "btn btn-ghost lg:hidden" >
33
+ < label
34
+ htmlFor = "toggle-drawer"
35
+ className = "btn btn-ghost w-8 h-8 p-0 lg:hidden"
36
+ >
34
37
< Bars3Icon className = "h-5 w-5" />
35
38
</ label >
36
39
37
- < div className = "grow text-2xl font-bold ml-2" > llama.cpp</ div >
40
+ { /* model information*/ }
41
+ < div className = "grow ml-2 px-1 sm:px-4 py-0 sm:py-2" >
42
+ < b >
43
+ { serverProps ?. model_alias ||
44
+ serverProps ?. model_path
45
+ ?. split ( / ( \\ | \/ ) / )
46
+ . pop ( )
47
+ ?. replace ( / \. \w + $ / , '' ) }
48
+ </ b >
49
+ </ div >
38
50
39
51
{ /* action buttons (top right) */ }
40
52
< div className = "flex items-center" >
@@ -43,7 +55,7 @@ export default function Header() {
43
55
data-tip = "Settings"
44
56
onClick = { ( ) => setShowSettings ( true ) }
45
57
>
46
- < button className = "btn" aria-hidden = { true } >
58
+ < button className = "btn w-8 h-8 p-0 rounded-full " aria-hidden = { true } >
47
59
{ /* settings button */ }
48
60
< Cog8ToothIcon className = "w-5 h-5" />
49
61
</ button >
@@ -52,7 +64,11 @@ export default function Header() {
52
64
{ /* theme controller is copied from https://daisyui.com/components/theme-controller/ */ }
53
65
< div className = "tooltip tooltip-bottom" data-tip = "Themes" >
54
66
< div className = "dropdown dropdown-end dropdown-bottom" >
55
- < div tabIndex = { 0 } role = "button" className = "btn m-1" >
67
+ < div
68
+ tabIndex = { 0 }
69
+ role = "button"
70
+ className = "btn m-1 w-8 h-8 p-0 rounded-full"
71
+ >
56
72
< MoonIcon className = "w-5 h-5" />
57
73
</ div >
58
74
< ul
0 commit comments