From a1de73906a4275278b15a13a6e25ca5e17b9087b Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Wed, 25 Oct 2023 22:42:03 +0530 Subject: [PATCH] chore: add cookie support flag --- .../hoppscotch-selfhost-desktop/src/main.ts | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/packages/hoppscotch-selfhost-desktop/src/main.ts b/packages/hoppscotch-selfhost-desktop/src/main.ts index 3c43b6a21..398c3ff3f 100644 --- a/packages/hoppscotch-selfhost-desktop/src/main.ts +++ b/packages/hoppscotch-selfhost-desktop/src/main.ts @@ -50,6 +50,7 @@ createHoppApp("#app", { platformFeatureFlags: { exportAsGIST: false, hasTelemetry: false, + cookiesEnabled: true, }, }) @@ -84,27 +85,27 @@ watch( headerPaddingTop.value = "2px" headerPaddingLeft.value = "70px" } -})() -const { pressed } = useMousePressed() + const { pressed } = useMousePressed() -document.addEventListener("mousemove", (ev) => { - const { clientX, clientY } = ev + document.addEventListener("mousemove", (ev) => { + const { clientX, clientY } = ev - const el = document.querySelector("header") + const el = document.querySelector("header") - if (!el) return + if (!el) return - const { left, top, width, height } = el.getBoundingClientRect() + const { left, top, width, height } = el.getBoundingClientRect() - if ( - clientX >= left && - clientX <= left + width && - clientY >= top && - clientY <= top + height - ) { - if (pressed.value) { - appWindow.startDragging() + if ( + clientX >= left && + clientX <= left + width && + clientY >= top && + clientY <= top + height + ) { + if (pressed.value) { + appWindow.startDragging() + } } - } -}) + }) +})()