diff --git a/client/package.json b/client/package.json index f5e5363e9c1a..26e9959cb5ea 100644 --- a/client/package.json +++ b/client/package.json @@ -133,7 +133,6 @@ "vue-virtual-scroll-list": "^2.3.5", "vue2-teleport": "^1.0.1", "vuedraggable": "^2.24.3", - "winbox": "^0.2.82", "xml-beautifier": "^0.5.0", "yaml": "^2.6.1" }, diff --git a/client/pnpm-lock.yaml b/client/pnpm-lock.yaml index 41ef10794717..4059860d64b3 100644 --- a/client/pnpm-lock.yaml +++ b/client/pnpm-lock.yaml @@ -322,9 +322,6 @@ importers: vuedraggable: specifier: ^2.24.3 version: 2.24.3 - winbox: - specifier: ^0.2.82 - version: 0.2.82 xml-beautifier: specifier: ^0.5.0 version: 0.5.0 @@ -4523,9 +4520,6 @@ packages: engines: {node: '>=8'} hasBin: true - winbox@0.2.82: - resolution: {integrity: sha512-fMHaLnnuhyw1mLvzmCTWMpRKDfXUK/Z08VdbyBqDaITFFAd3Fx2BGDCF6rzGSkWrQgo8fHTFpFICofyM36FTnA==} - wrap-ansi@6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -9001,8 +8995,6 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - winbox@0.2.82: {} - wrap-ansi@6.2.0: dependencies: ansi-styles: 4.3.0 diff --git a/client/src/components/ChatGXY.vue b/client/src/components/ChatGXY.vue index 4bf5ed430a62..19fc0ad06ee4 100644 --- a/client/src/components/ChatGXY.vue +++ b/client/src/components/ChatGXY.vue @@ -320,7 +320,7 @@ async function deleteCurrentChat() { } } -function popOutToScratchbook() { +function popOutToWindowManager() { const Galaxy = getGalaxyInstance(); const path = currentChatId.value ? `/chatgxy/${currentChatId.value}` : "/chatgxy"; const url = `${path}?compact=true`; @@ -349,7 +349,7 @@ function popOutToScratchbook() { diff --git a/client/src/components/Masthead/Masthead.test.js b/client/src/components/Masthead/Masthead.test.js index 4052d1a0fa41..807e0ee516ec 100644 --- a/client/src/components/Masthead/Masthead.test.js +++ b/client/src/components/Masthead/Masthead.test.js @@ -1,3 +1,4 @@ +import { faTh } from "@fortawesome/free-solid-svg-icons"; import { createTestingPinia } from "@pinia/testing"; import { getFakeRegisteredUser } from "@tests/test-data"; import { getLocalVue } from "@tests/vitest/helpers"; @@ -7,7 +8,6 @@ import flushPromises from "flush-promises"; import { PiniaVuePlugin } from "pinia"; import { beforeEach, describe, expect, it, vi } from "vitest"; -import { WindowManager } from "@/entry/analysis/window-manager"; import { useUserStore } from "@/stores/userStore"; import { loadMastheadWebhooks } from "./_webhooks"; @@ -28,7 +28,7 @@ setupMockConfig({}); describe("Masthead.vue", () => { let wrapper; let localVue; - let windowManager; + let windowTab; let testPinia; function stubLoadWebhooks(items) { @@ -46,8 +46,16 @@ describe("Masthead.vue", () => { localVue.use(PiniaVuePlugin); testPinia = createTestingPinia({ createSpy: vi.fn }); - windowManager = new WindowManager({}); - const windowTab = windowManager.getTab(); + windowTab = { + id: "enable-window-manager", + icon: faTh, + tooltip: "Enable/Disable Window Manager", + visible: true, + _active: false, + onclick: function () { + this._active = !this._active; + }, + }; const userStore = useUserStore(); userStore.currentUser = currentUser; @@ -71,9 +79,9 @@ describe("Masthead.vue", () => { it("should display window manager button", async () => { expect(wrapper.find("#enable-window-manager a svg").exists()).toBe(true); - expect(windowManager.active).toBe(false); + expect(windowTab._active).toBe(false); await wrapper.find("#enable-window-manager a").trigger("click"); - expect(windowManager.active).toBe(true); + expect(windowTab._active).toBe(true); }); it("should load webhooks on creation", async () => { diff --git a/client/src/components/WindowManager/WindowManagerWindow.vue b/client/src/components/WindowManager/WindowManagerWindow.vue new file mode 100644 index 000000000000..714e67f16e9c --- /dev/null +++ b/client/src/components/WindowManager/WindowManagerWindow.vue @@ -0,0 +1,307 @@ + + +