2023-08-05 22:13:43 +02:00
|
|
|
{{ template "head.tmpl" . }}
|
2023-08-07 21:39:39 +02:00
|
|
|
<body class="min-h-screen flex flex-col justify-between bg-white dark:bg-gray-900">
|
2023-08-05 22:13:43 +02:00
|
|
|
{{ template "navbar.tmpl" . }}
|
2023-08-07 21:39:39 +02:00
|
|
|
<main class="grow mb-auto">
|
2023-08-06 16:36:29 +02:00
|
|
|
<div class="container mx-auto place-items-center px-8 md:px-12 lg:px-14">
|
2023-08-05 22:13:43 +02:00
|
|
|
{{ if and .Data .Data.flash }}
|
2023-08-06 16:36:29 +02:00
|
|
|
<h1 class="text-xl text-pink-600 dark:text-pink-500 py-2">
|
|
|
|
{{ .Data.flash }}
|
|
|
|
</h1>
|
2023-08-05 22:13:43 +02:00
|
|
|
<hr class="md:px-14 md:mx-24">
|
|
|
|
{{- else -}}{{end}}
|
|
|
|
|
2023-08-06 16:36:29 +02:00
|
|
|
<h1 class="text-xl text-fuchsia-600 dark:text-fuchsia-400 capitalize py-2">
|
|
|
|
Manage Your API keys
|
|
|
|
</h1>
|
2023-08-05 22:13:43 +02:00
|
|
|
|
2023-08-06 16:36:29 +02:00
|
|
|
<div class="p-2 mx-auto mt-8 lg:max-w-5xl lg:mt-0 block">
|
2023-09-04 15:00:41 +02:00
|
|
|
{{- $hibpK := .Data.hibpApiKey -}}
|
|
|
|
<!-- hibp form -->
|
2023-08-06 16:36:29 +02:00
|
|
|
<form method="post" class="w-full lg:max-w-7xl px-2">
|
|
|
|
<input type="hidden" name="csrf" value="{{- .CSRF -}}">
|
|
|
|
<div class="items-center">
|
2023-08-24 18:43:24 +02:00
|
|
|
<label for="hibpApiKey" class="text-purple-500 font-bold">
|
2023-08-06 16:36:29 +02:00
|
|
|
Have I Been Pwned?
|
|
|
|
</label>
|
2023-09-04 13:45:36 +02:00
|
|
|
<input name="hibpApiKey" type="text"
|
2023-09-04 15:00:41 +02:00
|
|
|
placeholder="HIBP API key" {{if $hibpK}}value="{{$hibpK}}"{{end}}
|
2023-09-04 13:45:36 +02:00
|
|
|
autofocus
|
2023-09-04 15:00:41 +02:00
|
|
|
disabled
|
|
|
|
class="py-3 px-8 mt-2 w-full valid:border text-gray-500 bg-white border rounded-lg dark:bg-gray-900 dark:text-gray-300 dark:valid:border-gray-600 focus:border-blue-400 dark:focus:border-blue-300 focus:ring-blue-300 focus:outline-none focus:ring focus:ring-opacity-40">
|
|
|
|
<p id="hibp-expl"
|
|
|
|
class="group relative hover:cursor-help mt-2 text-sm text-gray-500 dark:text-gray-400">
|
|
|
|
Adds support for querying Troy Hunt's
|
|
|
|
<a href="https://haveibeenpwned.com/API/v3"
|
|
|
|
class="font-medium text-blue-600 hover:underline dark:text-blue-500">Have I Been Pwned? API
|
|
|
|
</a>
|
|
|
|
<span
|
|
|
|
class="absolute hidden group-hover:flex -left-5 -top-2 -translate-y-full w-48 px-2 py-1 bg-gray-700 rounded-lg text-center text-white text-sm after:content-[''] after:absolute after:left-1/2 after:top-[100%] after:-translate-x-1/2 after:border-8 after:border-x-transparent after:border-b-transparent after:border-t-gray-700">
|
|
|
|
The input field reflects the value of $PCMT_HIBP_API_KEY environment variable.
|
|
|
|
</span>
|
|
|
|
</p>
|
2023-08-06 16:36:29 +02:00
|
|
|
</div>
|
2023-09-04 15:00:41 +02:00
|
|
|
<div class="group relative mt-4 block md:flex md:items-center place-items-end space-x-0 md:space-x-2">
|
|
|
|
<span
|
|
|
|
class="absolute hidden group-hover:flex -left-5 -top-2 -translate-y-full w-48 px-2 py-1 bg-gray-700 rounded-lg text-center text-white text-sm after:content-[''] after:absolute after:left-1/2 after:top-[100%] after:-translate-x-1/2 after:border-8 after:border-x-transparent after:border-b-transparent after:border-t-gray-700">
|
|
|
|
These buttons currently don't perform any actions. The key view is currently read-only.
|
|
|
|
</span>
|
|
|
|
<button
|
|
|
|
disabled
|
|
|
|
class="px-2 py-3 w-full md:w-auto text-sm font-medium tracking-wide text-white transition-colors duration-300 transform bg-blue-500 rounded-lg hover:bg-blue-400 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-50">
|
2023-08-07 21:35:59 +02:00
|
|
|
Save
|
2023-08-06 16:36:29 +02:00
|
|
|
</button>
|
2023-09-04 15:00:41 +02:00
|
|
|
<button
|
|
|
|
disabled {{if not $hibpK}}{{end}}
|
|
|
|
class="{{if not $hibpK}}cursor-not-allowed{{else}}transition-colors duration-300 transform hover:bg-gray-400 focus:outline-none focus:ring focus:ring-gray-300 focus:ring-opacity-50{{end}} px-2 py-3 mt-2 md:mt-0 w-full md:w-auto text-sm font-medium tracking-wide text-white bg-gray-500 rounded-lg">
|
2023-08-06 16:36:29 +02:00
|
|
|
Test key
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<hr class="py-2 md:px-14 mt-4 lg:mx-22 sm:max-w-1/2">
|
2023-09-04 15:00:41 +02:00
|
|
|
|
|
|
|
{{- $dehashedK := .Data.dehashedApiKey -}}
|
2023-08-06 16:36:29 +02:00
|
|
|
<!-- dehashed.com form -->
|
|
|
|
<form method="post" class="w-full lg:max-w-7xl px-2">
|
|
|
|
<input type="hidden" name="csrf" value="{{- .CSRF -}}">
|
|
|
|
<div class="items-center">
|
|
|
|
<label for="dehashed-api-key" class="text-purple-500 font-bold">
|
|
|
|
DeHashed.com
|
|
|
|
</label>
|
2023-09-04 13:45:36 +02:00
|
|
|
<input name="dehashed-api-key" type="text"
|
2023-09-04 15:00:41 +02:00
|
|
|
placeholder="DeHashed.com API key" {{if $dehashedK}}value="{{$dehashedK}}"{{end}}
|
2023-09-04 13:45:36 +02:00
|
|
|
autofocus
|
2023-09-04 15:00:41 +02:00
|
|
|
disabled
|
|
|
|
class="py-3 px-8 mt-2 w-full valid:border text-gray-500 bg-white border rounded-lg dark:bg-gray-900 dark:text-gray-300 dark:valid:border-gray-600 focus:border-blue-400 dark:focus:border-blue-300 focus:ring-blue-300 focus:outline-none focus:ring focus:ring-opacity-40"
|
|
|
|
aria-described-by="dehashed-expl">
|
|
|
|
<p id="dehashed-expl" class="group relative hover:cursor-help mt-2 text-sm text-gray-500 dark:text-gray-400">Adds support for querying <a href="https://dehashed.com/" class="font-medium text-blue-600 hover:underline dark:text-blue-500">DeHashed API</a>
|
|
|
|
<span
|
|
|
|
class="absolute hidden group-hover:flex -left-5 -top-2 -translate-y-full w-54 px-2 py-1 bg-gray-700 rounded-lg text-center text-white text-sm after:content-[''] after:absolute after:left-1/2 after:top-[100%] after:-translate-x-1/2 after:border-8 after:border-x-transparent after:border-b-transparent after:border-t-gray-700">
|
|
|
|
Support for dehashed.com is coming up. The input field will reflect the value of $PCMT_DEHASHED_API_KEY environment variable.
|
|
|
|
</span>
|
|
|
|
</p>
|
2023-08-06 16:36:29 +02:00
|
|
|
</div>
|
2023-09-04 15:00:41 +02:00
|
|
|
<div class="group relative mt-4 block md:flex md:items-center place-items-end space-x-0 md:space-x-2">
|
|
|
|
<span
|
|
|
|
class="absolute hidden group-hover:flex -left-5 -top-2 -translate-y-full w-48 px-2 py-1 bg-gray-700 rounded-lg text-center text-white text-sm after:content-[''] after:absolute after:left-1/2 after:top-[100%] after:-translate-x-1/2 after:border-8 after:border-x-transparent after:border-b-transparent after:border-t-gray-700">
|
|
|
|
These buttons currently don't perform any actions.
|
|
|
|
</span>
|
|
|
|
<button
|
|
|
|
disabled
|
|
|
|
class="px-2 py-3 w-full md:w-auto text-sm font-medium tracking-wide text-white transition-colors duration-300 transform bg-blue-500 rounded-lg hover:bg-blue-400 focus:outline-none focus:ring focus:ring-blue-300 focus:ring-opacity-50">
|
2023-08-07 21:35:59 +02:00
|
|
|
Save
|
2023-08-06 16:36:29 +02:00
|
|
|
</button>
|
2023-09-04 15:00:41 +02:00
|
|
|
<button
|
|
|
|
disabled {{if not $dehashedK}}{{end}}
|
|
|
|
class="{{if not $dehashedK}}cursor-not-allowed{{else}}transition-colors duration-300 transform hover:bg-gray-400 focus:outline-none focus:ring focus:ring-gray-300 focus:ring-opacity-50{{end}} px-2 py-3 mt-2 md:mt-0 w-full md:w-auto text-sm font-medium tracking-wide text-white bg-gray-500 rounded-lg">
|
2023-08-06 16:36:29 +02:00
|
|
|
Test key
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
2023-08-05 22:13:43 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
{{ template "footer.tmpl" . }}
|