All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
- Page décision : icône gavel pour le titre, scroll-text pour Documents de référence - GrateWizard : ouverture en mode embed (?embed=true&hideTabBar=true) avec scrollbars=no pour supprimer le double scroll Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
21 lines
710 B
TypeScript
21 lines
710 B
TypeScript
export function useGrateWizard() {
|
|
const appConfig = useAppConfig()
|
|
const { url, popup } = appConfig.gratewizard as { url: string; popup: { width: number; height: number } }
|
|
|
|
function launch(e?: Event) {
|
|
const w = popup.width
|
|
const h = popup.height
|
|
const left = Math.round((window.screen.width - w) / 2)
|
|
const top = Math.round((window.screen.height - h) / 2)
|
|
const embedUrl = `${url}?embed=true&hideTabBar=true&tab=mn`
|
|
const win = window.open(
|
|
embedUrl,
|
|
'grateWizard',
|
|
`width=${w},height=${h},left=${left},top=${top},menubar=no,toolbar=no,location=no,status=no,scrollbars=no,resizable=yes`,
|
|
)
|
|
if (win) e?.preventDefault()
|
|
}
|
|
|
|
return { url, launch }
|
|
}
|