File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,9 @@ const errors = {
109109 hideRetry : true ,
110110 } ,
111111 [ ErrorCode . STORAGE_SPACE ] : {
112- description : 'Your system does not have enough space available to download AGNOS . Your browser may be restricting' +
112+ description : 'Your system does not have enough space available to download the OS images . Your browser may be restricting' +
113113 ' the available space if you are in a private, incognito or guest session.' ,
114+ hideRetry : true ,
114115 } ,
115116 [ ErrorCode . UNRECOGNIZED_DEVICE ] : {
116117 status : 'Unrecognized device' ,
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { fetchStream } from './stream'
1111 * @returns {void }
1212 */
1313
14- const MIN_QUOTA_MB = 5250
14+ const MIN_QUOTA_GB = 5.25
1515
1616export class ImageManager {
1717 /** @type {FileSystemDirectoryHandle } */
@@ -33,9 +33,9 @@ export class ImageManager {
3333 }
3434
3535 const estimate = await navigator . storage . estimate ( )
36- const quotaMB = ( estimate . quota || 0 ) / ( 1024 ** 2 )
37- if ( quotaMB < MIN_QUOTA_MB ) {
38- throw new Error ( `Not enough storage: ${ quotaMB . toFixed ( 0 ) } MB free, need ${ MIN_QUOTA_MB . toFixed ( 0 ) } MB ` )
36+ const quotaGB = ( estimate . quota || 0 ) / ( 1024 ** 3 )
37+ if ( quotaGB < MIN_QUOTA_GB ) {
38+ throw new Error ( `Not enough storage: ${ quotaGB . toFixed ( 1 ) } GB free, need ${ MIN_QUOTA_GB . toFixed ( 1 ) } GB ` )
3939 }
4040 }
4141
You can’t perform that action at this time.
0 commit comments