Show credential placeholder on empty page (#177)

This commit is contained in:
Leendert de Borst
2024-10-28 14:11:07 +01:00
parent 0631daf61b
commit ce93c01039
3 changed files with 50 additions and 67 deletions

View File

@@ -19,6 +19,15 @@
}
<div class="grid gap-4 px-4 mb-4 md:grid-cols-4 xl:grid-cols-6">
@if (Credentials.Count == 0)
{
<div class="credential-card col-span-full p-4 space-y-2 bg-white border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 dark:bg-gray-800">
<div class="px-4 py-6 text-gray-500 dark:text-gray-400 rounded text-center flex flex-col items-center">
<p class="mb-2">No credentials yet</p>
<p class="text-sm mb-4">Create your first credential using the <span class="hidden md:inline">"+ New Alias"</span><span class="md:hidden">"+"</span> button in the top right corner.</p>
</div>
</div>
}
@foreach (var credential in Credentials)
{
<CredentialCard Obj="@credential"/>

View File

@@ -55,7 +55,10 @@ else
</div>
<div class="col-span-2">
<div class="p-4 mb-4 bg-white border border-gray-200 rounded-lg shadow-sm 2xl:col-span-2 dark:border-gray-700 sm:p-6 dark:bg-gray-800">
<h3 class="mb-4 text-xl font-semibold dark:text-white">Login credentials</h3>
<h3 class="mb-2 text-xl font-semibold dark:text-white">Login credentials</h3>
<p class="mb-4 text-sm text-gray-600 dark:text-gray-400">
Use the generated credentials below to create your account. Any emails sent to the shown address will automatically appear on this page.
</p>
<form action="#">
<div class="grid gap-6">
<div class="col-span-6 sm:col-span-3">

View File

@@ -765,6 +765,10 @@ video {
margin-left: 0.75rem;
}
.ml-6 {
margin-left: 1.5rem;
}
.ml-auto {
margin-left: auto;
}
@@ -833,10 +837,6 @@ video {
margin-top: 2rem;
}
.ml-6 {
margin-left: 1.5rem;
}
.line-clamp-2 {
overflow: hidden;
display: -webkit-box;
@@ -1064,6 +1064,10 @@ video {
list-style-position: inside;
}
.list-decimal {
list-style-type: decimal;
}
.list-disc {
list-style-type: disc;
}
@@ -1072,10 +1076,6 @@ video {
list-style-type: none;
}
.list-decimal {
list-style-type: decimal;
}
.grid-cols-1 {
grid-template-columns: repeat(1, minmax(0, 1fr));
}
@@ -1136,10 +1136,6 @@ video {
gap: 1.5rem;
}
.gap-8 {
gap: 2rem;
}
.space-x-1 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(0.25rem * var(--tw-space-x-reverse));
@@ -1176,6 +1172,12 @@ video {
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}
.space-y-3 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
@@ -1188,12 +1190,6 @@ video {
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}
.space-y-3 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}
.divide-y > :not([hidden]) ~ :not([hidden]) {
--tw-divide-y-reverse: 0;
border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));
@@ -1361,11 +1357,6 @@ video {
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
}
.bg-blue-600 {
--tw-bg-opacity: 1;
background-color: rgb(37 99 235 / var(--tw-bg-opacity));
}
.bg-gray-100 {
--tw-bg-opacity: 1;
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
@@ -1604,6 +1595,11 @@ video {
padding-bottom: 1rem;
}
.py-6 {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
.pb-28 {
padding-bottom: 7rem;
}
@@ -1900,12 +1896,6 @@ video {
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-md {
--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.shadow-sm {
--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
@@ -1999,11 +1989,6 @@ video {
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
}
.hover\:bg-gray-500:hover {
--tw-bg-opacity: 1;
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
}
.hover\:bg-gray-800:hover {
--tw-bg-opacity: 1;
background-color: rgb(31 41 55 / var(--tw-bg-opacity));
@@ -2353,6 +2338,11 @@ video {
--tw-gradient-to: #f49541 var(--tw-gradient-to-position);
}
.dark\:text-blue-200:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(191 219 254 / var(--tw-text-opacity));
}
.dark\:text-blue-400:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(96 165 250 / var(--tw-text-opacity));
@@ -2413,21 +2403,16 @@ video {
color: rgb(255 255 255 / var(--tw-text-opacity));
}
.dark\:text-yellow-400:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(250 204 21 / var(--tw-text-opacity));
}
.dark\:text-blue-200:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(191 219 254 / var(--tw-text-opacity));
}
.dark\:text-yellow-100:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(254 249 195 / var(--tw-text-opacity));
}
.dark\:text-yellow-400:is(.dark *) {
--tw-text-opacity: 1;
color: rgb(250 204 21 / var(--tw-text-opacity));
}
.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder {
--tw-placeholder-opacity: 1;
color: rgb(156 163 175 / var(--tw-placeholder-opacity));
@@ -2631,29 +2616,11 @@ video {
line-height: 2rem;
}
.sm\:text-4xl {
font-size: 2.25rem;
line-height: 2.5rem;
}
.sm\:text-sm {
font-size: 0.875rem;
line-height: 1.25rem;
}
.sm\:text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
.sm\:leading-none {
line-height: 1;
}
.sm\:tracking-tight {
letter-spacing: -0.025em;
}
.sm\:shadow-xl {
--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
@@ -2674,6 +2641,10 @@ video {
display: inline;
}
.md\:hidden {
display: none;
}
.md\:h-screen {
height: 100vh;
}
@@ -2774,14 +2745,14 @@ video {
width: auto;
}
.lg\:max-w-xl {
max-width: 36rem;
}
.lg\:max-w-4xl {
max-width: 56rem;
}
.lg\:max-w-xl {
max-width: 36rem;
}
.lg\:grid-cols-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}