@@ -22,6 +22,7 @@ import Button from './Button'
2222import Screen from './Screen'
2323import styles from './PauseScreen.module.css'
2424import { DiscordButton } from './DiscordButton'
25+ import { showNotification } from './NotificationProvider'
2526
2627export const saveToBrowserMemory = async ( ) => {
2728 setLoadingScreenStatus ( 'Saving world' )
@@ -33,10 +34,12 @@ export const saveToBrowserMemory = async () => {
3334 const allRootPaths = [ ...usedServerPathsV1 ]
3435 const allFilesToCopy = [ ] as string [ ]
3536 for ( const dirBase of allRootPaths ) {
37+ // eslint-disable-next-line no-await-in-loop
3638 if ( dirBase . includes ( '.' ) && await fileExistsAsyncOptimized ( join ( worldFolder , dirBase ) ) ) {
3739 allFilesToCopy . push ( dirBase )
3840 continue
3941 }
42+ // eslint-disable-next-line no-await-in-loop
4043 let res = await collectFilesToCopy ( join ( worldFolder , dirBase ) , true )
4144 if ( dirBase === 'region' ) {
4245 res = res . filter ( x => x . endsWith ( '.mca' ) )
@@ -133,7 +136,10 @@ export default () => {
133136 }
134137 const action = await showOptionsModal ( 'World actions...' , [ 'Save to browser memory' ] )
135138 if ( action === 'Save to browser memory' ) {
136- await saveToBrowserMemory ( )
139+ const path = await saveToBrowserMemory ( )
140+ if ( ! path ) return
141+ const saveName = path . split ( '/' ) . at ( - 1 )
142+ showNotification ( `World saved to ${ saveName } ` , 'Load it to keep your progress!' )
137143 // fsState.inMemorySave = true
138144 // fsState.syncFs = false
139145 // fsState.isReadonly = false
0 commit comments