okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
ffb3d9b31
main
1import { sessionTitle } from '../lib/session-title' ; 2import { tr } from '../lib/i18n' ; 3import { useNative } from '../lib/native' ; 4import { modelFamilyIcon } from '../lib/model-icons' ; 5import { TaskTree } from './TaskTree' ; 6/** Quiet navigation, with the same destinations at every window size. */ 7import { useEffect , useId , useLayoutEffect , useRef , useState , type RefObject } from 'react' ; 8import { createPortal } from 'react-dom' ; 9import { FloatingMenu } from '../components/FloatingMenu' ; 10import { measureFrame } from '../lib/overlay-place' ; 11import { QuitStrataDialog } from '../components/QuitStrata' ; 12import { useAppMode } from '../lib/app-mode' ; 13import { href , useLocation , type Route } from '../lib/router' ; 14import { cx , relTime , relTimeShort } from '../lib/format' ; 15import { useMedia } from '../lib/responsive' ; 16import { recentChats , recentChatDescription } from '../lib/recent-chats' ; 17import type { Session } from '../lib/types' ; 18import { MOD , runCommand } from '../lib/commands' ; 19import { bindingFor , bindingKeys , useBindings } from '../lib/shortcut-bindings' ; 20import { Btn , Dialog , Icon , IconBtn , type IconName } from '../components/ui' ; 21import { Brand } from '../components/Brand' ; 22import { addWorkspace , deleteSession , go , isUnread , liveChatIds , pickWorkspace , renameSession , removeWorkspace , renameWorkspace , selectSession , setActiveWorkspace , setNavOpen , togglePin , toggleRail , setTheme , useStore } from '../lib/store' ; 23export function Sidebar ({ containerRef} :{ 24containerRef :RefObject < HTMLElement | null >; 25}) { 26useBindings (); 27const location = useLocation (); 28const compact = useMedia ( '(max-width: 1279px)' ); 29const rail = useStore ( s => s . rail ); 30const theme = useStore ( s => s . theme ); 31const systemDark = useMedia ( '(prefers-color-scheme: dark)' ); 32const dark = theme === 'dark' || theme === 'system' && systemDark ; 33const navOpen = useStore ( s => s . navOpen ); 34const collapsed = compact ?! navOpen :rail ; 35const sessions = useStore ( s => s . sessions ); 36const library = useStore ( s => s . library ); 37const monitor = useStore ( s => s . monitor ); 38const workspaces = useStore ( s => s . workspaces ); 39const activeWorkspace = useStore ( s => s . activeWorkspace ); 40const activeSession = useStore ( s => s . activeSession ); 41// The chats that have a turn running now (the board reads the same list). The count is what makes this redraw when one starts or ends. 42const liveCount = useStore ( s => s . liveChats ); 43const working = new Set ( liveCount ?liveChatIds () :[]); 44const [ query , setQuery ] = useState ( '' ); 45const [ searchOpen , setSearchOpen ] = useState ( false ); 46const searchInput = useRef < HTMLInputElement >( null ); 47const searchTrigger = useRef < HTMLButtonElement >( null ); 48useEffect (() => { 49if ( searchOpen ) 50searchInput . current ?. focus (); 51}, [ searchOpen , collapsed ]); 52function closeSearch () { setQuery ( '' ); setSearchOpen ( false ); requestAnimationFrame (() => searchTrigger . current ?. focus ()); } 53const [ recentOpen , setRecentOpen ] = useState ( false ); 54const [ includeArchived , setIncludeArchived ] = useState ( false ); 55const [ removeWorkspaceId , setRemoveWorkspaceId ] = useState < string | null >( null ); 56const [ menuId , setMenuId ] = useState < string | null >( null ); 57const [ renameId , setRenameId ] = useState < string | null >( null ); 58const [ renameWsId , setRenameWsId ] = useState < string | null >( null ), [ wsName , setWsName ] = useState ( '' ); 59const [ name , setName ] = useState ( '' ); 60const [ deleteId , setDeleteId ] = useState < string | null >( null ); 61const [ folders , setFolders ] = useState < Record < string , boolean >>({}); 62const menuTrigger = useRef < HTMLElement | null >( null ); 63const current = library ?. variants . find ( v => v . id === library . loaded ); 64const native = useNative (), nativeCurrent = native ?. instances . find ( i => i . id === native . defaultId ); 65const modelName = nativeCurrent ?. label ?? ( current ?. local ?current . name :current ?. family ) ?? tr ( 'No model loaded' ); 66// The version from the catalog and the card it runs on ("Q2_0 · GPU 2"), not the file id. 67const nativeSize = nativeCurrent ?native ?. catalog ?. families . flatMap ( f => f . sizes ). find ( s => s . id === nativeCurrent . model ) :undefined ; 68const nativeSecond = nativeCurrent ?[ nativeSize ?. model ?? nativeCurrent . model . toUpperCase (), nativeCurrent . gpus . length ?nativeCurrent . gpus . map ( g => `GPU ${ g + 1 } ` ). join ( ' + ' ) :'' ]. filter ( Boolean ). join ( ' · ' ) :null ; 69const modelQuant = nativeSecond ?? current ?. quant ?? tr ( 'View model versions' ); 70const phase = nativeCurrent ?( nativeCurrent . status === 'ready' ?nativeCurrent . phase :nativeCurrent . status ) :monitor ?. phase ?? 'idle' ; 71const status = phase === 'unavailable' ?'Status unavailable' :phase === 'error' ?'Error' :phase === 'loading' ?'Loading' :! current && ! nativeCurrent ?'No model loaded' :phase === 'reading' ?'Reading prompt' :phase === 'thinking' ?'Thinking' :phase === 'generating' ?'Generating' :'Ready' ; 72// The model is busy with a chat that is not the one in front of the person: the chip says which one (a title, or how many). 73const awayChats = [ ...working ]. filter ( id => ! ( location . route === 'chat' && id === activeSession )); 74const awayTitle = awayChats . length === 1 ?sessions . find ( s => s . id === awayChats [ 0 ]) :undefined ; 75const workingLine = awayChats . length === 1 && awayTitle ?tr ( "Working · {0}" , [ sessionTitle ( awayTitle )]) :awayChats . length > 1 ?tr ( "{0} chats working" , [ awayChats . length ]) :null ; 76const menuSession = sessions . find ( s => s . id === menuId ); 77const q = query . trim (). toLowerCase (); 78const matching = sessions . filter ( s => ( ! s . archived || q || includeArchived ) && ( ! q || ` ${ sessionTitle ( s )} ${ s . messages . map ( m => m . content ). join ( ' ' )} ` . toLowerCase (). includes ( q ))). sort (( a , b ) => Number ( !! b . pinned ) - Number ( !! a . pinned ) || b . updatedAt . localeCompare ( a . updatedAt )); 79function openMenu ( id :string , trigger :HTMLElement ) { menuTrigger . current = trigger ; setMenuId ( id ); } 80function closeMenu () { setMenuId ( null ); menuTrigger . current ?. focus (); } 81return <> 82< aside className = "nav" ref = { containerRef } aria-label = { tr ( "Main navigation" )} aria-modal = { navOpen && compact ?true :undefined } role = { navOpen && compact ?'dialog' :undefined } tabIndex = { - 1 }> 83< div className = "nav__top" >{ tr ( ! collapsed ?< a className = "nav__brand" href = { href ( 'chat' )} aria-label = { tr ( "Strata — open chat" )}>< Brand variant = "lockup" height = { 28 } decorative className = "nav__brand-lockup" /></ a > :null )}< button type = "button" className = "nav__collapse" aria-label = { tr ( collapsed ?'Show sidebar' :'Hide sidebar' )} title = { tr ( collapsed ?'Show sidebar' :'Hide sidebar' )} onClick = {() => compact ?setNavOpen ( ! navOpen ) :toggleRail ()}>< Icon name = "panel" size = { 20 }/></ button ></ div > 84< div className = "nav__scroll" > 85< button className = "st-btn st-btn--primary nav-new" aria-label = { tr ( "New chat" )} title = { tr ( "New chat" )} onClick = {() => runCommand ( 'new' )}>< Icon name = "new-chat" size = { 18 }/>< span className = "nav__rail-hide" >{ tr ( "New chat" )}</ span ></ button > 86< TaskTree collapsed = { collapsed }/> 87{ tr ( collapsed ?< div className = "nav-recent" aria-label = { tr ( "Recent chats" )}>{ tr ( recentChats ( sessions , activeSession ). map (( session , index ) => < RecentChatLink key = { session . id } session = { session } slot = { index + 1 } active = { activeSession === session . id && location . route === 'chat' }/>))}</ div > :null )} 88{ ! collapsed ?< div className = "ws" > 89< div className = "ws__head" >{ tr ( searchOpen ?< div className = "nav-search" >< Icon name = "search" size = { 16 }/>< input ref = { searchInput } className = "st-input st-input--bare" type = "search" placeholder = { tr ( "Search chats…" )} aria-label = { tr ( "Search chats" )} value = { query } onChange = { e => setQuery ( e . target . value )} onKeyDown = { e => { 90if ( e . key === 'Escape' ) { 91e . preventDefault (); 92closeSearch (); 93} 94}}/>< IconBtn name = "x" title = { tr ( "Close chat search" )} onClick = { closeSearch }/></ div > :<>< span className = "navgroup__label" >{ tr ( "Workspaces" )}</ span >< div className = "ws__tools" >< button ref = { searchTrigger } type = "button" className = "st-btn st-btn--icon" aria-label = { tr ( "Search chats" )} title = { tr ( "Search chats" )} onClick = {() => setSearchOpen ( true )}>< Icon name = "search" size = { 18 }/></ button >< IconBtn name = "folder-plus" title = { tr ( "Add a workspace folder" )} onClick = {() => { void pickWorkspace (). then ( path => path ?addWorkspace ( path ) :undefined ); }}/></ div ></>)}</ div > 95{ workspaces . map ( w => { 96const expanded = folders [ w . id ] !== false || !! q ; 97const rows = matching . filter ( s => s . workspace === w . path || !! w . aliases ?. includes ( s . workspace )); 98const shown = q ?rows :rows . slice ( 0 , 20 ); 99return < div className = "ws__group" key = { w . id }> 100< div className = { cx ( 'ws__row' , activeWorkspace === w . id && 'is-active' )}>< button className = "ws__name" aria-expanded = { expanded } onClick = {() => { setActiveWorkspace ( w . id ); setFolders ( f => ({ ...f , [ w . id ] :! expanded })); }}>< Icon name = "chevron" size = { 14 } className = { cx ( 'ws__chev' , expanded && 'is-open' )}/>< Icon name = "folder" size = { 17 }/>< span >{ w . name }</ span ></ button >< IconBtn name = "pencil" title = { tr ( "Rename {0}" , [ w . name ])} onClick = {() => { setWsName ( w . name ); setNavOpen ( false ); setRenameWsId ( w . id ); }}/>{ tr ( w . id !== 'root' ?< IconBtn name = "x" title = { tr ( "Remove {0} from sidebar" , [ w . name ])} onClick = {() => { setNavOpen ( false ); setRemoveWorkspaceId ( w . id ); }}/> :null )}</ div > 101{ tr ( expanded ?< div className = "navsessions" > 102{ tr ( shown . map ( s => < div key = { s . id }> 103< div className = "ws__session row" >< a className = "navsession" href = { href ( 'chat' , s . id )} data-working = { working . has ( s . id ) || undefined } aria-current = { activeSession === s . id && location . route === 'chat' ?'page' :undefined } onClick = {() => selectSession ( s . id )} onContextMenu = { e => { e . preventDefault (); openMenu ( s . id , e . currentTarget ); }} title = { sessionTitle ( s )}>{ tr ( working . has ( s . id ) ?< span className = "navsession__working" role = "img" aria-label = { tr ( "Working" )} title = { tr ( "Working" )}>< svg viewBox = "0 0 16 16" aria-hidden = "true" focusable = "false" >< circle className = "navsession__track" cx = "8" cy = "8" r = "6" />< circle className = "navsession__arc" cx = "8" cy = "8" r = "6" pathLength = "100" /></ svg ></ span > :null )}< span className = "navsession__title" >{ sessionTitle ( s )}</ span >{ tr ( s . pinned ?< span aria-label = { tr ( "Pinned" )}>< Icon name = "pin" size = { 12 }/></ span > :< span className = "navsession__time" >{ relTimeShort ( s . updatedAt )}</ span >)}{ tr ( ! working . has ( s . id ) && isUnread ( s , activeSession ) ?< span className = "navsession__unread" aria-label = { tr ( "Unread" )}/> :null )}{ tr ( s . archived ?< span className = "xs muted" >{ tr ( "Archived" )}</ span > :null )}</ a >< button className = "st-btn st-btn--icon session-overflow" aria-label = { tr ( "Actions for {0}" , [ sessionTitle ( s )])} onClick = { e => openMenu ( s . id , e . currentTarget )}>< Icon name = "ellipsis" size = { 16 }/></ button ></ div > 104</ div >))} 105{ tr ( ! shown . length ?< p className = "small muted ws__empty" >{ tr ( q ?'No matching chats' :'No chats yet' )}</ p > :null )} 106{ tr ( ! q && rows . length > shown . length ?< button className = "ws-view small" onClick = {() => { setNavOpen ( false ); setRecentOpen ( true ); }}>{ tr ( "View all chats" )}</ button > :null )} 107</ div > :null )} 108</ div >; 109})} 110</ div > :null } 111</ div > 112< div className = "nav__foot" > 113< button className = "enginechip" data-state = { status === 'Ready' ?'ready' :[ 'Reading prompt' , 'Thinking' , 'Generating' , 'Loading' ]. includes ( status ) ?'busy' :'off' } onClick = {() => go ( 'models' )} title = { tr ( "{0} \u00B7 {1} \u00B7 {2}" , [ modelName , workingLine ?? modelQuant , tr ( status )])} aria-label = { tr ( "{0} \u00B7 {1}" , [ modelName , modelQuant ])}>< span className = "enginechip__family" >< Icon name = { modelFamilyIcon ( current ?. family )} size = { 20 }/>< span className = "enginechip__dot" /></ span >< span className = "enginechip__text nav__rail-hide" >< span className = "enginechip__title" >{ modelName }</ span >< span className = "enginechip__sub" >{ workingLine ?? modelQuant }</ span ></ span ></ button > 114< NavLink route = "skills" label = { tr ( "Skills" )} icon = "skills" current = { location . route }/> 115< NavLink route = "monitor" label = { tr ( "Monitor" )} icon = "activity" current = { location . route }/> 116< NavLink route = "models" label = { tr ( "Models" )} icon = "models" current = { location . route === 'tuning' ?'models' :location . route }/> 117< div className = "nav__bottom" >< MoreMenu current = { location . route }/>< button className = "st-btn st-btn--icon theme-switch" aria-label = { tr ( dark ?'Switch to light mode' :'Switch to dark mode' )} title = { tr ( dark ?'Switch to light mode' :'Switch to dark mode' )} onClick = {() => setTheme ( dark ?'light' :'dark' )}>< span key = { String ( dark )} className = "theme-switch__icon" >< Icon name = { dark ?'sun' :'moon' } size = { 19 }/></ span ></ button ></ div > 118</ div > 119</ aside > 120{ tr ( menuId && menuSession ?< FloatingMenu anchor = { menuTrigger . current } title = { tr ( "Actions for {0}" , [ sessionTitle ( menuSession )])} onClose = { closeMenu }> 121< button role = "menuitem" className = "menu__item" onClick = {() => { setName ( sessionTitle ( menuSession )); setNavOpen ( false ); setRenameId ( menuId ); setMenuId ( null ); }}>< Icon name = "pencil" />{ tr ( "Rename" )}</ button > 122< button role = "menuitem" className = "menu__item" onClick = {() => { togglePin ( menuId ); closeMenu (); }}>< Icon name = "pin" />{ tr ( menuSession . pinned ?'Unpin' :'Pin' )}</ button > 123< button role = "menuitem" className = "menu__item menu__item--danger" onClick = {() => { setNavOpen ( false ); setDeleteId ( menuId ); setMenuId ( null ); }}>< Icon name = "trash" />{ tr ( "Delete chat" )}</ button > 124</ FloatingMenu > :null )} 125< Dialog open = { !! renameId } compact title = { tr ( "Rename chat" )} onClose = {() => setRenameId ( null )} actions = {<>< Btn onClick = {() => setRenameId ( null )}>{ tr ( "Cancel" )}</ Btn >< Btn variant = "primary" disabled = { ! name . trim ()} onClick = {() => { 126if ( renameId ) 127renameSession ( renameId , name . trim ()); 128setRenameId ( null ); 129}}>{ tr ( "Save name" )}</ Btn ></>}>< label className = "input-field" htmlFor = "chat-name" >< span >{ tr ( "Chat name" )}</ span >< input className = "st-input" id = "chat-name" value = { name } onFocus = { e => e . currentTarget . select ()} onChange = { e => setName ( e . target . value )}/></ label ></ Dialog > 130< Dialog open = { !! renameWsId } compact title = { tr ( "Rename workspace" )} onClose = {() => setRenameWsId ( null )} actions = {<>< Btn onClick = {() => setRenameWsId ( null )}>{ tr ( "Cancel" )}</ Btn >< Btn variant = "primary" disabled = { ! wsName . trim ()} onClick = {() => { 131if ( renameWsId ) 132void renameWorkspace ( renameWsId , wsName . trim ()); 133setRenameWsId ( null ); 134}}>{ tr ( "Save name" )}</ Btn ></>}>< label className = "input-field" htmlFor = "workspace-name" >< span >{ tr ( "Workspace name" )}</ span >< input className = "st-input" id = "workspace-name" value = { wsName } onFocus = { e => e . currentTarget . select ()} onChange = { e => setWsName ( e . target . value )}/></ label >< p className = "small muted" >{ tr ( "Only the name changes. The folder stays where it is." )}</ p ></ Dialog > 135< Dialog open = { !! deleteId } compact title = { tr ( "Delete this chat?" )} onClose = {() => setDeleteId ( null )} actions = {<>< Btn onClick = {() => setDeleteId ( null )}>{ tr ( "Keep chat" )}</ Btn >< Btn variant = "danger" onClick = {() => { 136if ( deleteId ) 137deleteSession ( deleteId ); 138setDeleteId ( null ); 139}}>{ tr ( "Delete chat" )}</ Btn ></>}>< p >{ tr ( "This chat will be permanently deleted." )}</ p ></ Dialog > 140< Dialog open = { !! removeWorkspaceId } title = { tr ( "Remove workspace from sidebar?" )} onClose = {() => setRemoveWorkspaceId ( null )} actions = {<>< Btn onClick = {() => setRemoveWorkspaceId ( null )}>{ tr ( "Keep workspace" )}</ Btn >< Btn onClick = {() => { 141if ( removeWorkspaceId ) 142void removeWorkspace ( removeWorkspaceId ). then (() => setRemoveWorkspaceId ( null )); 143}}>{ tr ( "Remove from sidebar" )}</ Btn ></>}>< p >{ tr ( "Files stay on your computer. Add this folder again to reopen its chats." )}</ p ></ Dialog > 144< Dialog open = { recentOpen } title = { tr ( "All chats" )} onClose = {() => setRecentOpen ( false )}>< div className = "stack" >< label className = "row small" >< input type = "checkbox" checked = { includeArchived } onChange = { e => setIncludeArchived ( e . target . checked )}/>{ tr ( "Include archived chats" )}</ label >< input type = "search" className = "st-input" placeholder = { tr ( "Search chats…" )} aria-label = { tr ( "Search all chats" )} value = { query } onChange = { e => setQuery ( e . target . value )}/>{ tr ( matching . map ( s => < button className = "recent-chat" key = { s . id } onClick = {() => { selectSession ( s . id ); go ( 'chat' , s . id ); setRecentOpen ( false ); }}>< span >{ sessionTitle ( s )}</ span >< span className = "xs muted" >{ tr ( relTime ( s . updatedAt ))}</ span ></ button >))}{ tr ( ! matching . length ?< p className = "small muted" >{ tr ( "No matching chats. Try another search." )}</ p > :null )}</ div ></ Dialog > 145</>; 146} 147function RecentChatLink ({ session, active, slot} :{ 148session :Session ; 149active :boolean ; 150slot :number ; 151}) { 152const binding = bindingFor ( 'chat:slot:' + slot , { key :String ( slot ), mod :true , shift :false , alt :false }); 153const keys = bindingKeys ( binding , MOD ); 154const anchor = useRef < HTMLAnchorElement >( null ); 155const tooltip = useRef < HTMLDivElement >( null ); 156const id = useId (); 157const [ open , setOpen ] = useState ( false ); 158const [ position , setPosition ] = useState ({ left :0 , top :0 }); 159useLayoutEffect (() => { 160if ( ! open ) 161return ; 162const place = () => { 163const rect = anchor . current ?. getBoundingClientRect (); 164if ( ! rect ) 165return ; 166const { scale, viewport} = measureFrame (); 167const height = tooltip . current ?. getBoundingClientRect (). height ?? 80 * scale ; 168setPosition ({ left :( rect . right + 12 ) / scale , top :Math . max ( 12 , Math . min ( rect . top , viewport . height - height - 12 )) / scale }); 169}; 170place (); 171window . addEventListener ( 'resize' , place ); 172window . addEventListener ( 'scroll' , place , true ); 173return () => { window . removeEventListener ( 'resize' , place ); window . removeEventListener ( 'scroll' , place , true ); }; 174}, [ open ]); 175return <> 176< a ref = { anchor } className = "navitem nav-recent__chat" href = { href ( 'chat' , session . id )} aria-label = { sessionTitle ( session )} aria-current = { active ?'page' :undefined } aria-describedby = { open ?id :undefined } onClick = {() => { setOpen ( false ); selectSession ( session . id ); }} onMouseEnter = {() => setOpen ( true )} onMouseLeave = {() => setOpen ( false )} onFocus = {() => setOpen ( true )} onBlur = {() => setOpen ( false )} onKeyDown = { event => { 177if ( event . key === 'Escape' && open ) { 178event . preventDefault (); 179event . stopPropagation (); 180setOpen ( false ); 181} 182}}>< Icon name = "chat" />< span className = "nav-chat-number" aria-hidden = "true" >{ tr ( slot )}</ span ></ a > 183{ open ?createPortal (< div ref = { tooltip } id = { id } role = "tooltip" className = "nav-chat-tooltip" style = { position }>< strong >{ sessionTitle ( session )}</ strong >< span >{ session . messages . length ?recentChatDescription ( session ) :tr ( recentChatDescription ( session ))}</ span >{ tr ( binding ?< kbd className = "nav-chat-shortcut" >{ tr ( keys . join ( " " ))}</ kbd > :null )}</ div >, document . body ) :null } 184</>; 185} 186function NavLink ({ route, label, icon, current, meta} :{ 187route :Route ; 188label :string ; 189icon :IconName ; 190current :string ; 191meta ?:string ; 192}) { 193return < a className = "navitem" href = { href ( route )} aria-current = { current === route ?'page' :undefined } title = { tr ( label )} aria-label = { tr ( label )}>< Icon name = { icon }/>< span className = "navitem__text" >{ tr ( label )}</ span >{ tr ( meta ?< span className = "navitem__meta" >{ tr ( meta )}</ span > :null )}</ a >; 194} 195function MoreMenu ({ current} :{ 196current :string ; 197}) { 198const [ open , setOpen ] = useState ( false ); 199const [ quitOpen , setQuitOpen ] = useState ( false ); 200const appMode = useAppMode (); 201const ref = useRef < HTMLButtonElement >( null ); 202return <>< button ref = { ref } className = "navitem nav__more" title = { tr ( "More — Serving and Settings" )} aria-label = { tr ( "More — Serving and Settings" )} aria-haspopup = "menu" aria-expanded = { open } data-active = {[ 'serving' , 'settings' ]. includes ( current ) || undefined } aria-current = {[ 'serving' , 'settings' ]. includes ( current ) ?'page' :undefined } onClick = {() => setOpen ( v => ! v )}>< Icon name = "ellipsis" />< span className = "navitem__text" >{ tr ( "More" )}</ span ></ button >{ tr ( open ?< FloatingMenu anchor = { ref . current } title = { tr ( "More" )} onClose = {() => { setOpen ( false ); ref . current ?. focus (); }}>{ tr (([{ route :'serving' , label :'Serving' , icon :'link' }, { route :'settings' , label :'Settings' , icon :'settings' }] as const ). map ( d => < a key = { d . route } role = "menuitem" className = "menu__item" href = { href ( d . route )} onClick = {() => setOpen ( false )}>< Icon name = { d . icon }/>{ tr ( d . label )}</ a >))}{ appMode . canQuit ?< button type = "button" role = "menuitem" className = "menu__item" onClick = {() => { setOpen ( false ); setNavOpen ( false ); setQuitOpen ( true ); }}>< Icon name = "x" />{ tr ( "Quit Strata" )}</ button > :null }</ FloatingMenu > :null )}< QuitStrataDialog open = { quitOpen } onClose = {() => setQuitOpen ( false )}/></>; 203}