|
|
@ -9,12 +9,10 @@ const profile = { |
|
|
|
|
|
|
|
|
|
|
|
export class StoragePlugin extends Plugin { |
|
|
|
export class StoragePlugin extends Plugin { |
|
|
|
constructor() { |
|
|
|
constructor() { |
|
|
|
console.log('storage plugin') |
|
|
|
|
|
|
|
super(profile); |
|
|
|
super(profile); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async getStorage() { |
|
|
|
async getStorage() { |
|
|
|
console.log('getStorage') |
|
|
|
|
|
|
|
if ('storage' in navigator && 'estimate' in navigator.storage) { |
|
|
|
if ('storage' in navigator && 'estimate' in navigator.storage) { |
|
|
|
return navigator.storage.estimate() |
|
|
|
return navigator.storage.estimate() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|