Skip to content

Commit

Permalink
fix: status section
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Mar 14, 2024
1 parent 82fd35c commit 160e4ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions web/sub-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,27 @@
<div class="flex justify-center m-1">
<form class="space-y-2 max-w-[800px] grow">
<div class="flex">
<label for="id" style="padding-top: 0.125rem">Id</label>
<label for="id" style="margin-top: 0.125rem">Id</label>
<input type="text" readonly="readonly" id="id" class="ml-2">
</div>
<div class="flex flex-col">

<div class="flex">
<label for="description" class="w-20" style="padding-top: 0.125rem">Description</label>
<label for="description" class="w-20" style="margin-top: 0.125rem">Description</label>
<input type="text" id="description">
</div>

<div class="flex">
<label for="expires" style="margin-top: 0.125rem" class="pt-2 w-20 flex">Expires</label>
<div class="mt-2 mr-4">
<input type="date" id="expires" class="border outline-none border-slate-400 dark:border-slate-700 dark:background-gray-800"/>
<label for="expires" class="pt-2 w-20 flex" style="margin-top: 0.125rem">Expires</label>
<div class="mt-2 mr-2">
<input type="datetime-local" id="expires" class="border outline-none border-slate-400 dark:border-slate-700 dark:background-gray-800"/>
<div class="w-20" id="expires-never" style="margin-top: 0.125rem; display: none">Never</div>
</div>
</div>

<div class="flex">
<label for="enabled" class="pt-2 w-20" style="margin-top: 0.125rem">Enabled</label>
<input type="checkbox" id="enabled" class="je-checkbox mt-2"/>
<label for="enabled" style="margin-top: 0.125rem" class="pt-2 w-20">Enabled</label>
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion web/sub-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function loadSubscription() {
document.getElementById("enabled").checked = data.enabled;
const expires = new Date(data.expires);
if (!isNaN(expires) && expires > 0) {
document.getElementById("expires").value = expires;
document.getElementById("expires").value = data.expires;
document.getElementById("expires").style.display = "block";
document.getElementById("expires-never").style.display = "none";
} else {
Expand Down

0 comments on commit 160e4ca

Please sign in to comment.