diff --git a/web/src/components/TopBandBar.tsx b/web/src/components/TopBandBar.tsx index 7be8c28..9e83a2f 100644 --- a/web/src/components/TopBandBar.tsx +++ b/web/src/components/TopBandBar.tsx @@ -4,10 +4,157 @@ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query"; import { listBands, createBand } from "../api/bands"; import { getInitials } from "../utils"; import { useBandStore } from "../stores/bandStore"; +import { api } from "../api/client"; -// ── Create Band Modal ────────────────────────────────────────────────────────── +// ── Shared primitives ────────────────────────────────────────────────────────── -function CreateBandModal({ onClose }: { onClose: () => void }) { +const inputStyle: React.CSSProperties = { + width: "100%", + padding: "8px 11px", + background: "rgba(255,255,255,0.04)", + border: "1px solid rgba(255,255,255,0.1)", + borderRadius: 7, + color: "#e8e9f0", + fontSize: 13, + fontFamily: "inherit", + outline: "none", + boxSizing: "border-box", +}; + +const labelStyle: React.CSSProperties = { + display: "block", + fontSize: 10, + fontWeight: 600, + letterSpacing: "0.06em", + color: "rgba(232,233,240,0.4)", + marginBottom: 5, +}; + +// ── Step indicator ───────────────────────────────────────────────────────────── + +function StepDots({ current, total }: { current: number; total: number }) { + return ( +
+ {msg} +
+ ); +} + +// ── Step 1: Storage setup ────────────────────────────────────────────────────── + +interface Me { nc_configured: boolean; nc_url: string | null; nc_username: string | null; } + +function StorageStep({ me, onNext }: { me: Me; onNext: () => void }) { + const qc = useQueryClient(); + const [ncUrl, setNcUrl] = useState(me.nc_url ?? ""); + const [ncUsername, setNcUsername] = useState(me.nc_username ?? ""); + const [ncPassword, setNcPassword] = useState(""); + const [error, setError] = useState+ Use an app password, not your account password. +
+ + {error &&
+ {ncConfigured
+ ? <>Leave blank to auto-create bands/{slug || "slug"}/.>
+ : "Connect storage first to set a folder."}
+
- Create a workspace for your recordings. -
+ {/* Header */} ++ {step === 0 ? "Needed to scan and index your recordings." : "Create a workspace for your recordings."} +
+- {error} -
+ {isLoading || step === null ? ( +Loading…
+ ) : step === 0 ? ( +
- Path relative to your Nextcloud root. Leave blank to auto-create{" "}
-
- bands/{slug || "slug"}/
-
- .{" "}
- Nextcloud must be configured in{" "}
-
- Settings → Storage
-
- .
-