mirror of
https://github.com/glenndehaan/unifi-voucher-site.git
synced 2026-04-05 08:54:17 -04:00
Removed unused css. Added a robots.txt. Attempt to block iOS from adding invalid telephone link. Added last sync to guest details. Changed DateTimeFormat from en-US to en-GB
This commit is contained in:
@@ -1,28 +1,3 @@
|
|||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
.divider {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
text-align: center;
|
|
||||||
@apply mt-6;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* To show the lines on right
|
|
||||||
and left sides of the text */
|
|
||||||
.divider::after,
|
|
||||||
.divider::before {
|
|
||||||
content: "";
|
|
||||||
flex: 1;
|
|
||||||
@apply border;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Space on left and right sides of text */
|
|
||||||
.divider:not(:empty)::before {
|
|
||||||
margin-right: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.divider:not(:empty)::after {
|
|
||||||
margin-left: 1em;
|
|
||||||
}
|
|
||||||
|
|||||||
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
||||||
@@ -424,7 +424,8 @@ if(webService) {
|
|||||||
timeConvert: time,
|
timeConvert: time,
|
||||||
bytesConvert: bytes,
|
bytesConvert: bytes,
|
||||||
voucher,
|
voucher,
|
||||||
guests
|
guests,
|
||||||
|
updated: cache.updated
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
res.status(404);
|
res.status(404);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="h-full bg-gray-100 dark:bg-gray-900">
|
<html lang="en" class="h-full bg-gray-100 dark:bg-gray-900">
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
|
||||||
<title>Not Found | UniFi Voucher</title>
|
<title>Not Found | UniFi Voucher</title>
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
<dl>
|
<dl>
|
||||||
<div class="py-2 grid grid-cols-3 gap-4 px-0">
|
<div class="py-2 grid grid-cols-3 gap-4 px-0">
|
||||||
<dt class="text-sm font-medium leading-6 text-gray-900 dark:text-white">Code</dt>
|
<dt class="text-sm font-medium leading-6 text-gray-900 dark:text-white">Code</dt>
|
||||||
<dd class="text-sm leading-6 text-gray-600 dark:text-gray-400 col-span-2 mt-0"><%= voucher.code.slice(0, 5) %>-<%= voucher.code.slice(5) %></dd>
|
<dd class="text-sm leading-6 text-gray-600 dark:text-gray-400 col-span-2 mt-0 pointer-events-none no-underline text-inherit"><%= voucher.code.slice(0, 5) %>-<%= voucher.code.slice(5) %></dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="py-2 grid grid-cols-3 gap-4 px-0">
|
<div class="py-2 grid grid-cols-3 gap-4 px-0">
|
||||||
<dt class="text-sm font-medium leading-6 text-gray-900 dark:text-white">Status</dt>
|
<dt class="text-sm font-medium leading-6 text-gray-900 dark:text-white">Status</dt>
|
||||||
@@ -60,13 +60,18 @@
|
|||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="space-y-6 pb-5 pt-6">
|
<div class="space-y-6 pb-5 pt-6">
|
||||||
<div>
|
<div class="grid grid-cols-2">
|
||||||
<h3 class="text-base font-semibold leading-7 text-gray-900 dark:text-white">
|
<div>
|
||||||
Guest Details
|
<h3 class="text-base font-semibold leading-7 text-gray-900 dark:text-white">
|
||||||
</h3>
|
Guest Details
|
||||||
<p class="mt-1 text-sm leading-6 text-gray-600 dark:text-gray-400">
|
</h3>
|
||||||
Guest Details for Voucher.
|
<p class="mt-1 text-sm leading-6 text-gray-600 dark:text-gray-400">
|
||||||
</p>
|
Guest Details for Voucher.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="text-xs text-right self-center italic text-gray-900 dark:text-white">
|
||||||
|
Last Sync:<br/><%= new Intl.DateTimeFormat('en-GB', {dateStyle: 'short', timeStyle: 'short', hour12: false}).format(new Date(updated)) %>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% if(guests.length < 1) { %>
|
<% if(guests.length < 1) { %>
|
||||||
<div>
|
<div>
|
||||||
@@ -109,7 +114,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="text-sm font-medium leading-6 text-gray-600 dark:text-gray-400">
|
<dd class="text-sm font-medium leading-6 text-gray-600 dark:text-gray-400">
|
||||||
<%= new Intl.DateTimeFormat('en-US', {dateStyle: 'short', timeStyle: 'short', hour12: false}).format(new Date(guest.end * 1000)) %>
|
<%= new Intl.DateTimeFormat('en-GB', {dateStyle: 'short', timeStyle: 'short', hour12: false}).format(new Date(guest.end * 1000)) %>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4 flex w-full flex-none gap-x-4 px-6">
|
<div class="mt-4 flex w-full flex-none gap-x-4 px-6">
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="h-full bg-gray-100 dark:bg-gray-900">
|
<html lang="en" class="h-full bg-gray-100 dark:bg-gray-900">
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
|
||||||
<title>Login | UniFi Voucher</title>
|
<title>Login | UniFi Voucher</title>
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en" class="h-full bg-gray-100 dark:bg-gray-900">
|
<html lang="en" class="h-full bg-gray-100 dark:bg-gray-900">
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
|
||||||
<title>Voucher | UniFi Voucher</title>
|
<title>Voucher | UniFi Voucher</title>
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
@@ -102,14 +104,14 @@
|
|||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<a href="<%= baseUrl %>/vouchers?refresh=true" id="reload-vouchers" type="button" class="relative inline-flex items-center gap-x-1.5 rounded-md bg-sky-700 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-sky-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-700">
|
<a href="<%= baseUrl %>/vouchers?refresh=true" id="reload-vouchers" type="button" class="w-fit justify-self-end relative inline-flex items-center gap-x-1.5 rounded-md bg-sky-700 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-sky-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-sky-700">
|
||||||
<svg class="-ml-0.5 h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
<svg class="-ml-0.5 h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
||||||
<path fill-rule="evenodd" d="M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z" clip-rule="evenodd" />
|
<path fill-rule="evenodd" d="M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z" clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
Sync Vouchers
|
Sync Vouchers
|
||||||
</a>
|
</a>
|
||||||
<span class="mt-2 text-xs text-center italic text-gray-900 dark:text-white">
|
<span class="mt-2 text-xs text-center italic text-gray-900 dark:text-white">
|
||||||
Last Sync: <%= new Intl.DateTimeFormat('en-US', {dateStyle: 'short', timeStyle: 'short', hour12: false}).format(new Date(updated)) %>
|
Last Sync: <%= new Intl.DateTimeFormat('en-GB', {dateStyle: 'short', timeStyle: 'short', hour12: false}).format(new Date(updated)) %>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
@@ -137,7 +139,7 @@
|
|||||||
<div class="flex items-center gap-x-3">
|
<div class="flex items-center gap-x-3">
|
||||||
<h2 class="min-w-0 text-sm font-semibold leading-6 text-gray-900 dark:text-white">
|
<h2 class="min-w-0 text-sm font-semibold leading-6 text-gray-900 dark:text-white">
|
||||||
<div class="flex gap-x-2">
|
<div class="flex gap-x-2">
|
||||||
<span class="tabular-nums"><%= voucher.code.slice(0, 5) %>-<%= voucher.code.slice(5) %></span>
|
<span class="tabular-nums pointer-events-none no-underline text-inherit"><%= voucher.code.slice(0, 5) %>-<%= voucher.code.slice(5) %></span>
|
||||||
<% if(voucher.used > 0) { %>
|
<% if(voucher.used > 0) { %>
|
||||||
<div class="rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset bg-yellow-50 text-yellow-800 ring-yellow-600/20 dark:text-yellow-400 dark:bg-yellow-400/10 dark:ring-yellow-400/20">
|
<div class="rounded-full flex-none py-1 px-2 text-xs font-medium ring-1 ring-inset bg-yellow-50 text-yellow-800 ring-yellow-600/20 dark:text-yellow-400 dark:bg-yellow-400/10 dark:ring-yellow-400/20">
|
||||||
In Use
|
In Use
|
||||||
|
|||||||
Reference in New Issue
Block a user