initiation librodrome
This commit is contained in:
16
app/composables/useGrateWizard.ts
Normal file
16
app/composables/useGrateWizard.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
export function useGrateWizard() {
|
||||
const appConfig = useAppConfig()
|
||||
|
||||
function launch() {
|
||||
const { url, popup } = appConfig.gratewizard as { url: string; popup: { width: number; height: number } }
|
||||
const left = Math.round((window.screen.width - popup.width) / 2)
|
||||
const top = Math.round((window.screen.height - popup.height) / 2)
|
||||
window.open(
|
||||
url,
|
||||
'GrateWizard',
|
||||
`width=${popup.width},height=${popup.height},left=${left},top=${top},scrollbars=yes,resizable=yes`,
|
||||
)
|
||||
}
|
||||
|
||||
return { launch }
|
||||
}
|
||||
Reference in New Issue
Block a user