File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,17 @@ export default function Layout(props: ParentProps) {
120120 } )
121121 const editorRef = { current : undefined as HTMLInputElement | undefined }
122122
123+ const autoselecting = createMemo ( ( ) => {
124+ if ( params . dir ) return false
125+ if ( initialDir ) return false
126+ if ( ! autoselect ( ) ) return false
127+ if ( ! pageReady ( ) ) return true
128+ if ( ! layoutReady ( ) ) return true
129+ const list = layout . projects . list ( )
130+ if ( list . length === 0 ) return false
131+ return true
132+ } )
133+
123134 const editorOpen = ( id : string ) => editor . active === id
124135 const editorValue = ( ) => editor . value
125136
@@ -2194,7 +2205,9 @@ export default function Layout(props: ParentProps) {
21942205 "xl:border-l xl:rounded-tl-sm" : ! layout . sidebar . opened ( ) ,
21952206 } }
21962207 >
2197- { props . children }
2208+ < Show when = { ! autoselecting ( ) } fallback = { < div class = "size-full" /> } >
2209+ { props . children }
2210+ </ Show >
21982211 </ main >
21992212 </ div >
22002213 < Toast . Region />
You can’t perform that action at this time.
0 commit comments