"use client"; import type { ReactNode } from "react"; import { ActionIcon, Alert, Box, Button, CopyButton, Group, Paper, SimpleGrid, Stack, Text, ThemeIcon, Title, } from "@mantine/core"; import { IconArrowsMove, IconBrandCss3, IconBrandDiscord, IconBrandGithub, IconCheck, IconCopy, IconExternalLink, IconHeartHandshake, IconRobot, IconRocket, IconTerminal2, IconWand, IconX, } from "@tabler/icons-react"; import { setClientCookie } from "@homarr/common"; import { createModal, useModalAction } from "@homarr/modals"; import { discordInviteUrl, v2BetaBlogUrl, v2BetaDiscussionUrl, v2BetaFeedbackUrl, v2BetaPreviewUrl } from "./constants"; import classes from "./v2-beta-announcement.module.css"; const diffLineClassNames = { added: classes.diffLine_added, context: classes.diffLine_context, removed: classes.diffLine_removed, } as const; const composeDiffLines = [ { kind: "context", value: " services:" }, { kind: "context", value: " homarr:" }, { kind: "added", value: "+ image: ghcr.io/homarr-labs/homarr-test:v2" }, { kind: "removed", value: "- image: ghcr.io/homarr-labs/homarr:latest" }, { kind: "context", value: " ports:" }, { kind: "context", value: ' - "7575:7575"' }, { kind: "context", value: " volumes:" }, { kind: "context", value: " - homarr-v2:/appdata" }, { kind: "context", value: " environment:" }, { kind: "context", value: " SECRET_ENCRYPTION_KEY: " }, { kind: "context", value: " WORKSHOP_API_URL: https://v2.preview.homarr.dev/ # Only during the beta" }, { kind: "context", value: "" }, { kind: "context", value: " volumes:" }, { kind: "context", value: " homarr-v2:" }, ] as const; const v2ComposeFile = `services: homarr: image: ghcr.io/homarr-labs/homarr-test:v2 ports: - "7575:7575" volumes: - homarr-v2:/appdata environment: SECRET_ENCRYPTION_KEY: WORKSHOP_API_URL: https://v2.preview.homarr.dev/ # Only during the beta volumes: homarr-v2: `; interface V2BetaAnnouncementProps { dismissalCookieName: string; onDismiss: () => void; } export const V2BetaAnnouncement = ({ dismissalCookieName, onDismiss }: V2BetaAnnouncementProps) => { const { openModal } = useModalAction(V2BetaAnnouncementModal); const dismiss = () => { setClientCookie(dismissalCookieName, "dismissed", { maxAge: 60 * 60 * 24 * 365, path: "/", sameSite: "lax", secure: window.location.protocol === "https:", }); onDismiss(); }; return ( We've been cooking, Homarr v2 beta is here Custom Widgets & CSS workshop, new drag-and-drop, new container system, side-bars are back, new widgets and so much more, come check it out and help us make v2 ready for everyone ); }; const V2BetaAnnouncementModal = createModal(() => { const { openModal: openInstallModal } = useModalAction(V2BetaInstallModal); return ( Help us get Homarr v2 ready There is no release date yet. Homarr v2 will become the default when it is ready—and we need you to test it and share feedback before we can be confident enough to make that switch. } title="Homarr Workshop"> Share and discover Custom Widgets and CSS made by the Homarr community. } title="Complete drag-and-drop rewrite"> Move, resize, multi-select, and arrange your dashboard with a board editor rebuilt from the ground up. } title="Custom Widgets v2"> We think you can make almost any widget with live previews, API requests, options, actions, and validation. } title="Homarr Assistant"> Ask questions, find what you need, and manage Homarr through permission-aware tools. } title="Your testing is essential"> Everyone uses Homarr in a different way. We’re counting on you to tell us anything that breaks or doesn’t feel right with this new version. Every report matters. Please use a separate volume for the beta and keep a backup of your current Homarr data. ); }).withOptions({ defaultTitle: "Homarr v2 beta", size: 1000, centered: true, }); const V2BetaInstallModal = createModal(() => ( Run the beta with the separate homarr-v2 volume shown below. Keep a backup, and do not point this prerelease image at the only copy of your production data. Update your Docker Compose file Replace the current image and add the beta-only Workshop URL. The complete example below can be copied as a starting point. docker-compose.yml {({ copied, copy }) => ( )} {composeDiffLines.map((line, index) => ( {line.value || " "} ))} Replace <SECRET_KEY> with your existing encryption key. The Workshop URL is only required while the beta uses the preview Workshop. )).withOptions({ defaultTitle: "Test Homarr v2 on your server", size: 900, centered: true, }); interface FeatureCardProps { icon: ReactNode; title: string; children: ReactNode; } const FeatureCard = ({ icon, title, children }: FeatureCardProps) => ( {icon} {title} {children} );