|
1 | 1 | {{ define "main" }} |
2 | | - <div class="container space-y-6 py-12" x-data="{cfg: HubSetup.defaultConfig(), deploymentType: '', output: ''}" x-init="output = HubSetup.generateOutput(cfg); $watch('cfg', _ => output = HubSetup.generateOutput(cfg))"> |
| 2 | + <div class="container space-y-6 py-12" x-data="{cfg: HubSetup.defaultConfig(), deploymentType: '', output: '', trialData: {hubId: null, licenseKey: null, captcha: null, captchaState: null, inProgress: false, errorMessage: null}, hubTrial: null}" x-init="output = HubSetup.generateOutput(cfg, trialData); hubTrial = new HubTrial(trialData); $watch('trialData.captcha', _ => hubTrial.getTrialLicense()); $watch('trialData', () => output = HubSetup.generateOutput(cfg, trialData)); $watch('cfg', () => output = HubSetup.generateOutput(cfg, trialData))"> |
3 | 3 | <header class="mb-6"> |
4 | 4 | <h1 class="font-h1 mb-8">{{ .Title }}</h1> |
5 | 5 | <p class="lead mb-8">{{ i18n "hub_setup_description" . }}</p> |
@@ -284,6 +284,8 @@ <h2 class="text-lg font-medium leading-6 text-gray-900"> |
284 | 284 | <p class="mt-1 text-sm text-gray-500"> |
285 | 285 | {{ i18n "hub_setup_output_header_description" . }} |
286 | 286 | </p> |
| 287 | + {{ $challengeUrl := printf "%s/licenses/hub/challenge" .Site.Params.apiBaseUrl }} |
| 288 | + {{ partial "captcha.html" (dict "challengeUrl" $challengeUrl "captchaPayload" "trialData.captcha" "captchaState" "trialData.captchaState" "auto" "onload") }} |
287 | 289 | </header> |
288 | 290 | <div class="mt-5 md:mt-0 md:col-span-2 grid grid-cols-6 gap-6"> |
289 | 291 | <div class="col-span-6" x-show="deploymentType == 'kubernetes'"> |
@@ -319,10 +321,22 @@ <h2 class="font-h2 mb-4">{{ i18n "hub_setup_contact_us_title" . }}</h2> |
319 | 321 | {{ $jsYaml := resources.Get "js/js-yaml/js-yaml.min.js" | fingerprint }} |
320 | 322 | <script type="text/javascript" src="{{ $jsYaml.RelPermalink }}" integrity="{{ $jsYaml.Data.Integrity }}"></script> |
321 | 323 | {{ if hugo.IsDevelopment }} |
| 324 | + {{ $hubSubscriptionJs := resources.Get "js/hubsubscription.js" }} |
| 325 | + <script type="text/javascript" src="{{ $hubSubscriptionJs.RelPermalink }}" defer></script> |
322 | 326 | {{ $setupJs := resources.Get "js/hubsetup.js" }} |
323 | 327 | <script type="text/javascript" src="{{ $setupJs.RelPermalink }}" defer></script> |
| 328 | + {{ $altchaJs := resources.Get "js/altcha/altcha.js" }} |
| 329 | + <script type="module" src="{{ $altchaJs.RelPermalink }}" defer></script> |
| 330 | + {{ $altchaWorkerJs := resources.Get "js/altcha/worker.js" }} |
| 331 | + <script type="module" src="{{ $altchaWorkerJs.RelPermalink }}" defer></script> |
324 | 332 | {{ else }} |
| 333 | + {{ $hubSubscriptionJs := resources.Get "js/hubsubscription.js" | minify | fingerprint }} |
| 334 | + <script type="text/javascript" src="{{ $hubSubscriptionJs.RelPermalink }}" integrity="{{ $hubSubscriptionJs.Data.Integrity }}" defer></script> |
325 | 335 | {{ $setupJs := resources.Get "js/hubsetup.js" | minify | fingerprint }} |
326 | 336 | <script type="text/javascript" src="{{ $setupJs.RelPermalink }}" integrity="{{ $setupJs.Data.Integrity }}" defer></script> |
| 337 | + {{ $altchaJs := resources.Get "js/altcha/altcha.js" }} |
| 338 | + <script type="module" src="{{ $altchaJs.RelPermalink }}" integrity="{{ $altchaJs.Data.Integrity }}" defer></script> |
| 339 | + {{ $altchaWorkerJs := resources.Get "js/altcha/worker.js" }} |
| 340 | + <script type="module" src="{{ $altchaWorkerJs.RelPermalink }}" integrity="{{ $altchaWorkerJs.Data.Integrity }}" defer></script> |
327 | 341 | {{ end }} |
328 | 342 | {{ end }} |
0 commit comments