add browser plugin
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const getDefaultConfig = () => {
|
||||
return {
|
||||
activeAdapter: 'supabase',
|
||||
activeAdapter: 'browser',
|
||||
theme: 'dark',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
const USER_DATA_STRING = '__DEFAULT_USER_DATA__'
|
||||
const DB_NAME = 'takerofnotes'
|
||||
const DB_VERSION = 1
|
||||
const STORE_NAME = 'config'
|
||||
|
||||
@@ -28,10 +28,8 @@ const initPluginManager = (runtime, plugins, config) => {
|
||||
}
|
||||
|
||||
const manager = createPluginManager(registry)
|
||||
manager.setActivePlugin(
|
||||
config.activeAdapter,
|
||||
config.adapters[config.activeAdapter],
|
||||
)
|
||||
const activeConfig = config.adapters?.[config.activeAdapter] || {}
|
||||
manager.setActivePlugin(config.activeAdapter, activeConfig)
|
||||
|
||||
return manager
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { useEnvironment } from '@/composables/useEnvironment'
|
||||
import { initializeCore } from '@core/index.js'
|
||||
import supabasePlugin from '@takerofnotes/plugin-supabase'
|
||||
import browserPlugin from '@takerofnotes/plugin-browser'
|
||||
|
||||
export const initCore = async (app) => {
|
||||
const environment = useEnvironment()
|
||||
@@ -9,7 +10,7 @@ export const initCore = async (app) => {
|
||||
const runtime = environment === 'electron' ? 'electron-renderer' : 'web'
|
||||
|
||||
// Plugins that are valid for web (electron uses IPC)
|
||||
const plugins = [supabasePlugin]
|
||||
const plugins = [supabasePlugin, browserPlugin]
|
||||
|
||||
const core = await initializeCore(runtime, {
|
||||
plugins,
|
||||
|
||||
Reference in New Issue
Block a user