feat(repositories): list snapshots api

This commit is contained in:
Nicolas Meienberger
2025-10-23 20:22:09 +02:00
parent 4ae738ce41
commit cae8538b2e
9 changed files with 187 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
import React from "react";
import type React from "react";
type ByteSizeProps = {
bytes: number;
@@ -54,7 +54,7 @@ export function formatBytes(
idx = Math.max(0, Math.min(idx, units.length - 1));
}
const numeric = (abs / Math.pow(base, idx)) * sign;
const numeric = (abs / base ** idx) * sign;
const maxFrac = (() => {
if (!smartRounding) return maximumFractionDigits;

View File

@@ -47,9 +47,7 @@ export default function Layout({ loaderData }: Route.ComponentProps) {
<div className="flex items-center gap-4">
<span className="text-sm text-muted-foreground hidden md:inline-flex">
Welcome,&nbsp;
<span className="text-strong-accent">
{loaderData.user?.username[0].toUpperCase() + loaderData.user?.username.slice(1)}
</span>
<span className="text-strong-accent">{loaderData.user?.username}</span>
</span>
<Button variant="default" size="sm" onClick={() => logout.mutate({})} loading={logout.isPending}>
Logout