Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.js",
"config": "",
"css": "src/index.css",
"baseColor": "zinc",
"cssVariables": true,
Expand Down
28 changes: 8 additions & 20 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,10 @@
"prepare": "cd .. && husky frontend/.husky"
},
"dependencies": {
"@fontsource-variable/figtree": "^5.2.10",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, that's cool :) Never heard about that before...

"@fontsource-variable/inter": "^5.2.8",
"@getalby/lightning-tools": "^6.0.0",
"@getalby/sdk": "^7.0.0",
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-alert-dialog": "^1.1.14",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
"@radix-ui/react-dropdown-menu": "^2.1.15",
"@radix-ui/react-label": "^2.1.8",
"@radix-ui/react-navigation-menu": "^1.2.13",
"@radix-ui/react-popover": "^1.1.14",
"@radix-ui/react-progress": "^1.1.7",
"@radix-ui/react-radio-group": "^1.3.8",
"@radix-ui/react-select": "^2.2.5",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-switch": "^1.2.6",
"@radix-ui/react-tabs": "^1.1.12",
"@radix-ui/react-tooltip": "^1.2.7",
"@scure/bip39": "^2.0.1",
"@stepperize/react": "^5.1.9",
"argon2-wasm-esm": "^1.0.3",
Expand All @@ -47,11 +32,13 @@
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"compare-versions": "^6.1.1",
"date-fns": "^4.1.0",
"dayjs": "^1.11.10",
"embla-carousel-react": "^8.6.0",
"lucide-react": "^0.544.0",
"lucide-react": "^0.577.0",
"radix-ui": "^1.4.3",
"react": "18.3.1",
"react-day-picker": "^9.11.0",
"react-day-picker": "^9.14.0",
"react-dom": "18.3.1",
"react-lottie": "^1.2.4",
"react-qr-code": "^2.0.12",
Expand Down Expand Up @@ -92,5 +79,6 @@
"vite": "^5.4.0",
"vite-plugin-pwa": "^1.2.0",
"vite-tsconfig-paths": "^6.1.1"
}
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Binary file removed frontend/public/fonts/Inter-italic.var.woff2
Binary file not shown.
Binary file removed frontend/public/fonts/Inter-roman.var.woff2
Binary file not shown.
2 changes: 1 addition & 1 deletion frontend/src/components/AppSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function AppSidebar() {
<SidebarHeader>
<div className="p-2 flex flex-row items-center justify-between">
<Link to="/home" onClick={() => setOpenMobile(false)}>
<AlbyHubLogo className="w-32" />
<AlbyHubLogo className="h-7" />
</Link>
<div className="flex gap-3 items-center">
<HealthIndicator />
Expand Down
49 changes: 38 additions & 11 deletions frontend/src/components/icons/AlbyHubLogo.tsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function TwoColumnFullScreenLayout() {
/>
<div className="flex-1 w-full h-full flex flex-col">
<div className="flex flex-row justify-between items-center">
<AlbyHubLogo className="w-36" invert={true} />
<AlbyHubLogo monochrome className="h-8" />
{info?.version && (
<p className="text-sm text-muted-foreground">{info.version}</p>
)}
Expand Down
14 changes: 8 additions & 6 deletions frontend/src/components/stepper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Slot } from "@radix-ui/react-slot";
import { Slot } from "radix-ui";
import * as Stepperize from "@stepperize/react";
import { type VariantProps, cva } from "class-variance-authority";
import * as React from "react";
Expand Down Expand Up @@ -226,21 +226,23 @@ const defineStepper = <const Steps extends Stepperize.Step[]>(
Title,
Description,
Panel: ({ children, asChild, ...props }) => {
const Comp = asChild ? Slot : "div";
const Comp = asChild ? Slot.Root : "div";
const { tracking } = useStepperProvider();

return (
<Comp
date-component="stepper-step-panel"
ref={(node) => scrollIntoStepperPanel(node, tracking)}
ref={(node: HTMLDivElement | null) =>
scrollIntoStepperPanel(node, tracking)
}
{...props}
>
{children}
</Comp>
);
},
Controls: ({ children, className, asChild, ...props }) => {
const Comp = asChild ? Slot : "div";
const Comp = asChild ? Slot.Root : "div";
return (
<Comp
date-component="stepper-controls"
Expand All @@ -262,7 +264,7 @@ const Title = ({
asChild,
...props
}: React.ComponentProps<"h4"> & { asChild?: boolean }) => {
const Comp = asChild ? Slot : "h4";
const Comp = asChild ? Slot.Root : "h4";

return (
<Comp
Expand All @@ -282,7 +284,7 @@ const Description = ({
asChild,
...props
}: React.ComponentProps<"p"> & { asChild?: boolean }) => {
const Comp = asChild ? Slot : "p";
const Comp = asChild ? Slot.Root : "p";

return (
<Comp
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from "react";
import * as AccordionPrimitive from "@radix-ui/react-accordion";
import { ChevronDownIcon } from "lucide-react";
import { Accordion as AccordionPrimitive } from "radix-ui";

import { cn } from "src/lib/utils";

Expand Down Expand Up @@ -33,13 +33,13 @@ function AccordionTrigger({
<AccordionPrimitive.Trigger
data-slot="accordion-trigger"
className={cn(
"focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
"flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
className
)}
{...props}
>
{children}
<ChevronDownIcon className="text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200" />
<ChevronDownIcon className="pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
);
Expand All @@ -53,7 +53,7 @@ function AccordionContent({
return (
<AccordionPrimitive.Content
data-slot="accordion-content"
className="data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm"
className="overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
{...props}
>
<div className={cn("pt-0 pb-4", className)}>{children}</div>
Expand Down
75 changes: 57 additions & 18 deletions frontend/src/components/ui/alert-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";

import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
import * as React from "react";
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";

import { cn } from "src/lib/utils";
import { buttonVariants } from "./buttonVariants";
import { Button } from "src/components/ui/button";

function AlertDialog({
...props
Expand Down Expand Up @@ -36,7 +36,7 @@ function AlertDialogOverlay({
<AlertDialogPrimitive.Overlay
data-slot="alert-dialog-overlay"
className={cn(
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
"fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",
className
)}
{...props}
Expand All @@ -46,15 +46,19 @@ function AlertDialogOverlay({

function AlertDialogContent({
className,
size = "default",
...props
}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {
}: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
size?: "default" | "sm";
}) {
return (
<AlertDialogPortal>
<AlertDialogOverlay />
<AlertDialogPrimitive.Content
data-slot="alert-dialog-content"
data-size={size}
className={cn(
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
"group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[size=sm]:max-w-xs data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[size=default]:sm:max-w-lg",
className
)}
{...props}
Expand All @@ -70,7 +74,10 @@ function AlertDialogHeader({
return (
<div
data-slot="alert-dialog-header"
className={cn("flex flex-col gap-2 text-center sm:text-left", className)}
className={cn(
"grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]",
className
)}
{...props}
/>
);
Expand All @@ -84,7 +91,7 @@ function AlertDialogFooter({
<div
data-slot="alert-dialog-footer"
className={cn(
"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
"flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
className
)}
{...props}
Expand All @@ -99,7 +106,10 @@ function AlertDialogTitle({
return (
<AlertDialogPrimitive.Title
data-slot="alert-dialog-title"
className={cn("text-lg font-semibold", className)}
className={cn(
"text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",
className
)}
{...props}
/>
);
Expand All @@ -112,33 +122,61 @@ function AlertDialogDescription({
return (
<AlertDialogPrimitive.Description
data-slot="alert-dialog-description"
className={cn("text-muted-foreground text-sm", className)}
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
);
}

function AlertDialogAction({
function AlertDialogMedia({
className,
...props
}: React.ComponentProps<typeof AlertDialogPrimitive.Action>) {
}: React.ComponentProps<"div">) {
return (
<AlertDialogPrimitive.Action
className={cn(buttonVariants(), className)}
<div
data-slot="alert-dialog-media"
className={cn(
"mb-2 inline-flex size-16 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",
className
)}
{...props}
/>
);
}

function AlertDialogAction({
className,
variant = "default",
size = "default",
...props
}: React.ComponentProps<typeof AlertDialogPrimitive.Action> &
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
return (
<Button variant={variant} size={size} asChild>
<AlertDialogPrimitive.Action
data-slot="alert-dialog-action"
className={cn(className)}
{...props}
/>
</Button>
);
}

function AlertDialogCancel({
className,
variant = "outline",
size = "default",
...props
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {
}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> &
Pick<React.ComponentProps<typeof Button>, "variant" | "size">) {
return (
<AlertDialogPrimitive.Cancel
className={cn(buttonVariants({ variant: "outline" }), className)}
{...props}
/>
<Button variant={variant} size={size} asChild>
<AlertDialogPrimitive.Cancel
data-slot="alert-dialog-cancel"
className={cn(className)}
{...props}
/>
</Button>
);
}

Expand All @@ -150,6 +188,7 @@ export {
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogMedia,
AlertDialogOverlay,
AlertDialogPortal,
AlertDialogTitle,
Expand Down
14 changes: 6 additions & 8 deletions frontend/src/components/ui/alert.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
import { cva, type VariantProps } from "class-variance-authority";
import * as React from "react";
import { cva, type VariantProps } from "class-variance-authority";

import { cn } from "src/lib/utils";

const alertVariants = cva(
"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
{
variants: {
variant: {
default: "bg-card text-card-foreground",
destructive:
"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",

/* Custom variants */
"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
warning:
"border-warning-foreground border text-warning-foreground [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",
"border-warning-foreground border text-warning-foreground *:data-[slot=alert-description]:text-warning-foreground/90 [&>svg]:text-current",
},
},
defaultVariants: {
Expand Down Expand Up @@ -59,12 +57,12 @@ function AlertDescription({
<div
data-slot="alert-description"
className={cn(
"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",
"col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",
className
)}
{...props}
/>
);
}

export { Alert, AlertDescription, AlertTitle };
export { Alert, AlertTitle, AlertDescription };
Loading
Loading