Lifecycle planning, and consistent empty and loading states
- Inventory: end of support and replacement cost per asset; a Lifecycle page showing what ages out year by year and what replacing it will cost; support ending within 90 days in the weekly digest - Lists: a shared empty state saying what is missing, why, and the one thing to do; "nothing matches" with a clear button; skeleton rows instead of empty-looking lists while loading Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
92726568b7
commit
846af02851
50 files changed
+4434
-233
No files matched your search
+5
-16
@@ -20,6 +20,7 @@ import { downloadCsv } from "../utils/csv";
|
||||
import { confirmDialog } from "../utils/dialogs";
|
||||
import { ErrorNotice } from "../components/Notice";
|
||||
import { toast } from "../utils/toast";
|
||||
import { EmptyRow, LoadingRow } from "../components/EmptyState";
|
||||
|
||||
const PROVIDER_LABELS: Record<DnsProviderType, string> = {
|
||||
cloudflare: "Cloudflare",
|
||||
@@ -348,12 +349,9 @@ export default function Dns({ user }: { user: CurrentUser }) {
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
{providers === null && <LoadingRow colSpan={4} />}
|
||||
{sortedProviders?.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={4} className="text-secondary text-center">
|
||||
No DNS providers configured yet.
|
||||
</td>
|
||||
</tr>
|
||||
<EmptyRow colSpan={4} title="No DNS providers yet" hint="Connect Cloudflare, Loopia, Pi-hole, Azure DNS, cPanel or Technitium to see its zones and records here, and to have names matched to your servers." />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -446,11 +444,7 @@ export default function Dns({ user }: { user: CurrentUser }) {
|
||||
</tr>
|
||||
))}
|
||||
{sortedZones && sortedZones.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={3} className="text-secondary text-center">
|
||||
No zones found for this provider.
|
||||
</td>
|
||||
</tr>
|
||||
<EmptyRow colSpan={3} title="No zones found" hint="The provider answered with none. Check that its credentials can see the zones, or sync it again." />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -607,12 +601,7 @@ export default function Dns({ user }: { user: CurrentUser }) {
|
||||
</tr>
|
||||
))}
|
||||
{sortedRecords?.length === 0 && (
|
||||
<tr>
|
||||
<td colSpan={canEdit ? 5 : 4} className="text-secondary text-center">
|
||||
No cached records.{" "}
|
||||
{syncedAt === null ? "Sync this zone to fetch them." : ""}
|
||||
</td>
|
||||
</tr>
|
||||
<EmptyRow colSpan={canEdit ? 5 : 4} title="No records cached" hint={syncedAt === null ? "Sync this zone to fetch its records from the provider." : "This zone has no records."} action={canEdit ? { label: "Add a record", onClick: startAddRecord } : undefined} />
|
||||
)}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in new issue
Block a user