From bc7b86a242673d7831f6105d000995d9f4d63e09 Mon Sep 17 00:00:00 2001 From: vnugent Date: Sun, 19 Nov 2023 14:50:46 -0500 Subject: hasty not working update to get my workspace clean --- extension/src/entries/contentScript/primary/main.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'extension/src/entries/contentScript/primary/main.js') diff --git a/extension/src/entries/contentScript/primary/main.js b/extension/src/entries/contentScript/primary/main.js index 047d0e9..bbf0932 100644 --- a/extension/src/entries/contentScript/primary/main.js +++ b/extension/src/entries/contentScript/primary/main.js @@ -15,6 +15,8 @@ import { createApp } from "vue"; +import { createPinia } from 'pinia'; +import { useBackgroundPiniaPlugin, identityPlugin, originPlugin } from '../../store' import renderContent from "../renderContent"; import App from "./App.vue"; import Notification from '@kyvg/vue3-notification' @@ -23,12 +25,27 @@ import '@fontsource/noto-sans-masaram-gondi' //We need inline styles to inject into the shadow dom import tw from "~/assets/all.scss?inline"; import localStyle from './style.scss?inline' +import { onLoad } from "../nostr-shim"; +import { defer } from "lodash"; renderContent([], (appRoot, shadowRoot) => { + + //Create the background feature wiring + const bgPlugins = useBackgroundPiniaPlugin('content-script') + //Init store and add plugins + const store = createPinia() + .use(bgPlugins) + .use(identityPlugin) + .use(originPlugin) + createApp(App) + .use(store) .use(Notification) .mount(appRoot); + //Load the nostr shim + defer(onLoad) + //Add tailwind styles just to the shadow dom element const style = document.createElement('style') style.innerHTML = tw.toString() -- cgit