Добавлена возможность загружать пользовательские обои, пока без синхронизации

This commit is contained in:
Book Pauk
2021-02-10 02:55:47 +07:00
parent 87a068899a
commit ed901fc181
16 changed files with 204 additions and 7 deletions

View File

@@ -0,0 +1,27 @@
import localForage from 'localforage';
//import _ from 'lodash';
const wpStore = localForage.createInstance({
name: 'wallpaperStorage'
});
class WallpaperStorage {
async getLength() {
return await wpStore.length();
}
async setData(key, data) {
await wpStore.setItem(key, data);
}
async getData(key) {
return await wpStore.getItem(key);
}
async removeData(key) {
await wpStore.removeItem(key);
}
}
export default new WallpaperStorage();