File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11491149 >
11501150 <div class =" p-4 border-b border-edge" >
11511151 <div class =" flex items-center justify-between" >
1152- <div class =" flex items-center gap-1 min-w-0" >
1153- <h1 class ="text-base font-semibold truncate" >{config .name ?? " Dashboard" }</h1 >
1154- <ProjectSwitcher current ={activePrefix } />
1152+ <div class =" flex items-center min-w-0" >
1153+ <ProjectSwitcher current ={activePrefix } label ={config .name ?? " Dashboard" } />
11551154 </div >
11561155 <div class =" flex items-center gap-2" >
11571156 <button
Original file line number Diff line number Diff line change 44 import { projectInitPhaseLabel } from " ./utils" ;
55 import type { ProjectInitPhase , ProjectSummary } from " ./types" ;
66
7- let { current }: { current: string } = $props ();
7+ let { current, label }: { current: string ; label : string } = $props ();
88
99 let projects = $state <ProjectSummary []>([]);
1010 let open = $state (false );
103103
104104<svelte:window onclick ={handleDocumentClick } onkeydown ={handleKeydown } onresize ={() => open && positionMenu ()} onscroll ={() => open && positionMenu ()} />
105105
106- <button
107- bind:this ={triggerEl }
108- type =" button"
109- class =" shrink-0 h-6 w-6 inline-flex items-center justify-center rounded-md text-muted hover:bg-hover hover:text-primary"
110- title =" Switch project"
111- aria-haspopup =" menu"
112- aria-expanded ={open }
113- onclick ={toggle }
114- >
115- <svg viewBox =" 0 0 12 12" width =" 10" height =" 10" aria-hidden =" true" >
116- <path d =" M2 4 L6 8 L10 4" fill =" none" stroke =" currentColor" stroke-width =" 1.5" stroke-linecap =" round" stroke-linejoin =" round" />
117- </svg >
118- </button >
106+ <h1 class =" min-w-0" >
107+ <button
108+ bind:this ={triggerEl }
109+ type =" button"
110+ class =" max-w-full min-w-0 h-7 px-1.5 -ml-1.5 inline-flex items-center gap-1 rounded-md hover:bg-hover"
111+ title =" Switch project"
112+ aria-haspopup =" menu"
113+ aria-expanded ={open }
114+ onclick ={toggle }
115+ >
116+ <span class ="text-base font-semibold text-primary truncate" >{label }</span >
117+ <svg viewBox =" 0 0 12 12" width =" 10" height =" 10" aria-hidden =" true" class =" shrink-0 text-muted" >
118+ <path d =" M2 4 L6 8 L10 4" fill =" none" stroke =" currentColor" stroke-width =" 1.5" stroke-linecap =" round" stroke-linejoin =" round" />
119+ </svg >
120+ </button >
121+ </h1 >
119122
120123{#if open }
121124 <div
You can’t perform that action at this time.
0 commit comments