@dopplerhq/universal-import-react
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -153,4 +153,20 @@ import { encryption, utils } from "@dopplerhq/universal-import-core"; | ||
params.set("keyId", keyId); | ||
window.open(`${DOPPLER_DASHBOARD_URL}/import?${params.toString()}`, "_blank", "width=800,height=800"); | ||
openWindow(`${DOPPLER_DASHBOARD_URL}/import?${params.toString()}`, 800, 800); | ||
} | ||
function openWindow(url, windowWidth, windowHeight) { | ||
var _a, _b, _c, _d, _e, _f; | ||
const dualScreenLeft = (_a = window.screenLeft) != null ? _a : window.screenX; | ||
const dualScreenTop = (_b = window.screenTop) != null ? _b : window.screenY; | ||
const width = (_d = (_c = window.innerWidth) != null ? _c : document.documentElement.clientWidth) != null ? _d : screen.width; | ||
const height = (_f = (_e = window.innerHeight) != null ? _e : document.documentElement.clientHeight) != null ? _f : screen.height; | ||
const systemZoom = width / window.screen.availWidth; | ||
const left = (width - windowWidth) / 2 / systemZoom + dualScreenLeft; | ||
const top = (height - windowHeight) / 2 / systemZoom + dualScreenTop; | ||
window.open(url, "_blank", ` | ||
width=${windowWidth / systemZoom}, | ||
height=${windowHeight / systemZoom}, | ||
top=${top}, | ||
left=${left} | ||
`); | ||
} | ||
function DopplerImportButton({ | ||
@@ -157,0 +173,0 @@ secretName, |
{ | ||
"name": "@dopplerhq/universal-import-react", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22492
214