feat: v0.1.0
This commit is contained in:
20
public/store.js
Normal file
20
public/store.js
Normal file
@ -0,0 +1,20 @@
|
||||
const Store = require('electron-store');
|
||||
const store = new Store();
|
||||
|
||||
function initStore() {
|
||||
if (!store.has('todo')) {
|
||||
store.set('todo', []);
|
||||
}
|
||||
}
|
||||
|
||||
initStore();
|
||||
|
||||
module.exports = {
|
||||
getTodo() {
|
||||
return store.get('todo');
|
||||
},
|
||||
setTodo(value) {
|
||||
console.log(store.path);
|
||||
return store.set('todo', value);
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user