total restructure: isolate functionality to core so web works

This commit is contained in:
nicwands
2026-03-19 17:25:43 -04:00
parent f9e7fe1208
commit eea1cccf16
20 changed files with 635 additions and 247 deletions

25
src/core/IpcAdapter.js Normal file
View File

@@ -0,0 +1,25 @@
export default class IpcAdapter {
constructor() {
this._methods = ['init', 'getAll', 'create', 'update', 'delete']
}
async init() {
return await window.adapter.call('init')
}
async getAll() {
return await window.adapter.call('getAll')
}
async create(note) {
return await window.adapter.call('create', note)
}
async update(note) {
return await window.adapter.call('update', note)
}
async delete(id) {
return await window.adapter.call('delete', id)
}
}