feat: rename Updaterup to Daterup and update related links and metadata

This commit is contained in:
Anders Böttcher
2026-05-13 13:57:27 +02:00
parent 37e916594e
commit b711aa510a
7 changed files with 56 additions and 55 deletions
+5 -5
View File
@@ -5,14 +5,14 @@ import { usePathname } from "next/navigation";
export default function ProductTabs() {
const pathname = usePathname();
const isUpdaterup = pathname.startsWith("/updaterup");
const isDaterup = pathname.startsWith("/daterup");
return (
<div className="flex items-center gap-1 rounded-xl border border-white/8 bg-white/3 p-1">
<Link
href="/"
className={`px-4 py-1.5 rounded-lg text-sm font-semibold transition-all ${
!isUpdaterup
!isDaterup
? "bg-cyan-500/20 text-cyan-300 border border-cyan-500/30 shadow-sm"
: "text-slate-400 hover:text-slate-200 hover:bg-white/5"
}`}
@@ -20,14 +20,14 @@ export default function ProductTabs() {
Backerup
</Link>
<Link
href="/updaterup"
href="/daterup"
className={`px-4 py-1.5 rounded-lg text-sm font-semibold transition-all ${
isUpdaterup
isDaterup
? "bg-violet-500/20 text-violet-300 border border-violet-500/30 shadow-sm"
: "text-slate-400 hover:text-slate-200 hover:bg-white/5"
}`}
>
Updaterup
Daterup
</Link>
</div>
);
+19 -19
View File
@@ -6,7 +6,7 @@ import { LINKS } from "@/lib/links";
export interface TerminalLinks {
dockerImage?: string;
uiPort?: string;
updaterupDockerImage?: string;
daterupDockerImage?: string;
}
interface Line {
@@ -65,37 +65,37 @@ function buildDockerComposeLines(links: TerminalLinks): Line[] {
];
}
function buildUpdaterupRunLines(links: TerminalLinks): Line[] {
const updaterupDockerImage = links.updaterupDockerImage ?? LINKS.updaterupDockerImage;
function buildDaterupRunLines(links: TerminalLinks): Line[] {
const daterupDockerImage = links.daterupDockerImage ?? LINKS.daterupDockerImage;
return [
{ type: "comment", text: "# Quick start: Run Updaterup directly" },
{ type: "cmd", text: "docker run -d --name updaterup \\", copyable: true },
{ type: "comment", text: "# Quick start: Run Daterup directly" },
{ type: "cmd", text: "docker run -d --name daterup \\", copyable: true },
{ type: "cmd-cont", text: " -p 8080:80 \\", copyable: true },
{ type: "cmd-cont", text: " -v /var/run/docker.sock:/var/run/docker.sock \\", copyable: true },
{ type: "cmd-cont", text: " -v updaterup-config:/app/config \\", copyable: true },
{ type: "cmd-cont", text: ` ${updaterupDockerImage}`, copyable: true },
{ type: "cmd-cont", text: " -v daterup-config:/app/config \\", copyable: true },
{ type: "cmd-cont", text: ` ${daterupDockerImage}`, copyable: true },
{ type: "output", text: "b3c91d2e4f07" },
{ type: "success", text: "✓ Container started" },
{ type: "success", text: "✓ Ready at http://localhost:8080" },
];
}
function buildUpdaterupComposeLines(links: TerminalLinks): Line[] {
const updaterupDockerImage = links.updaterupDockerImage ?? LINKS.updaterupDockerImage;
function buildDaterupComposeLines(links: TerminalLinks): Line[] {
const daterupDockerImage = links.daterupDockerImage ?? LINKS.daterupDockerImage;
return [
{ type: "comment", text: "# Using docker-compose for Updaterup" },
{ type: "comment", text: "# Using docker-compose for Daterup" },
{ type: "cmd", text: "cat > docker-compose.yml << 'EOF'", copyable: false },
{ type: "output", text: "services:" },
{ type: "output", text: " updaterup:" },
{ type: "output", text: ` image: ${updaterupDockerImage}` },
{ type: "output", text: " daterup:" },
{ type: "output", text: ` image: ${daterupDockerImage}` },
{ type: "output", text: " ports:" },
{ type: "output", text: " - \"8080:80\"" },
{ type: "output", text: " volumes:" },
{ type: "output", text: " - /var/run/docker.sock:/var/run/docker.sock" },
{ type: "output", text: " - updaterup-config:/app/config" },
{ type: "output", text: " - daterup-config:/app/config" },
{ type: "output", text: " restart: unless-stopped" },
{ type: "output", text: "volumes:" },
{ type: "output", text: " updaterup-config:" },
{ type: "output", text: " daterup-config:" },
{ type: "output", text: "EOF" },
{ type: "success", text: "✓ docker-compose.yml created" },
{ type: "cmd", text: "docker compose up -d", copyable: false },
@@ -104,11 +104,11 @@ function buildUpdaterupComposeLines(links: TerminalLinks): Line[] {
];
}
function buildLines(mode: "docker-run" | "docker-compose" | "updaterup" | "updaterup-compose" = "docker-run", links: TerminalLinks = {}): Line[] {
function buildLines(mode: "docker-run" | "docker-compose" | "daterup" | "daterup-compose" = "docker-run", links: TerminalLinks = {}): Line[] {
switch (mode) {
case "docker-compose": return buildDockerComposeLines(links);
case "updaterup": return buildUpdaterupRunLines(links);
case "updaterup-compose": return buildUpdaterupComposeLines(links);
case "daterup": return buildDaterupRunLines(links);
case "daterup-compose": return buildDaterupComposeLines(links);
default: return buildDockerRunLines(links);
}
}
@@ -142,7 +142,7 @@ function linePrompt(line: Line): string {
return "";
}
export default function TerminalTyper({ mode = "docker-run", links = {} }: { mode?: "docker-run" | "docker-compose" | "updaterup" | "updaterup-compose"; links?: TerminalLinks } = {}) {
export default function TerminalTyper({ mode = "docker-run", links = {} }: { mode?: "docker-run" | "docker-compose" | "daterup" | "daterup-compose"; links?: TerminalLinks } = {}) {
const LINES = buildLines(mode, links);
const [doneLines, setDoneLines] = useState<number[]>([]);
const [current, setCurrent] = useState<{ idx: number; chars: number } | null>({ idx: 0, chars: 0 });
@@ -151,7 +151,7 @@ export default function TerminalTyper({ mode = "docker-run", links = {} }: { mod
const copyToClipboard = () => {
let textToCopy = "";
if (mode === "docker-compose" || mode === "updaterup-compose") {
if (mode === "docker-compose" || mode === "daterup-compose") {
// For docker-compose, copy the YAML content only
const startIdx = LINES.findIndex(line => line.type === "output" && line.text === "services:");
const endIdx = LINES.findIndex((line, i) => i > startIdx && line.type === "output" && line.text === "EOF");