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 @@ -170,6 +170,12 @@ export class ReplStore implements Store {
170170 if ( ! files [ mainFile ] ) {
171171 mainFile = Object . keys ( files ) [ 0 ]
172172 }
173+
174+ const savedShowFileExplorer = localStorage . getItem ( 'showFileExplorer' )
175+ const showFileExplorer = savedShowFileExplorer !== null
176+ ? savedShowFileExplorer === 'true'
177+ : true
178+
173179 this . state = reactive ( {
174180 mainFile,
175181 files,
@@ -180,7 +186,7 @@ export class ReplStore implements Store {
180186 typescriptVersion : 'latest' ,
181187 typescriptLocale : undefined ,
182188 resetFlip : true ,
183- showFileExplorer : true ,
189+ showFileExplorer,
184190 } )
185191
186192 this . initImportMap ( )
@@ -196,6 +202,13 @@ export class ReplStore implements Store {
196202 )
197203 )
198204
205+ watch (
206+ ( ) => this . state . showFileExplorer ,
207+ ( value ) => {
208+ localStorage . setItem ( 'showFileExplorer' , String ( value ) )
209+ }
210+ )
211+
199212 watch (
200213 ( ) => [
201214 this . state . files [ tsconfigFile ] ?. code ,
You can’t perform that action at this time.
0 commit comments