Files
heynote/src/main.js
Jonatan Heyman 7e1f01471a Implement support for editing notes' metadata, and ability to move notes into other directories.
Create separate pinia store for the editor cache functionality.
2024-12-09 12:37:05 +01:00

38 lines
912 B
JavaScript

import './css/application.sass'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './components/App.vue'
import { loadCurrencies } from './currency'
import { useErrorStore } from './stores/error-store'
import { useNotesStore, initNotesStore } from './stores/notes-store'
import { useEditorCacheStore } from './stores/editor-cache'
const pinia = createPinia()
const app = createApp(App)
app.use(pinia)
app.mount('#app').$nextTick(() => {
// hide loading screen
postMessage({ payload: 'removeLoading' }, '*')
})
const errorStore = useErrorStore()
const editorCacheStore = useEditorCacheStore()
//errorStore.addError("test error")
window.heynote.getInitErrors().then((errors) => {
errors.forEach((e) => errorStore.addError(e))
})
initNotesStore()
// load math.js currencies
loadCurrencies()
setInterval(loadCurrencies, 1000 * 3600 * 4)
window.heynote.init()