Mount vue app after comfy app init (#167)

* Mount vue app after comfy app

* Emit event when vue app loaded

* Dispatch event to window

* Fix test timeout

* Try observe variable

* Revert

* Update test expectations [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2024-07-19 18:47:53 -04:00
committed by GitHub
parent 396e0c9525
commit a2afdd74b2
25 changed files with 24 additions and 21 deletions

View File

@@ -7,22 +7,23 @@ import App from "./App.vue";
import { app as comfyApp } from "@/scripts/app";
const app = createApp(App);
app
.use(PrimeVue, {
theme: {
preset: Aura,
options: {
prefix: "p",
cssLayer: false,
// This is a workaround for the issue with the dark mode selector
// https://github.com/primefaces/primevue/issues/5515
darkModeSelector: ".dark-theme, :root:has(.dark-theme)",
},
},
})
.mount("#vue-app");
comfyApp.setup().then(() => {
window["app"] = comfyApp;
window["graph"] = comfyApp.graph;
app
.use(PrimeVue, {
theme: {
preset: Aura,
options: {
prefix: "p",
cssLayer: false,
// This is a workaround for the issue with the dark mode selector
// https://github.com/primefaces/primevue/issues/5515
darkModeSelector: ".dark-theme, :root:has(.dark-theme)",
},
},
})
.mount("#vue-app");
});