You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
743 B
JavaScript
19 lines
743 B
JavaScript
const runtimeUrl = new URL('/cloud/runtime.js', location.origin);
|
|
const assetVersion = new URL(import.meta.url).searchParams.get('v');
|
|
if (assetVersion) runtimeUrl.searchParams.set('v', assetVersion);
|
|
const {
|
|
bindPageCleanup, buy, byId, initializeSession, openCreate,
|
|
readBootstrap, showError,
|
|
} = await import(runtimeUrl.href);
|
|
const i18n = globalThis.VenixUserCopy;
|
|
|
|
export async function initialize() {
|
|
try {
|
|
const bootstrap = readBootstrap('deploy-bootstrap');
|
|
if (!await initializeSession('create', bootstrap?.user)) return;
|
|
bindPageCleanup();
|
|
byId('create-form')?.addEventListener('submit', buy);
|
|
await openCreate(bootstrap);
|
|
} catch { showError('cloud-page-error', i18n.text('deploy.error.initialize')); }
|
|
}
|