feat(onboarding): polish setup experience
This commit is contained in:
1 parent
f4891447d3
commit
4ca02a9133
34 files changed
+1005
-1172
No files matched your search
@@ -126,6 +126,9 @@ const CredentialsSetup = () => {
|
||||
passwordInputProps={{ ...form.getInputProps("password"), autoComplete: "new-password" }}
|
||||
confirmPasswordInputProps={{ ...form.getInputProps("confirmPassword"), autoComplete: "new-password" }}
|
||||
/>
|
||||
<Text size="sm" c="dimmed" my="xs">
|
||||
{t("passwordHint")}
|
||||
</Text>
|
||||
{submitError ? (
|
||||
<Alert color="red" title={t("errorTitle")}>
|
||||
{submitError}
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { isHttpUrl, normalizeServiceUrl, resolveDiscoveredAppUrl, takeNewSourceIds } from "./discovery-selection";
|
||||
import {
|
||||
isHttpUrl,
|
||||
normalizeServiceUrl,
|
||||
resolveDiscoveredAppUrl,
|
||||
resolveIntegrationDraftUrl,
|
||||
takeNewSourceIds,
|
||||
} from "./discovery-selection";
|
||||
|
||||
describe("takeNewSourceIds", () => {
|
||||
it("keeps same-kind service instances independent and does not reselect them after refresh", () => {
|
||||
@@ -22,6 +28,25 @@ describe("takeNewSourceIds", () => {
|
||||
expect(resolveDiscoveredAppUrl(undefined, null, null)).toBe("");
|
||||
});
|
||||
|
||||
it("regenerates integration URLs from the usual server address without replacing manual edits", () => {
|
||||
expect(
|
||||
resolveIntegrationDraftUrl({
|
||||
currentUrl: "http://docker-host:8989",
|
||||
overridden: false,
|
||||
serverUrl: "http://home.lan:8989",
|
||||
fallbackUrl: "http://docker-host:8989",
|
||||
}),
|
||||
).toBe("http://home.lan:8989");
|
||||
expect(
|
||||
resolveIntegrationDraftUrl({
|
||||
currentUrl: "https://sonarr.custom.example",
|
||||
overridden: true,
|
||||
serverUrl: "http://home.lan:8989",
|
||||
fallbackUrl: "http://docker-host:8989",
|
||||
}),
|
||||
).toBe("https://sonarr.custom.example");
|
||||
});
|
||||
|
||||
it("normalizes HTTP, HTTPS, and bare self-hosted service addresses", () => {
|
||||
expect(isHttpUrl("http://home.lan:8989")).toBe(true);
|
||||
expect(isHttpUrl("https://home.example/sonarr")).toBe(true);
|
||||
|
||||
@@ -11,6 +11,18 @@ export const resolveDiscoveredAppUrl = (
|
||||
generatedUrl: string | null,
|
||||
) => override ?? suggestedUrl ?? generatedUrl ?? "";
|
||||
|
||||
export const resolveIntegrationDraftUrl = ({
|
||||
currentUrl,
|
||||
overridden,
|
||||
serverUrl,
|
||||
fallbackUrl,
|
||||
}: {
|
||||
currentUrl: string;
|
||||
overridden: boolean;
|
||||
serverUrl: string | null;
|
||||
fallbackUrl: string | null;
|
||||
}) => (overridden ? currentUrl : serverUrl || fallbackUrl || "");
|
||||
|
||||
export const normalizeServiceUrl = (value: string) => {
|
||||
try {
|
||||
const trimmed = value.trim();
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { Alert, Button, Group, Paper, SimpleGrid, Stack, Text, ThemeIcon, Title } from "@mantine/core";
|
||||
import { IconArrowRight, IconBook2, IconLayoutDashboard, IconSparkles, IconTool } from "@tabler/icons-react";
|
||||
import { motion, useReducedMotion } from "motion/react";
|
||||
import { Button, Group, Paper, SimpleGrid, Stack, Text, ThemeIcon, Title } from "@mantine/core";
|
||||
import { IconArrowRight, IconBook2, IconSparkles, IconTool } from "@tabler/icons-react";
|
||||
|
||||
import { createDocumentationLink } from "@homarr/definitions";
|
||||
import { useScopedI18n } from "@homarr/translation/client";
|
||||
@@ -13,7 +12,6 @@ import classes from "./onboarding-studio.module.css";
|
||||
|
||||
export const Finish = ({ environment }: OnboardingStudioProps) => {
|
||||
const t = useScopedI18n("init.studio.finish");
|
||||
const reduceMotion = useReducedMotion();
|
||||
const boardHref = `/boards/${encodeURIComponent(environment.initialBoard?.name ?? "dashboard")}`;
|
||||
const destination = environment.canConfigurePrivileged ? boardHref : "/auth/login?callbackUrl=%2Finit";
|
||||
|
||||
@@ -21,22 +19,14 @@ export const Finish = ({ environment }: OnboardingStudioProps) => {
|
||||
<main className={classes.page}>
|
||||
<div className={classes.shell}>
|
||||
<Stack mih="calc(100dvh - 6rem)" justify="center" align="center">
|
||||
<motion.div
|
||||
initial={reduceMotion ? false : { opacity: 0, y: 22, scale: 0.97 }}
|
||||
animate={{ opacity: 1, y: 0, scale: 1 }}
|
||||
transition={{ duration: 0.4 }}
|
||||
style={{ width: "100%", maxWidth: "52rem" }}
|
||||
>
|
||||
<div style={{ width: "100%", maxWidth: "52rem" }}>
|
||||
<Paper className={classes.studio} radius="lg" p={{ base: "lg", sm: "xl" }}>
|
||||
<Stack gap="xl" align="center">
|
||||
<motion.div
|
||||
animate={reduceMotion ? undefined : { rotate: [0, 7, -7, 0], scale: [1, 1.08, 1] }}
|
||||
transition={{ duration: 2.8, repeat: Infinity, repeatDelay: 1.4 }}
|
||||
>
|
||||
<div>
|
||||
<ThemeIcon size={78} radius="xl" variant="light" color="green">
|
||||
<IconSparkles size={36} />
|
||||
</ThemeIcon>
|
||||
</motion.div>
|
||||
</div>
|
||||
<Stack gap="xs" align="center">
|
||||
<Title ta="center">{t("title")}</Title>
|
||||
<Text c="dimmed" ta="center" maw="42rem">
|
||||
@@ -46,9 +36,6 @@ export const Finish = ({ environment }: OnboardingStudioProps) => {
|
||||
<Button component={Link} href={destination} size="lg" rightSection={<IconArrowRight size={18} />}>
|
||||
{t("openBoard")}
|
||||
</Button>
|
||||
<Alert variant="light" w="100%" icon={<IconLayoutDashboard size={18} />}>
|
||||
{t("tutorial")}
|
||||
</Alert>
|
||||
<SimpleGrid cols={{ base: 1, sm: 3 }} w="100%">
|
||||
<NextCard
|
||||
icon={IconTool}
|
||||
@@ -72,7 +59,7 @@ export const Finish = ({ environment }: OnboardingStudioProps) => {
|
||||
</SimpleGrid>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</motion.div>
|
||||
</div>
|
||||
</Stack>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
.page {
|
||||
--studio-surface: color-mix(in srgb, var(--mantine-color-body) 92%, transparent);
|
||||
--studio-glow-color: var(--mantine-primary-color-filled);
|
||||
--studio-secondary-glow-color: var(--mantine-color-orange-6);
|
||||
min-height: 100dvh;
|
||||
overflow-x: clip;
|
||||
position: relative;
|
||||
background:
|
||||
radial-gradient(
|
||||
circle at 10% 10%,
|
||||
color-mix(in srgb, var(--mantine-primary-color-filled) 14%, transparent),
|
||||
color-mix(in srgb, var(--studio-glow-color) 14%, transparent),
|
||||
transparent 34rem
|
||||
),
|
||||
radial-gradient(
|
||||
circle at 90% 5%,
|
||||
color-mix(in srgb, var(--mantine-color-orange-6) 10%, transparent),
|
||||
color-mix(in srgb, var(--studio-secondary-glow-color) 10%, transparent),
|
||||
transparent 30rem
|
||||
),
|
||||
var(--mantine-color-body);
|
||||
@@ -20,19 +22,22 @@
|
||||
.page::before {
|
||||
content: "";
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
inset: -2rem;
|
||||
pointer-events: none;
|
||||
opacity: 0.22;
|
||||
background-image: radial-gradient(circle, var(--mantine-color-dimmed) 0.7px, transparent 0.7px);
|
||||
background-size: 24px 24px;
|
||||
mask-image: linear-gradient(to bottom, black, transparent 75%);
|
||||
opacity: 0.28;
|
||||
background-image:
|
||||
linear-gradient(color-mix(in srgb, var(--mantine-color-dimmed) 28%, transparent) 1px, transparent 1px),
|
||||
linear-gradient(90deg, color-mix(in srgb, var(--mantine-color-dimmed) 28%, transparent) 1px, transparent 1px);
|
||||
background-size: 32px 32px;
|
||||
filter: blur(0.35px);
|
||||
mask-image: radial-gradient(ellipse 66% 86% at center, transparent 22%, black 88%);
|
||||
}
|
||||
|
||||
.shell {
|
||||
position: relative;
|
||||
width: min(100% - 2rem, 76rem);
|
||||
margin-inline: auto;
|
||||
padding-block: clamp(1rem, 3vw, 2.5rem) 5rem;
|
||||
padding-block: clamp(1rem, 3vw, 2.5rem) calc(6rem + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.topbar {
|
||||
@@ -42,31 +47,33 @@
|
||||
|
||||
.wordmark {
|
||||
display: block;
|
||||
width: clamp(9.5rem, 22vw, 14rem);
|
||||
height: auto;
|
||||
padding: 0.4rem 0.55rem;
|
||||
border-radius: var(--mantine-radius-md);
|
||||
background: rgba(12, 12, 14, 0.86);
|
||||
filter: drop-shadow(0 0.8rem 1.6rem color-mix(in srgb, black 22%, transparent));
|
||||
width: auto;
|
||||
height: 3.5rem;
|
||||
}
|
||||
|
||||
.onboardingWordmark {
|
||||
height: clamp(5rem, 12vw, 7rem);
|
||||
max-width: min(70vw, 28rem);
|
||||
}
|
||||
|
||||
:global([data-mantine-color-scheme="light"]) .wordmark {
|
||||
filter: brightness(0);
|
||||
}
|
||||
|
||||
.hero {
|
||||
min-height: calc(100dvh - 8rem);
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
|
||||
align-items: center;
|
||||
gap: clamp(2rem, 6vw, 6rem);
|
||||
margin-inline: auto;
|
||||
max-width: 42rem;
|
||||
padding-block: 5rem 3rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.heroTitle {
|
||||
font-size: clamp(2.5rem, 7vw, 5.8rem);
|
||||
line-height: 0.94;
|
||||
letter-spacing: -0.04em;
|
||||
font-size: 3.5rem;
|
||||
line-height: 1.05;
|
||||
letter-spacing: -0.03em;
|
||||
text-wrap: balance;
|
||||
max-width: 11ch;
|
||||
}
|
||||
|
||||
.heroPanel,
|
||||
.studio {
|
||||
background: var(--studio-surface);
|
||||
backdrop-filter: blur(18px);
|
||||
@@ -74,54 +81,13 @@
|
||||
box-shadow: var(--mantine-shadow-sm);
|
||||
}
|
||||
|
||||
.heroPanel {
|
||||
position: relative;
|
||||
min-height: 27rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.orbit {
|
||||
position: absolute;
|
||||
inset: 50% auto auto 50%;
|
||||
width: 18rem;
|
||||
height: 18rem;
|
||||
margin: -9rem;
|
||||
border-radius: 50%;
|
||||
border: 1px solid color-mix(in srgb, var(--mantine-primary-color-filled) 35%, transparent);
|
||||
}
|
||||
|
||||
.orbitItem {
|
||||
position: absolute;
|
||||
width: 3.25rem;
|
||||
height: 3.25rem;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: var(--mantine-radius-lg);
|
||||
background: var(--mantine-color-body);
|
||||
border: 1px solid var(--mantine-color-default-border);
|
||||
box-shadow: var(--mantine-shadow-md);
|
||||
}
|
||||
|
||||
.orbitItem:nth-child(1) {
|
||||
inset: -1.6rem auto auto calc(50% - 1.6rem);
|
||||
}
|
||||
.orbitItem:nth-child(2) {
|
||||
inset: calc(50% - 1.6rem) -1.6rem auto auto;
|
||||
}
|
||||
.orbitItem:nth-child(3) {
|
||||
inset: auto auto -1.6rem calc(50% - 1.6rem);
|
||||
}
|
||||
.orbitItem:nth-child(4) {
|
||||
inset: calc(50% - 1.6rem) auto auto -1.6rem;
|
||||
}
|
||||
|
||||
.studio {
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
.studioGrid {
|
||||
display: grid;
|
||||
grid-template-columns: 17rem minmax(0, 1fr);
|
||||
grid-template-columns: 15rem minmax(0, 1fr);
|
||||
min-height: 40rem;
|
||||
}
|
||||
|
||||
@@ -131,30 +97,38 @@
|
||||
background: color-mix(in srgb, var(--mantine-color-default) 40%, transparent);
|
||||
}
|
||||
|
||||
.railButton {
|
||||
.timeline {
|
||||
width: 100%;
|
||||
min-height: 3.25rem;
|
||||
padding: 0.65rem 0.75rem;
|
||||
}
|
||||
|
||||
.timelineBullet {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.timelineButton {
|
||||
width: calc(100% + 2.75rem);
|
||||
min-height: 2.75rem;
|
||||
margin-inline-start: -2.75rem;
|
||||
padding: 0.15rem 0.25rem;
|
||||
padding-inline-start: 2.75rem;
|
||||
border-radius: var(--mantine-radius-md);
|
||||
color: var(--mantine-color-dimmed);
|
||||
transition:
|
||||
background-color 150ms ease,
|
||||
color 150ms ease,
|
||||
transform 150ms ease;
|
||||
}
|
||||
|
||||
.railButton[data-active="true"] {
|
||||
.timelineButton[data-active="true"] {
|
||||
color: var(--mantine-color-text);
|
||||
background: var(--mantine-color-default-hover);
|
||||
}
|
||||
|
||||
.railButton:focus-visible {
|
||||
.timelineButton:focus-visible {
|
||||
outline: 2px solid var(--mantine-primary-color-filled);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
min-height: 100%;
|
||||
padding: clamp(1rem, 3vw, 2rem);
|
||||
}
|
||||
|
||||
@@ -163,12 +137,6 @@
|
||||
border: 1px solid color-mix(in srgb, var(--mantine-color-default-border) 76%, transparent);
|
||||
}
|
||||
|
||||
.discoveryChoice {
|
||||
transition:
|
||||
border-color 150ms ease,
|
||||
background-color 150ms ease;
|
||||
}
|
||||
|
||||
.discoveryChoice[data-checked] {
|
||||
border-color: var(--mantine-primary-color-filled);
|
||||
background: color-mix(in srgb, var(--mantine-primary-color-light) 62%, var(--mantine-color-body));
|
||||
@@ -179,6 +147,10 @@
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.integrationStatus {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.choiceGrid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
@@ -192,10 +164,6 @@
|
||||
border: 1px solid var(--mantine-color-default-border);
|
||||
background: var(--mantine-color-body);
|
||||
padding: var(--mantine-spacing-md);
|
||||
transition:
|
||||
border-color 150ms ease,
|
||||
background-color 150ms ease,
|
||||
transform 150ms ease;
|
||||
}
|
||||
|
||||
.choice[data-selected="true"] {
|
||||
@@ -203,10 +171,6 @@
|
||||
background: color-mix(in srgb, var(--mantine-primary-color-light) 70%, var(--mantine-color-body));
|
||||
}
|
||||
|
||||
.choice:hover {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.choice:focus-visible {
|
||||
outline: 3px solid var(--mantine-primary-color-light-color);
|
||||
outline-offset: 2px;
|
||||
@@ -220,21 +184,15 @@
|
||||
padding: 0.6rem;
|
||||
overflow: hidden;
|
||||
border-radius: var(--mantine-radius-lg);
|
||||
background: color-mix(in srgb, var(--mantine-color-default) 66%, transparent);
|
||||
background: var(--mantine-color-default);
|
||||
border: 1px solid var(--mantine-color-default-border);
|
||||
}
|
||||
|
||||
.preview[data-layout-role="mobile"] {
|
||||
width: min(100%, 28rem);
|
||||
margin-inline: auto;
|
||||
aspect-ratio: 4 / 3;
|
||||
}
|
||||
|
||||
.previewLane {
|
||||
min-width: 0;
|
||||
border-radius: calc(var(--mantine-radius-lg) * 0.65);
|
||||
background: color-mix(in srgb, var(--mantine-color-body) 88%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--mantine-color-default-border) 70%, transparent);
|
||||
background: var(--mantine-color-body);
|
||||
border: 1px solid var(--mantine-color-default-border);
|
||||
padding: 0.35rem;
|
||||
}
|
||||
|
||||
@@ -248,62 +206,28 @@
|
||||
|
||||
.previewTile {
|
||||
border-radius: calc(var(--mantine-radius-lg) * 0.45);
|
||||
background: linear-gradient(
|
||||
135deg,
|
||||
var(--mantine-primary-color-light),
|
||||
color-mix(in srgb, var(--mantine-color-orange-light) 60%, transparent)
|
||||
);
|
||||
border: 1px solid color-mix(in srgb, var(--mantine-primary-color-filled) 22%, transparent);
|
||||
}
|
||||
|
||||
.assistantStage {
|
||||
position: relative;
|
||||
min-height: 13rem;
|
||||
overflow: hidden;
|
||||
border-radius: var(--mantine-radius-lg);
|
||||
background: color-mix(in srgb, var(--mantine-primary-color-light) 44%, var(--mantine-color-body));
|
||||
}
|
||||
|
||||
.assistantGlow {
|
||||
position: absolute;
|
||||
inset: 50% auto auto 50%;
|
||||
width: 12rem;
|
||||
height: 12rem;
|
||||
margin: -6rem;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(
|
||||
circle,
|
||||
color-mix(in srgb, var(--mantine-primary-color-filled) 35%, transparent),
|
||||
transparent 68%
|
||||
);
|
||||
background: var(--mantine-color-default);
|
||||
border: 1px solid var(--mantine-color-default-border);
|
||||
}
|
||||
|
||||
.stickyActions {
|
||||
position: sticky;
|
||||
z-index: 2;
|
||||
bottom: 0;
|
||||
margin: 1.5rem -2rem -2rem;
|
||||
margin: auto -2rem -2rem;
|
||||
padding: 1rem 2rem;
|
||||
background: color-mix(in srgb, var(--mantine-color-body) 92%, transparent);
|
||||
border-top: 1px solid var(--mantine-color-default-border);
|
||||
backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
.applyError {
|
||||
margin-top: var(--mantine-spacing-lg);
|
||||
}
|
||||
|
||||
.nextCard {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition:
|
||||
background-color 150ms ease,
|
||||
transform 150ms ease;
|
||||
}
|
||||
|
||||
.nextCard:hover {
|
||||
background: var(--mantine-color-default-hover);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.nextCard:focus-visible {
|
||||
@@ -312,12 +236,54 @@
|
||||
}
|
||||
|
||||
.content :global(.mantine-Button-root),
|
||||
.content :global(.mantine-SegmentedControl-label),
|
||||
.page :global(.mantine-Input-input),
|
||||
.page :global(.mantine-Tabs-tab) {
|
||||
min-height: 2.75rem;
|
||||
}
|
||||
|
||||
.floatingControlScroller {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.floatingControlRoot {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: max-content;
|
||||
min-width: 100%;
|
||||
padding: 0.2rem;
|
||||
border-radius: var(--mantine-radius-md);
|
||||
background: var(--mantine-color-default);
|
||||
}
|
||||
|
||||
.floatingControlIndicator {
|
||||
border: 1px solid var(--mantine-color-default-border);
|
||||
border-radius: calc(var(--mantine-radius-md) - 0.2rem);
|
||||
background: var(--mantine-color-body);
|
||||
box-shadow: var(--mantine-shadow-xs);
|
||||
}
|
||||
|
||||
.floatingControl {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
flex: 1 0 auto;
|
||||
min-height: 2.25rem;
|
||||
padding-inline: var(--mantine-spacing-sm);
|
||||
border-radius: calc(var(--mantine-radius-md) - 0.2rem);
|
||||
color: var(--mantine-color-dimmed);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.floatingControl[data-active="true"] {
|
||||
color: var(--mantine-color-text);
|
||||
}
|
||||
|
||||
.floatingControl:focus-visible {
|
||||
outline: 2px solid var(--mantine-primary-color-filled);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.page :global(.mantine-Switch-body) {
|
||||
min-height: 2.75rem;
|
||||
align-items: center;
|
||||
@@ -325,32 +291,15 @@
|
||||
|
||||
@media (max-width: 62em) {
|
||||
.hero {
|
||||
grid-template-columns: 1fr;
|
||||
padding-block: 3rem;
|
||||
}
|
||||
|
||||
.heroPanel {
|
||||
min-height: 22rem;
|
||||
}
|
||||
|
||||
.studioGrid {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-columns: 12rem minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.rail {
|
||||
border-right: 0;
|
||||
border-bottom: 1px solid var(--mantine-color-default-border);
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.railList {
|
||||
min-width: max-content;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.railButton {
|
||||
width: auto;
|
||||
min-width: 10rem;
|
||||
padding-inline: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -360,7 +309,7 @@
|
||||
}
|
||||
|
||||
.heroTitle {
|
||||
font-size: clamp(2.35rem, 14vw, 4.5rem);
|
||||
font-size: 2.75rem;
|
||||
}
|
||||
|
||||
.choiceGrid {
|
||||
@@ -371,8 +320,25 @@
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.studioGrid {
|
||||
grid-template-columns: 3.75rem minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.rail {
|
||||
padding: 1rem 0.5rem;
|
||||
}
|
||||
|
||||
.timelineLabel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.timelineButton {
|
||||
min-height: 2rem;
|
||||
padding-inline-start: 2.75rem;
|
||||
}
|
||||
|
||||
.stickyActions {
|
||||
margin: 1rem -1rem -1rem;
|
||||
margin: auto -1rem -1rem;
|
||||
padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
@@ -384,10 +350,6 @@
|
||||
flex: 1 1 12rem;
|
||||
}
|
||||
|
||||
.content :global(.mantine-SegmentedControl-root) {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.content :global(.mantine-Tabs-list) {
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
@@ -406,31 +368,13 @@
|
||||
}
|
||||
|
||||
.wordmark {
|
||||
width: 9.5rem;
|
||||
height: 3rem;
|
||||
}
|
||||
|
||||
.hero {
|
||||
min-height: auto;
|
||||
gap: 2rem;
|
||||
padding-block: 2rem 3rem;
|
||||
}
|
||||
|
||||
.heroPanel {
|
||||
min-height: 19rem;
|
||||
}
|
||||
|
||||
.orbit {
|
||||
scale: 0.78;
|
||||
}
|
||||
|
||||
.rail {
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.railButton {
|
||||
min-width: 8.5rem;
|
||||
}
|
||||
|
||||
.stickyActions {
|
||||
gap: var(--mantine-spacing-xs);
|
||||
}
|
||||
@@ -459,12 +403,6 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.fastAction {
|
||||
flex: 1.15 1 0;
|
||||
min-width: 0;
|
||||
padding-inline: 0.25rem;
|
||||
}
|
||||
|
||||
.primaryActions > :global(.mantine-Button-root):last-child {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
@@ -475,36 +413,20 @@
|
||||
font-size: var(--mantine-font-size-sm);
|
||||
}
|
||||
|
||||
.content :global(.mantine-SegmentedControl-label) {
|
||||
min-width: 0;
|
||||
height: auto;
|
||||
padding: 0.45rem 0.3rem;
|
||||
line-height: 1.15;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.sectionCard :global(.mantine-Group-root) {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.page {
|
||||
scroll-behavior: auto;
|
||||
.page * {
|
||||
animation: none !important;
|
||||
}
|
||||
|
||||
.choice,
|
||||
.railButton,
|
||||
.nextCard,
|
||||
.discoveryChoice {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.choice:hover {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.nextCard:hover {
|
||||
transform: none;
|
||||
.page *:not(.integrationAccordion *),
|
||||
.page *:not(.integrationAccordion *)::before,
|
||||
.page *:not(.integrationAccordion *)::after {
|
||||
transition: none !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { Alert, Button, Center, Loader, Paper, Stack, Text, Title } from "@mantine/core";
|
||||
import { Alert, Button, Center, Paper, Stack, Text, Title } from "@mantine/core";
|
||||
|
||||
import { useScopedI18n } from "@homarr/translation/client";
|
||||
import { Link } from "@homarr/ui";
|
||||
@@ -61,7 +61,6 @@ export const OnboardingStudio = (props: OnboardingStudioProps) => {
|
||||
<Center mih="100dvh" p="md">
|
||||
<Paper withBorder radius="lg" p="xl" maw="32rem" w="100%">
|
||||
<Stack align="center">
|
||||
{claimState === "checking" ? <Loader aria-label={t("checking")} /> : null}
|
||||
<Title order={1} size="h2" ta="center">
|
||||
{claimState === "checking"
|
||||
? t("checkingTitle")
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import classes from "./onboarding-studio.module.css";
|
||||
|
||||
export const OnboardingWordmark = () => (
|
||||
<img
|
||||
src="/logo/homarr-wordmark-light.svg"
|
||||
alt="Homarr"
|
||||
className={`${classes.wordmark} ${classes.onboardingWordmark}`}
|
||||
/>
|
||||
);
|
||||
File diff suppressed because it is too large.
Load diff
@@ -20,4 +20,5 @@ export interface OnboardingEnvironment {
|
||||
export interface OnboardingStudioProps {
|
||||
environment: OnboardingEnvironment;
|
||||
sqliteRestore?: ReactNode;
|
||||
assistantConfiguration?: ReactNode;
|
||||
}
|
||||
@@ -2,21 +2,20 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import { Alert, Badge, Button, Group, Paper, Stack, Text, ThemeIcon, Title } from "@mantine/core";
|
||||
import { IconArrowRight, IconDatabaseImport, IconLayoutDashboard, IconSparkles } from "@tabler/icons-react";
|
||||
import { motion, useReducedMotion } from "motion/react";
|
||||
import { IconArrowRight, IconDatabaseImport } from "@tabler/icons-react";
|
||||
|
||||
import { clientApi } from "@homarr/api/client";
|
||||
import { revalidatePathActionAsync } from "@homarr/common/client";
|
||||
import { showErrorNotification } from "@homarr/notifications";
|
||||
import { useScopedI18n } from "@homarr/translation/client";
|
||||
|
||||
import { OnboardingWordmark } from "./onboarding-wordmark";
|
||||
import type { OnboardingStudioProps } from "./types";
|
||||
import classes from "./onboarding-studio.module.css";
|
||||
|
||||
export const Welcome = ({ environment, sqliteRestore }: OnboardingStudioProps) => {
|
||||
const t = useScopedI18n("init.studio.welcome");
|
||||
const claimT = useScopedI18n("init.studio.claim");
|
||||
const reduceMotion = useReducedMotion();
|
||||
const [showRestore, setShowRestore] = useState(false);
|
||||
const [claimPending, setClaimPending] = useState(false);
|
||||
const [claimError, setClaimError] = useState<string | null>(null);
|
||||
@@ -78,29 +77,19 @@ export const Welcome = ({ environment, sqliteRestore }: OnboardingStudioProps) =
|
||||
<main className={classes.page}>
|
||||
<div className={classes.shell}>
|
||||
<Group className={classes.topbar} justify="space-between">
|
||||
<motion.img
|
||||
src="https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/homarr-wordmark-light.svg"
|
||||
alt="Homarr"
|
||||
className={classes.wordmark}
|
||||
initial={reduceMotion ? false : { opacity: 0, y: -10 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
transition={{ duration: 0.45 }}
|
||||
/>
|
||||
<OnboardingWordmark />
|
||||
<Badge variant="light" size="lg">
|
||||
{t("badge")}
|
||||
</Badge>
|
||||
</Group>
|
||||
|
||||
<section className={classes.hero} aria-labelledby="onboarding-welcome-title">
|
||||
<Stack gap="xl" align="flex-start">
|
||||
<Stack gap="md">
|
||||
<Text c="dimmed" fw={650} size="sm">
|
||||
{t("eyebrow")}
|
||||
</Text>
|
||||
<Title id="onboarding-welcome-title" className={classes.heroTitle}>
|
||||
<Stack gap="xl" align="center">
|
||||
<Stack gap="sm" align="center">
|
||||
<Title id="onboarding-welcome-title" className={classes.heroTitle} ta="center">
|
||||
{t("title")}
|
||||
</Title>
|
||||
<Text size="lg" c="dimmed" maw="38rem">
|
||||
<Text size="lg" c="dimmed" maw="38rem" ta="center">
|
||||
{t("description")}
|
||||
</Text>
|
||||
</Stack>
|
||||
@@ -152,48 +141,6 @@ export const Welcome = ({ environment, sqliteRestore }: OnboardingStudioProps) =
|
||||
</Alert>
|
||||
) : null}
|
||||
</Stack>
|
||||
|
||||
<motion.div
|
||||
initial={reduceMotion ? false : { opacity: 0, scale: 0.96, y: 24 }}
|
||||
animate={{ opacity: 1, scale: 1, y: 0 }}
|
||||
transition={{ duration: 0.55, delay: 0.08 }}
|
||||
>
|
||||
<Paper className={classes.heroPanel} radius="lg" p="xl">
|
||||
<div className={classes.orbit} aria-hidden>
|
||||
{[IconLayoutDashboard, IconSparkles, IconDatabaseImport, IconLayoutDashboard].map((Icon, index) => (
|
||||
<motion.div
|
||||
key={index}
|
||||
className={classes.orbitItem}
|
||||
animate={reduceMotion ? undefined : { y: [0, index % 2 === 0 ? -6 : 6, 0] }}
|
||||
transition={{ duration: 3.4 + index * 0.35, repeat: Infinity, ease: "easeInOut" }}
|
||||
>
|
||||
<Icon size={22} />
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
<Stack h="100%" justify="space-between" pos="relative">
|
||||
<Badge variant="dot" color="green">
|
||||
{t("ready")}
|
||||
</Badge>
|
||||
<Stack gap={4} align="center">
|
||||
<ThemeIcon size={72} radius="xl" variant="light">
|
||||
<IconLayoutDashboard size={34} />
|
||||
</ThemeIcon>
|
||||
<Text fw={700} size="lg">
|
||||
{t("panelTitle")}
|
||||
</Text>
|
||||
<Text size="sm" c="dimmed" ta="center" maw="19rem">
|
||||
{t("panelDescription")}
|
||||
</Text>
|
||||
</Stack>
|
||||
<Group gap="xs" justify="center">
|
||||
<Badge variant="light">{t("chipDiscover")}</Badge>
|
||||
<Badge variant="light">{t("chipConnect")}</Badge>
|
||||
<Badge variant="light">{t("chipBuild")}</Badge>
|
||||
</Group>
|
||||
</Stack>
|
||||
</Paper>
|
||||
</motion.div>
|
||||
</section>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
Reference in new issue
Block a user