Merge pull request #29 from erskingardner/master

Replace auth request js method, update prettierrc to handle handlebar
This commit is contained in:
Pablo Fernandez 2024-02-15 13:06:34 +00:00 committed by GitHub
commit cbb6c66804
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 40 additions and 21 deletions

View file

@ -3,5 +3,13 @@
"importOrderSeparation": true, "importOrderSeparation": true,
"tabWidth": 4, "tabWidth": 4,
"useTabs": false, "useTabs": false,
"semi": true "semi": true,
"overrides": [
{
"files": "*.handlebar",
"options": {
"tabWidth": 2
}
}
]
} }

View file

@ -1,8 +1,8 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta name="robots" content="noindex"> <meta name="robots" content="noindex" />
<meta charset="UTF-8"> <meta charset="UTF-8" />
<title>Authorize Request</title> <title>Authorize Request</title>
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="https://cdn.tailwindcss.com?plugins=forms"></script> <script src="https://cdn.tailwindcss.com?plugins=forms"></script>
@ -75,11 +75,12 @@
.catch((error) => { .catch((error) => {
console.error('Error:', error); console.error('Error:', error);
}); });
} };
</script> </script>
<style> <style>
body { body {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
} }
.border { .border {
@ -88,34 +89,42 @@
</style> </style>
</head> </head>
<body <body
class="flex flex-col justify-center items-center min-h-screen bg-gray-100 dark:bg-neutral-800 text-neutrla-950 dark:text-neutral-50"> class="flex flex-col justify-center items-center min-h-screen bg-gray-100 dark:bg-neutral-800 text-neutrla-950 dark:text-neutral-50"
>
<div class="max-w-md mx-auto w-full px-2 md:px-4 lg:px-8"> <div class="max-w-md mx-auto w-full px-2 md:px-4 lg:px-8">
<div id="main"> <div id="main">
<h1 <h1
class="text-neutral-950 dark:text-neutral-50 text-lg font-semibold w-full"> class="text-neutral-950 dark:text-neutral-50 text-lg font-semibold w-full"
>
Do you want to allow this client to use account Do you want to allow this client to use account
<br /> <br />
<span class="text-blue-500">{{record.keyName}}</span>? <span class="text-blue-500">{{ record.keyName }}</span
>?
</h1> </h1>
<div id="error" <div
class="flex flex-col gap-4 bg-red-200 rounded-lg p-4 w-full hidden"> id="error"
</div> class="flex flex-col gap-4 bg-red-200 rounded-lg p-4 w-full hidden"
></div>
{{#unless authenticated}} {{#unless authenticated}}
<div class="flex flex-col gap-4 mt-10"> <div class="flex flex-col gap-4 mt-10">
<label class="flex flex-col gap-2"> <label class="flex flex-col gap-2">
<span <span
class="text-sm font-medium text-neutral-800 dark:text-neutral-200"> class="text-sm font-medium text-neutral-800 dark:text-neutral-200"
>
Enter your password to authenticate this request Enter your password to authenticate this request
</span> </span>
<div <div
class="relative before:pointer-events-none focus-within:before:opacity-100 before:opacity-0 before:absolute before:-inset-1 before:rounded-[11px] before:border before:border-blue-500 before:ring-2 before:ring-blue-500/20 before:transition after:pointer-events-none after:absolute after:inset-px after:rounded-[7px] after:shadow-highlight dark:after:shadow-white/5 dark:focus-within:after:shadow-blue-500/20 after:transition"> class="relative before:pointer-events-none focus-within:before:opacity-100 before:opacity-0 before:absolute before:-inset-1 before:rounded-[11px] before:border before:border-blue-500 before:ring-2 before:ring-blue-500/20 before:transition after:pointer-events-none after:absolute after:inset-px after:rounded-[7px] after:shadow-highlight dark:after:shadow-white/5 dark:focus-within:after:shadow-blue-500/20 after:transition"
>
<input <input
type="password" type="password"
name="password" name="password"
id="password"
required required
class="w-full relative text-sm text-neutral-800 dark:text-neutral-200 bg-white dark:bg-neutral-750 placeholder:text-neutral-400 dark:placeholder:text-neutral-500 px-3.5 py-2 rounded-lg border border-black/5 shadow-input shadow-black/5 dark:shadow-black/10 !outline-none" /> class="w-full relative text-sm text-neutral-800 dark:text-neutral-200 bg-white dark:bg-neutral-750 placeholder:text-neutral-400 dark:placeholder:text-neutral-500 px-3.5 py-2 rounded-lg border border-black/5 shadow-input shadow-black/5 dark:shadow-black/10 !outline-none"
/>
</div> </div>
</label> </label>
</div> </div>
@ -124,12 +133,14 @@
<div class="flex flex-col items-center justify-center gap-2 mt-5"> <div class="flex flex-col items-center justify-center gap-2 mt-5">
<button <button
onclick="sendPostRequest()" onclick="sendPostRequest()"
class="px-6 w-full h-9 bg-neutral-900 dark:bg-neutral-100 hover:bg-neutral-800 dark:hover:bg-neutral-200 dark:text-neutral-950 rounded-lg justify-center items-center gap-2 inline-flex text-white text-sm font-semibold"> class="px-6 w-full h-9 bg-neutral-900 dark:bg-neutral-100 hover:bg-neutral-800 dark:hover:bg-neutral-200 dark:text-neutral-950 rounded-lg justify-center items-center gap-2 inline-flex text-white text-sm font-semibold"
>
Yes Yes
</button> </button>
<button <button
onclick="window.close()" onclick="window.close()"
class="px-6 h-9 w-full border border-neutral-300 dark:border-neutral-600 dark:text-neutral-50 rounded-lg justify-center items-center gap-2 inline-flex text-neutral-950 text-sm font-semibold"> class="px-6 h-9 w-full border border-neutral-300 dark:border-neutral-600 dark:text-neutral-50 rounded-lg justify-center items-center gap-2 inline-flex text-neutral-950 text-sm font-semibold"
>
No No
</button> </button>
</div> </div>
@ -146,7 +157,7 @@
<!-- List all cookies --> <!-- List all cookies -->
<script> <script>
const cookies = document.cookie.split(';'); const cookies = document.cookie.split(";");
for (let i = 0; i < cookies.length; i++) { for (let i = 0; i < cookies.length; i++) {
console.log(cookies[i]); console.log(cookies[i]);
} }