@opengis/fastify-table 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/routes/cron/index.js +1 -1
- package/dist/server/templates/page/2factor-recovery.html +102 -0
- package/dist/server/templates/page/2factor.html +141 -0
- package/dist/server/templates/page/login.html +91 -0
- package/dist/server/templates/page/loginEuSign.html +124 -0
- package/dist/server/templates/pt/recovery-password-email-template.html +21 -0
- package/package.json +3 -3
|
@@ -8,6 +8,6 @@ const cronSchema = {
|
|
|
8
8
|
},
|
|
9
9
|
};
|
|
10
10
|
async function plugin(app, opt = {}) {
|
|
11
|
-
app.get("/cron/:name", { config: {
|
|
11
|
+
app.get("/cron/:name", { config: { role: "admin" }, schema: cronSchema }, cronApi);
|
|
12
12
|
}
|
|
13
13
|
export default plugin;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" dir="" class="relative min-h-full">
|
|
3
|
+
<head>
|
|
4
|
+
<!-- scripts -->
|
|
5
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
6
|
+
</head>
|
|
7
|
+
<body class="bg-white dark:bg-neutral-900">
|
|
8
|
+
<main class="flex min-h-full">
|
|
9
|
+
|
|
10
|
+
<!-- Content -->
|
|
11
|
+
<div class="grow px-5">
|
|
12
|
+
<div class="h-full min-h-screen sm:w-[448px] flex flex-col justify-center mx-auto space-y-5">
|
|
13
|
+
|
|
14
|
+
{{#if codes}}
|
|
15
|
+
<div><h1 class="text-xl sm:text-2xl font-semibold text-gray-800 dark:text-neutral-200">Your recovery codes:</h1></div>
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{#if recovery}}
|
|
18
|
+
<div>
|
|
19
|
+
<a href="/2factor/recovery" class="py-2.5 px-3 w-full inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600">
|
|
20
|
+
Send recovery code via E-mail
|
|
21
|
+
</a>
|
|
22
|
+
<h1 class="text-xl sm:text-2xl font-semibold text-gray-800 dark:text-neutral-200">Reset 2factor settings via recovery code:</h1>
|
|
23
|
+
</div>
|
|
24
|
+
{{/if}}
|
|
25
|
+
|
|
26
|
+
<form action="/2factor/recovery" method="post">
|
|
27
|
+
<div class="space-y-5">
|
|
28
|
+
<div>
|
|
29
|
+
<label for="hs-pro-dale" class="block mb-2 text-sm font-medium text-gray-800 dark:text-white">
|
|
30
|
+
Code
|
|
31
|
+
</label>
|
|
32
|
+
|
|
33
|
+
{{#if query.recovery}}
|
|
34
|
+
<input type="text" name="code" id="hs-pro-dale" class="py-2.5 px-3 block w-full border-gray-200 rounded-lg text-sm placeholder:text-gray-400 focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-transparent dark:border-neutral-700 dark:text-neutral-300 dark:placeholder:text-white/60 dark:focus:ring-neutral-600" placeholder="999999">
|
|
35
|
+
{{^}}
|
|
36
|
+
|
|
37
|
+
<input type="text" name="code" class="form-input hidden">
|
|
38
|
+
<div class="space-y-5">
|
|
39
|
+
<div class="my-3 flex gap-x-2" data-hs-pin-input>
|
|
40
|
+
<input id="input-1" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
41
|
+
<input id="input-2" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
42
|
+
<input id="input-3" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
43
|
+
<input id="input-4" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
44
|
+
<input id="input-5" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
45
|
+
<input id="input-6" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
{{/if}}
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<button type="submit" class="py-2.5 px-3 w-full inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600">
|
|
52
|
+
Reset 2factor settings
|
|
53
|
+
</button>
|
|
54
|
+
</div>
|
|
55
|
+
</form>
|
|
56
|
+
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
<!-- End Content -->
|
|
60
|
+
</main><script>
|
|
61
|
+
const inputs = document.querySelectorAll(".input-code");
|
|
62
|
+
const formInput = document.querySelector(".form-input");
|
|
63
|
+
|
|
64
|
+
const inputTextToInput = (event) => {
|
|
65
|
+
const input = event.target;
|
|
66
|
+
const value = input.value;
|
|
67
|
+
|
|
68
|
+
if (value.length > 1) {
|
|
69
|
+
input.value = value.slice(-1);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const currentIndex = Array.from(inputs).indexOf(input);
|
|
73
|
+
if (value && currentIndex < inputs.length - 1) {
|
|
74
|
+
inputs[currentIndex + 1].focus();
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const combinedValue = Array.from(inputs)
|
|
78
|
+
.map((input) => input.value)
|
|
79
|
+
.join("");
|
|
80
|
+
|
|
81
|
+
formInput.value = combinedValue;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const handleBackspace = (event) => {
|
|
85
|
+
const input = event.target;
|
|
86
|
+
|
|
87
|
+
if (event.key === "Backspace" && input.value === "") {
|
|
88
|
+
const currentIndex = Array.from(inputs).indexOf(input);
|
|
89
|
+
if (currentIndex > 0) {
|
|
90
|
+
inputs[currentIndex - 1].focus();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
inputs.forEach((input) => {
|
|
96
|
+
input.addEventListener("input", inputTextToInput);
|
|
97
|
+
input.addEventListener("keydown", handleBackspace);
|
|
98
|
+
});
|
|
99
|
+
</script>
|
|
100
|
+
</body>
|
|
101
|
+
|
|
102
|
+
</html>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" dir="" class="relative min-h-full">
|
|
3
|
+
<head>
|
|
4
|
+
<!-- scripts -->
|
|
5
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
6
|
+
</head>
|
|
7
|
+
<body class="bg-white dark:bg-neutral-900">
|
|
8
|
+
<main class="flex min-h-full">
|
|
9
|
+
|
|
10
|
+
<!-- Content -->
|
|
11
|
+
<div class="grow px-5">
|
|
12
|
+
<div class="h-full min-h-screen sm:w-[448px] flex flex-col justify-center mx-auto space-y-5">
|
|
13
|
+
{{#if enabled}}
|
|
14
|
+
<a href="/2factor?recovery=1" class="py-2.5 px-3 w-full inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700">
|
|
15
|
+
<svg class="flex-shrink-0 size-4" width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
16
|
+
<path d="M27.2192 10.9088C27.0336 11.0528 23.7568 12.8992 23.7568 17.0048C23.7568 21.7536 27.9264 23.4336 28.0512 23.4752C28.032 23.5776 27.3888 25.776 25.8528 28.016C24.4832 29.9872 23.0528 31.9552 20.8768 31.9552C18.7008 31.9552 18.1408 30.6912 15.6288 30.6912C13.1808 30.6912 12.3104 31.9968 10.32 31.9968C8.3296 31.9968 6.9408 30.1728 5.344 27.9328C3.4944 25.3024 2 21.216 2 17.3376C2 11.1168 6.0448 7.8176 10.0256 7.8176C12.1408 7.8176 13.904 9.2064 15.232 9.2064C16.496 9.2064 18.4672 7.7344 20.8736 7.7344C21.7856 7.7344 25.0624 7.8176 27.2192 10.9088ZM19.7312 5.1008C20.7264 3.92 21.4304 2.2816 21.4304 0.6432C21.4304 0.416 21.4112 0.1856 21.3696 0C19.7504 0.0608 17.824 1.0784 16.6624 2.4256C15.7504 3.4624 14.8992 5.1008 14.8992 6.7616C14.8992 7.0112 14.9408 7.2608 14.96 7.3408C15.0624 7.36 15.2288 7.3824 15.3952 7.3824C16.848 7.3824 18.6752 6.4096 19.7312 5.1008Z" class="fill-black dark:fill-neutral-200" fill="currentColor"/>
|
|
17
|
+
</svg>
|
|
18
|
+
I lost access to my 2factor app
|
|
19
|
+
</a>
|
|
20
|
+
{{/if}}
|
|
21
|
+
<ul>
|
|
22
|
+
<!-- Step -->
|
|
23
|
+
<li class="relative ps-12 pb-10 last:pb-0 before:content-[counter(step)] before:absolute before:start-0 before:flex before:items-center before:justify-center before:size-7 before:text-xs before:font-semibold before:text-gray-800 before:rounded-full before:bg-gray-100 dark:before:bg-neutral-700 dark:before:text-neutral-200 last:after:hidden after:absolute after:top-9 after:bottom-2 after:start-3.5 after:w-px after:-translate-x-[0.5px] after:bg-gray-200 dark:after:bg-neutral-700" style="counter-increment: step 1;">
|
|
24
|
+
<span class="block font-semibold text-sm text-gray-800 dark:text-neutral-200">
|
|
25
|
+
Download app
|
|
26
|
+
</span>
|
|
27
|
+
<a target="_blank" href="{{coalesce url 'https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&pcampaignid=web_share'}}" class="text-[13px] text-gray-500 dark:text-neutral-500">
|
|
28
|
+
Download a mobile authentication app.
|
|
29
|
+
</a>
|
|
30
|
+
</li>
|
|
31
|
+
<!-- End Step -->
|
|
32
|
+
|
|
33
|
+
{{#if qrCode}}
|
|
34
|
+
{{#unless enabled}}
|
|
35
|
+
<!-- Step -->
|
|
36
|
+
<li class="relative ps-12 pb-10 last:pb-0 before:content-[counter(step)] before:absolute before:start-0 before:flex before:items-center before:justify-center before:size-7 before:text-xs before:font-semibold before:text-gray-800 before:rounded-full before:bg-gray-100 dark:before:bg-neutral-700 dark:before:text-neutral-200 last:after:hidden after:absolute after:top-9 after:bottom-2 after:start-3.5 after:w-px after:-translate-x-[0.5px] after:bg-gray-200 dark:after:bg-neutral-700" style="counter-increment: step 1;">
|
|
37
|
+
<span class="block font-semibold text-sm text-gray-800 dark:text-neutral-200">
|
|
38
|
+
Scan QR Code
|
|
39
|
+
</span>
|
|
40
|
+
<p class="text-[13px] text-gray-500 dark:text-neutral-500">
|
|
41
|
+
Scan this QR code using a mobile authentication app. This will generate a verification code.
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
<div class="mt-3">
|
|
45
|
+
<span class="p-1 inline-block border border-gray-300 rounded-lg dark:border-neutral-600">
|
|
46
|
+
{{{qrCode}}}
|
|
47
|
+
</span>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="mt-3">
|
|
50
|
+
<span class="p-1 inline-block border border-gray-300 rounded-lg dark:border-neutral-600">
|
|
51
|
+
{{secretKey}}
|
|
52
|
+
</span>
|
|
53
|
+
</div>
|
|
54
|
+
</li>
|
|
55
|
+
{{/unless}}
|
|
56
|
+
<!-- End Step -->
|
|
57
|
+
{{/if}}
|
|
58
|
+
|
|
59
|
+
<!-- Step -->
|
|
60
|
+
<li class="relative ps-12 pb-10 last:pb-0 before:content-[counter(step)] before:absolute before:start-0 before:flex before:items-center before:justify-center before:size-7 before:text-xs before:font-semibold before:text-gray-800 before:rounded-full before:bg-gray-100 dark:before:bg-neutral-700 dark:before:text-neutral-200 last:after:hidden after:absolute after:top-9 after:bottom-2 after:start-3.5 after:w-px after:-translate-x-[0.5px] after:bg-gray-200 dark:after:bg-neutral-700" style="counter-increment: step 1;">
|
|
61
|
+
<span class="block font-semibold text-sm text-gray-800 dark:text-neutral-200">
|
|
62
|
+
Enter Code
|
|
63
|
+
</span>
|
|
64
|
+
<p class="text-[13px] text-gray-500 dark:text-neutral-500">
|
|
65
|
+
Enter the 2-step verification code from your authenticator app.
|
|
66
|
+
</p>
|
|
67
|
+
|
|
68
|
+
<form action="/2factor/verify" method="post">
|
|
69
|
+
<div class="space-y-5">
|
|
70
|
+
<div>
|
|
71
|
+
<input type="text" name="code" class="form-input hidden">
|
|
72
|
+
<div class="space-y-5">
|
|
73
|
+
<div class="my-3 flex gap-x-2" data-hs-pin-input>
|
|
74
|
+
<input id="input-1" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
75
|
+
<input id="input-2" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
76
|
+
<input id="input-3" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
77
|
+
<input id="input-4" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
78
|
+
<input id="input-5" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
79
|
+
<input id="input-6" type="text" class="input-code block w-[38px] h-[38px] text-center border rounded-md focus:outline-blue-600" >
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<button type="submit" class="py-2.5 px-3 w-full inline-flex justify-center items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none dark:focus:outline-none dark:focus:ring-1 dark:focus:ring-neutral-600">
|
|
84
|
+
Sign in
|
|
85
|
+
</button>
|
|
86
|
+
</div>
|
|
87
|
+
</form>
|
|
88
|
+
</li>
|
|
89
|
+
<!-- End Step -->
|
|
90
|
+
|
|
91
|
+
</ul>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<!-- End Content -->
|
|
95
|
+
</main>
|
|
96
|
+
<script>
|
|
97
|
+
const inputs = document.querySelectorAll(".input-code");
|
|
98
|
+
const formInput = document.querySelector(".form-input");
|
|
99
|
+
|
|
100
|
+
const inputTextToInput = (event) => {
|
|
101
|
+
const input = event.target;
|
|
102
|
+
const value = input.value;
|
|
103
|
+
|
|
104
|
+
if (value.length > 1) {
|
|
105
|
+
input.value = value.slice(-1);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const currentIndex = Array.from(inputs).indexOf(input);
|
|
109
|
+
if (value && currentIndex < inputs.length - 1) {
|
|
110
|
+
inputs[currentIndex + 1].focus();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const combinedValue = Array.from(inputs)
|
|
114
|
+
.map((input) => input.value)
|
|
115
|
+
.join("");
|
|
116
|
+
|
|
117
|
+
formInput.value = combinedValue;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const handleBackspace = (event) => {
|
|
121
|
+
const input = event.target;
|
|
122
|
+
|
|
123
|
+
if (event.key === "Backspace" && input.value === "") {
|
|
124
|
+
const currentIndex = Array.from(inputs).indexOf(input);
|
|
125
|
+
if (currentIndex > 0) {
|
|
126
|
+
inputs[currentIndex - 1].focus();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
inputs.forEach((input) => {
|
|
132
|
+
input.addEventListener("input", inputTextToInput);
|
|
133
|
+
input.addEventListener("keydown", handleBackspace);
|
|
134
|
+
});
|
|
135
|
+
</script>
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
</body>
|
|
140
|
+
|
|
141
|
+
</html>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" dir="">
|
|
3
|
+
<head>
|
|
4
|
+
<!-- scripts -->
|
|
5
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
6
|
+
</head>
|
|
7
|
+
<body class="bg-white ">
|
|
8
|
+
<main class="flex h-[90vh] justify-center items-center">
|
|
9
|
+
<div class="space-y-8 w-[385px]">
|
|
10
|
+
<div class="text-center">
|
|
11
|
+
{{#if settings.admin.logo}}
|
|
12
|
+
<img style="margin-left: auto; margin-right: auto; display: block;" src="{{settings.admin.logo}}" alt="logo">
|
|
13
|
+
{{/if}}
|
|
14
|
+
<h2 class="font-medium text-xl text-gray-800 ">
|
|
15
|
+
{{#if settings.admin.title}}
|
|
16
|
+
{{settings.admin.title}}
|
|
17
|
+
{{^}}
|
|
18
|
+
Вхід в систему
|
|
19
|
+
{{/if}}
|
|
20
|
+
</h2>
|
|
21
|
+
</div>
|
|
22
|
+
<div id="login_error" style="color: maroon;font-weight: 500;"></div>
|
|
23
|
+
<form action="/api/login" method="get" class="space-y-3">
|
|
24
|
+
<div>
|
|
25
|
+
<label for="hs-pro-shlgfem" class="sr-only">Email</label>
|
|
26
|
+
<input id="hs-pro-shlgfem" type="text" name="username"
|
|
27
|
+
class="py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm placeholder:text-gray-400 focus:outline-none h-[50px] focus:border-indigo-500 focus:border-2 disabled:opacity-50 disabled:pointer-events-none "
|
|
28
|
+
placeholder="Email">
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div>
|
|
32
|
+
<label for="hs-pro-shlgfps" class="sr-only">Password</label>
|
|
33
|
+
<div class="relative">
|
|
34
|
+
<input id="hs-pro-shlgfps" name="password" type="password"
|
|
35
|
+
class="py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm placeholder:text-gray-400 focus:border-indigo-500 focus:outline-none h-[50px] focus:border-indigo-500 focus:border-2 disabled:opacity-50 disabled:pointer-events-none "
|
|
36
|
+
placeholder="Password">
|
|
37
|
+
<button type="button" data-hs-toggle-password="{
|
|
38
|
+
"target": "#hs-pro-shlgfps"
|
|
39
|
+
}"
|
|
40
|
+
class="absolute inset-y-0 end-0 flex items-center z-20 px-3 cursor-pointer text-gray-400 rounded-e-md focus:outline-none">
|
|
41
|
+
<!--svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
|
42
|
+
viewBox="0 0 16 16">
|
|
43
|
+
<path class="hs-password-active:hidden"
|
|
44
|
+
d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z">
|
|
45
|
+
</path>
|
|
46
|
+
<path class="hs-password-active:hidden"
|
|
47
|
+
d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z">
|
|
48
|
+
</path>
|
|
49
|
+
<path class="hs-password-active:hidden"
|
|
50
|
+
d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z">
|
|
51
|
+
</path>
|
|
52
|
+
<path class="hidden hs-password-active:block"
|
|
53
|
+
d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z">
|
|
54
|
+
</path>
|
|
55
|
+
<path class="hidden hs-password-active:block"
|
|
56
|
+
d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"></path>
|
|
57
|
+
</svg-->
|
|
58
|
+
</button>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="flex flex-wrap justify-between items-center gap-3">
|
|
63
|
+
<div class="flex gap-x-1">
|
|
64
|
+
<input type="checkbox" name="keep"
|
|
65
|
+
class="shrink-0 border-gray-300 size-[18px] rounded text-indigo-600 focus:ring-indigo-600 disabled:opacity-50 disabled:pointer-events-none "
|
|
66
|
+
id="hs-pro-shlgfemch">
|
|
67
|
+
<label for="hs-pro-shlgfemch" class="text-[13px] text-gray-500 ms-1.5">
|
|
68
|
+
Remember me
|
|
69
|
+
</label>
|
|
70
|
+
</div>
|
|
71
|
+
<a class="text-[13px] text-gray-500 underline underline-offset-4 hover:text-indigo-600 focus:outline-none focus:text-indigo-600 "
|
|
72
|
+
href="#">Forgot your password?</a>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="space-y-4">
|
|
76
|
+
<button type="submit"
|
|
77
|
+
class="py-3 px-4 w-full inline-flex justify-center items-center gap-x-2 sm:text-sm font-medium rounded-lg border border-transparent bg-indigo-600 text-white hover:bg-indigo-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-indigo-700">
|
|
78
|
+
Log in
|
|
79
|
+
</button>
|
|
80
|
+
</div>
|
|
81
|
+
</form>
|
|
82
|
+
</div>
|
|
83
|
+
</main>
|
|
84
|
+
</body>
|
|
85
|
+
<script>
|
|
86
|
+
const error = location.search.includes('wrong_pass')
|
|
87
|
+
if(error){
|
|
88
|
+
document.getElementById('login_error').innerHTML='Не вірний користувач або пароль';
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
</html>
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" dir="">
|
|
3
|
+
<head>
|
|
4
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
5
|
+
</head>
|
|
6
|
+
<body class="bg-white dark:bg-neutral-900">
|
|
7
|
+
<main class="flex h-[90vh] justify-center items-center">
|
|
8
|
+
<div class="space-y-8 w-[385px]">
|
|
9
|
+
<div class="text-center">
|
|
10
|
+
<h2 class="font-medium text-xl text-gray-800 dark:text-neutral-200">
|
|
11
|
+
Увійти до кабінету
|
|
12
|
+
</h2>
|
|
13
|
+
</div>
|
|
14
|
+
<div id="login_error" style="color: maroon;font-weight: 500;"></div>
|
|
15
|
+
<form action="/api/login" method="get" class="space-y-3">
|
|
16
|
+
<div>
|
|
17
|
+
<label for="hs-pro-shlgfem" class="sr-only">Email</label>
|
|
18
|
+
<input id="hs-pro-shlgfem" type="text" name="username"
|
|
19
|
+
class="py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm placeholder:text-gray-400 focus:outline-none h-[50px] focus:border-indigo-500 focus:border-2 disabled:opacity-50 disabled:pointer-events-none dark:bg-transparent dark:border-neutral-700 dark:text-neutral-300 dark:placeholder:text-white/60 dark:focus:ring-neutral-600"
|
|
20
|
+
placeholder="Email">
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<div>
|
|
24
|
+
<label for="hs-pro-shlgfps" class="sr-only">Password</label>
|
|
25
|
+
<div class="relative">
|
|
26
|
+
<input id="hs-pro-shlgfps" name="password" type="password"
|
|
27
|
+
class="py-3 px-4 block w-full border border-gray-200 rounded-lg sm:text-sm placeholder:text-gray-400 focus:border-indigo-500 focus:outline-none h-[50px] focus:border-indigo-500 focus:border-2 disabled:opacity-50 disabled:pointer-events-none dark:bg-transparent dark:border-neutral-700 dark:text-neutral-300 dark:placeholder:text-white/60 dark:focus:ring-neutral-600"
|
|
28
|
+
placeholder="Password">
|
|
29
|
+
<button type="button" data-hs-toggle-password="{
|
|
30
|
+
"target": "#hs-pro-shlgfps"
|
|
31
|
+
}"
|
|
32
|
+
class="absolute inset-y-0 end-0 flex items-center z-20 px-3 cursor-pointer text-gray-400 rounded-e-md focus:outline-none">
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="flex flex-wrap justify-between items-center gap-3">
|
|
38
|
+
<div class="flex gap-x-1">
|
|
39
|
+
<input type="checkbox" name="keep"
|
|
40
|
+
class="shrink-0 border-gray-300 size-[18px] rounded text-indigo-600 focus:ring-indigo-600 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-600 dark:checked:bg-indigo-500 dark:checked:border-indigo-500 dark:focus:ring-offset-neutral-800"
|
|
41
|
+
id="hs-pro-shlgfemch">
|
|
42
|
+
<label for="hs-pro-shlgfemch" class="text-[13px] text-gray-500 ms-1.5 dark:text-neutral-400">
|
|
43
|
+
Remember me
|
|
44
|
+
</label>
|
|
45
|
+
</div>
|
|
46
|
+
<a class="text-[13px] text-gray-500 underline underline-offset-4 hover:text-indigo-600 focus:outline-none focus:text-indigo-600 dark:text-neutral-500 dark:hover:text-indigo-400 dark:focus:text-indigo-400"
|
|
47
|
+
href="#">Forgot your password?</a>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<div class="space-y-4">
|
|
51
|
+
<button type="submit"
|
|
52
|
+
class="py-3 px-4 w-full inline-flex justify-center items-center gap-x-2 sm:text-sm font-medium rounded-lg border border-transparent bg-indigo-600 text-white hover:bg-indigo-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-indigo-700">
|
|
53
|
+
Log in
|
|
54
|
+
</button>
|
|
55
|
+
</div>
|
|
56
|
+
</form>
|
|
57
|
+
<div class="space-y-4">
|
|
58
|
+
<a id="loginGovUA" style="background-color:rgba(188, 208, 58, 0.449);border-radius:70px;font-size:18px;" class="py-3 px-4 w-full inline-flex justify-center items-center gap-x-2 sm:text-sm font-medium rounded-lg border border-transparent bg-indigo-600 text-white hover:bg-indigo-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-indigo-700" href="https://nsdi.gov.ua/auth/redirect">
|
|
59
|
+
<div class="full-height">
|
|
60
|
+
<div class="main-logo d-flex align-items-center">
|
|
61
|
+
<span class="d-inline-block m-r-sm"><b>Авторизуватись з</b></span>
|
|
62
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1336.82 360" height="30px">
|
|
63
|
+
<defs>
|
|
64
|
+
<style>
|
|
65
|
+
.cls-1 {
|
|
66
|
+
fill: #fff;
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
69
|
+
</defs>
|
|
70
|
+
<title>id.gov.ua</title>
|
|
71
|
+
<g id="Шар_2" data-name="Шар 2">
|
|
72
|
+
<g id="Layer_1" data-name="Layer 1">
|
|
73
|
+
<rect x="254" width="720" height="360" rx="180"></rect>
|
|
74
|
+
<path class="cls-1" d="M614,260a80,80,0,1,1,80-80A80.09,80.09,0,0,1,614,260Zm0-130a50,50,0,1,0,50,50A50.06,50.06,0,0,0,614,130Z"></path>
|
|
75
|
+
<path d="M1093,260a80.09,80.09,0,0,1-80-80V115a15,15,0,0,1,30,0v65a50,50,0,0,0,100,0V115a15,15,0,0,1,30,0v65A80.09,80.09,0,0,1,1093,260Z"></path>
|
|
76
|
+
<path class="cls-1" d="M785,260a15,15,0,0,1-13.52-8.51l-60-125a15,15,0,0,1,27-13L785,210.34l46.48-96.83a15,15,0,1,1,27,13l-60,125A15,15,0,0,1,785,260Z"></path>
|
|
77
|
+
<path d="M1321.83,260a15,15,0,0,1-13.54-8.51l-46.47-96.83-46.48,96.83a15,15,0,0,1-27-13l60-125a15,15,0,0,1,27,0l60,125A15,15,0,0,1,1321.83,260Z"></path>
|
|
78
|
+
<path class="cls-1" d="M432,260a80,80,0,1,1,56.57-136.57,15,15,0,1,1-21.21,21.21A50,50,0,1,0,479.7,195H432a15,15,0,0,1,0-30h65a15,15,0,0,1,15,15A80.09,80.09,0,0,1,432,260Z"></path>
|
|
79
|
+
<path d="M141,100H76a15,15,0,0,0-15,15V245a15,15,0,0,0,15,15h65a80,80,0,0,0,0-160Zm0,130H91V130h50a50,50,0,0,1,0,100Z"></path>
|
|
80
|
+
<path d="M15,100A15,15,0,0,0,0,115V245a15,15,0,0,0,30,0V115A15,15,0,0,0,15,100Z"></path>
|
|
81
|
+
</g>
|
|
82
|
+
</g>
|
|
83
|
+
</svg>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</a>
|
|
87
|
+
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<div>
|
|
91
|
+
<a
|
|
92
|
+
href="https://id.softpro.ua/oauth/authorize?response_type=code&provider=google&client_id=photo-client-123&redirect_uri=https://billing.local.ua/auth/by_data&scope=profile email"
|
|
93
|
+
class="flex items-center justify-center mt-4 text-gray-600 transition-colors duration-300 transform border rounded-lg hover:bg-gray-50">
|
|
94
|
+
<div class="px-4 py-2">
|
|
95
|
+
<svg class="w-6 h-6" viewBox="0 0 40 40">
|
|
96
|
+
<path
|
|
97
|
+
d="M36.3425 16.7358H35V16.6667H20V23.3333H29.4192C28.045 27.2142 24.3525 30 20 30C14.4775 30 10 25.5225 10 20C10 14.4775 14.4775 9.99999 20 9.99999C22.5492 9.99999 24.8683 10.9617 26.6342 12.5325L31.3483 7.81833C28.3717 5.04416 24.39 3.33333 20 3.33333C10.7958 3.33333 3.33335 10.7958 3.33335 20C3.33335 29.2042 10.7958 36.6667 20 36.6667C29.2042 36.6667 36.6667 29.2042 36.6667 20C36.6667 18.8825 36.5517 17.7917 36.3425 16.7358Z"
|
|
98
|
+
fill="#FFC107"></path>
|
|
99
|
+
<path
|
|
100
|
+
d="M5.25497 12.2425L10.7308 16.2583C12.2125 12.59 15.8008 9.99999 20 9.99999C22.5491 9.99999 24.8683 10.9617 26.6341 12.5325L31.3483 7.81833C28.3716 5.04416 24.39 3.33333 20 3.33333C13.5983 3.33333 8.04663 6.94749 5.25497 12.2425Z"
|
|
101
|
+
fill="#FF3D00"></path>
|
|
102
|
+
<path
|
|
103
|
+
d="M20 36.6667C24.305 36.6667 28.2167 35.0192 31.1742 32.34L26.0159 27.975C24.3425 29.2425 22.2625 30 20 30C15.665 30 11.9842 27.2359 10.5975 23.3784L5.16254 27.5659C7.92087 32.9634 13.5225 36.6667 20 36.6667Z"
|
|
104
|
+
fill="#4CAF50"></path>
|
|
105
|
+
<path
|
|
106
|
+
d="M36.3425 16.7358H35V16.6667H20V23.3333H29.4192C28.7592 25.1975 27.56 26.805 26.0133 27.9758C26.0142 27.975 26.015 27.975 26.0158 27.9742L31.1742 32.3392C30.8092 32.6708 36.6667 28.3333 36.6667 20C36.6667 18.8825 36.5517 17.7917 36.3425 16.7358Z"
|
|
107
|
+
fill="#1976D2"></path>
|
|
108
|
+
</svg>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<span class="w-5/6 px-4 py-3 font-bold text-center"> Увійти через Google</span>
|
|
112
|
+
</a>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
</div>
|
|
116
|
+
</main>
|
|
117
|
+
</body>
|
|
118
|
+
<script>
|
|
119
|
+
const error = location.search.includes('wrong_pass')
|
|
120
|
+
if(error){
|
|
121
|
+
document.getElementById('login_error').innerHTML='Не вірний користувач або пароль';
|
|
122
|
+
}
|
|
123
|
+
</script>
|
|
124
|
+
</html>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<div style="background:#eee;padding:30px;">
|
|
2
|
+
<div
|
|
3
|
+
style="background:#fff;padding: 15px 20px;width: 550px;border: 1px solid #e3e3e5;border-radius:3px;margin: 0 auto;font: normal 13px/19px Verdana;box-shadow: 0 3px 7px rgba(0,0,0,.1);">
|
|
4
|
+
<h2 style="font:normal 21px/48px Arial;color: #222;text-align:center">
|
|
5
|
+
Відновлення паролю
|
|
6
|
+
</h2>
|
|
7
|
+
|
|
8
|
+
<div style="padding: 15px 0;">
|
|
9
|
+
Шановний <b>{{login}}</b>. Ви зробили запит на відновлення пароля на сайті <a
|
|
10
|
+
href="{{{domain}}}/{{{url}}}">{{{domain}}}/{{{url}}}</a>. Для того, щоб отримати новий пароль, перейдіть за
|
|
11
|
+
посиланням та введіть код:
|
|
12
|
+
</div>
|
|
13
|
+
<p style="width: 400px;margin:0 auto;display: block;background: #4CAF50;color: #fff;font-weight:bold; line-height: 44px;text-align: center;text-decoration: none;border-radius: 3px;text-shadow: 0 1px 3px rgba(0,0,0,.35);border: 1px solid #388E3C;box-shadow: inset 0 1px rgba(255,255,255,.4);">
|
|
14
|
+
{{{code}}}
|
|
15
|
+
</p>
|
|
16
|
+
<div style="padding: 15px 0;">
|
|
17
|
+
Якщо ви не робили запит для отримання пароля, просто видаліть цей лист. Ваш пароль зберігається в надійному
|
|
18
|
+
місці та недоступний стороннім особам.
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opengis/fastify-table",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "core-plugins",
|
|
6
6
|
"keywords": [
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"prepublishOnly": "npm run build",
|
|
25
25
|
"clean": "tsc -b --clean",
|
|
26
|
-
"build": "tsc -b --clean && tsc && copyfiles server/plugins/grpc/utils/*.proto dist && copyfiles server/migrations/*.sql dist",
|
|
26
|
+
"build": "tsc -b --clean && tsc && copyfiles server/plugins/grpc/utils/*.proto dist && copyfiles server/migrations/*.sql dist && copyfiles server/templates/**/*.html dist",
|
|
27
27
|
"prod": "NODE_ENV=production bun dist/server",
|
|
28
28
|
"patch": "npm version patch && git push && npm publish",
|
|
29
29
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
30
|
-
"test": "
|
|
30
|
+
"test": "bun test",
|
|
31
31
|
"compress": "node compress.js",
|
|
32
32
|
"dev1": "bun --hot dist/server",
|
|
33
33
|
"dev": "NODE_ENV=production bun start",
|