mirror of
https://github.com/heyman/heynote.git
synced 2025-07-18 06:44:21 +02:00
38 lines
912 B
JavaScript
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()
|