Skip to content

Commit 5a53744

Browse files
committed
r2 full support
1 parent c6d3be7 commit 5a53744

3 files changed

Lines changed: 51 additions & 13 deletions

File tree

docs/app/page.tsx

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Link from "next/link";
22
import { Button } from "@/components/ui/button";
33
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card";
4-
import { Users, Server, Download, Shield, Activity, Settings, Github, BookOpen, Zap } from "lucide-react";
4+
import { Users, Server, Download, Shield, Activity, Settings, Github, BookOpen, Zap, Cloud } from "lucide-react";
55
import Image from "next/image";
66

77
export default function Home() {
@@ -349,11 +349,38 @@ export default function Home() {
349349
</Link>
350350
</div>
351351
</div>
352+
353+
{/* Advanced Configuration */}
354+
<div>
355+
<h3 className="text-xl font-bold mb-4 flex items-center gap-2">
356+
<Cloud className="h-5 w-5 text-primary" />
357+
Cấu hình nâng cao
358+
</h3>
359+
<div className="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
360+
<Link href="/r2-storage" className="group">
361+
<Card className="h-full border-2 hover:border-primary transition-all hover:shadow-lg">
362+
<CardHeader>
363+
<div className="h-12 w-12 rounded-lg bg-gradient-to-br from-sky-500 to-blue-600 flex items-center justify-center mb-4">
364+
<Cloud className="h-6 w-6 text-white" />
365+
</div>
366+
<CardTitle className="group-hover:text-primary transition-colors">
367+
R2 Storage
368+
</CardTitle>
369+
</CardHeader>
370+
<CardContent>
371+
<CardDescription>
372+
Tích hợp Cloudflare R2 để lưu trữ file cấu hình
373+
</CardDescription>
374+
</CardContent>
375+
</Card>
376+
</Link>
377+
</div>
378+
</div>
352379
</div>
353380
</div>
354381
</section>
355382

356-
{/* Footer */}
383+
{/* Footer */
357384
<footer className="relative border-t py-12 overflow-hidden">
358385
<div className="absolute inset-0 bg-gradient-to-b from-background to-muted/50 -z-10" />
359386
<div className="container">
@@ -400,6 +427,11 @@ export default function Home() {
400427
Cài đặt hệ thống
401428
</Link>
402429
</li>
430+
<li>
431+
<Link href="/r2-storage" className="text-muted-foreground hover:text-primary transition-colors">
432+
R2 Storage
433+
</Link>
434+
</li>
403435
</ul>
404436
</div>
405437

docs/app/r2-storage/page.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ R2_DOWNLOAD_TOKEN=8638b5a1-77df-4d24-8253-58977fa508a4`}
126126
Trong R2 Dashboard, click vào <strong>Manage R2 API Tokens</strong> hoặc vào <strong>Account Details → R2 API Tokens</strong>
127127
</p>
128128
<div className="rounded-lg border bg-slate-50 p-4">
129-
<img
129+
<img
130130
src="https://gist.github.com/user-attachments/assets/1ecff5e7-e35a-4c83-8003-c09c64480bf5"
131131
alt="R2 Account Details"
132132
className="w-full rounded-md border"
@@ -140,7 +140,7 @@ R2_DOWNLOAD_TOKEN=8638b5a1-77df-4d24-8253-58977fa508a4`}
140140
Click <strong>Create API Token</strong> để tạo credentials mới
141141
</p>
142142
<div className="rounded-lg border bg-slate-50 p-4">
143-
<img
143+
<img
144144
src="https://gist.github.com/user-attachments/assets/33861852-48f1-45f0-9153-5f2acfc1d524"
145145
alt="Create API Token"
146146
className="w-full rounded-md border"
@@ -166,7 +166,7 @@ R2_DOWNLOAD_TOKEN=8638b5a1-77df-4d24-8253-58977fa508a4`}
166166
</li>
167167
</ul>
168168
<div className="rounded-lg border bg-slate-50 p-4">
169-
<img
169+
<img
170170
src="https://gist.github.com/user-attachments/assets/44008443-9b37-48ee-959e-7c0e5f5fa37f"
171171
alt="Configure Permissions"
172172
className="w-full rounded-md border"
@@ -182,7 +182,7 @@ R2_DOWNLOAD_TOKEN=8638b5a1-77df-4d24-8253-58977fa508a4`}
182182
</AlertDescription>
183183
</Alert>
184184
<div className="rounded-lg border bg-slate-50 p-4 mb-3">
185-
<img
185+
<img
186186
src="https://gist.github.com/user-attachments/assets/feb91625-6b67-4c48-b2dc-6f9004239a4d"
187187
alt="Save Credentials"
188188
className="w-full rounded-md border"
@@ -206,7 +206,7 @@ R2_DOWNLOAD_TOKEN=8638b5a1-77df-4d24-8253-58977fa508a4`}
206206
>
207207
<div className="space-y-4">
208208
<div className="rounded-lg border bg-slate-50 p-4 mb-4">
209-
<img
209+
<img
210210
src="https://gist.github.com/user-attachments/assets/ae9bc216-6cf2-4b4c-b4f1-f0c16e9b97c1"
211211
alt="Bucket Settings"
212212
className="w-full rounded-md border"
@@ -298,7 +298,7 @@ R2_DOWNLOAD_TOKEN=8638b5a1-77df-4d24-8253-58977fa508a4`}
298298
</div>
299299

300300
<div className="rounded-lg border bg-slate-50 p-4 mb-4">
301-
<img
301+
<img
302302
src="https://gist.github.com/user-attachments/assets/ac2b490d-3723-4601-b01a-0fdf8778c175"
303303
alt="Firewall Rule"
304304
className="w-full rounded-md border"
@@ -357,7 +357,7 @@ R2_DOWNLOAD_TOKEN=8638b5a1-77df-4d24-8253-58977fa508a4`}
357357
<div>
358358
<p className="font-semibold mb-2">Mở file .env</p>
359359
<CodeBlock
360-
code="nano /opt/ovpanel/.env"
360+
code="nano /opt/ov-node/.env"
361361
title="Terminal"
362362
language="bash"
363363
/>
@@ -388,10 +388,10 @@ R2_DOWNLOAD_TOKEN=f7b3c2e1-9a8d-4f3e-b2c1-a0d9e8f7c6b5`}
388388
<p className="font-semibold mb-2">Khởi động lại dịch vụ</p>
389389
<CodeBlock
390390
code={`# Khởi động lại backend để load biến môi trường mới
391-
systemctl restart ovpanel
391+
systemctl restart ov-node
392392
393393
# Kiểm tra trạng thái
394-
systemctl status ovpanel`}
394+
systemctl status ov-node`}
395395
title="Terminal"
396396
language="bash"
397397
/>
@@ -432,7 +432,7 @@ systemctl status ovpanel`}
432432
</div>
433433

434434
<h2>Troubleshooting</h2>
435-
435+
436436
<div className="space-y-4 my-6">
437437
<details className="rounded-lg border-2 border-slate-200 bg-slate-50 p-4">
438438
<summary className="font-semibold cursor-pointer text-slate-800">

docs/components/doc-layout.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { usePathname } from "next/navigation";
55
import { cn } from "@/lib/utils";
66
import { ScrollArea } from "@/components/ui/scroll-area";
77
import Image from "next/image";
8-
import { BookOpen, Users, Server, Settings, Download, Github, Menu, FileCode, AlertCircle } from "lucide-react";
8+
import { BookOpen, Users, Server, Settings, Download, Github, Menu, FileCode, AlertCircle, Cloud } from "lucide-react";
99
import { Button } from "@/components/ui/button";
1010

1111
const navigation = [
@@ -26,6 +26,12 @@ const navigation = [
2626
{ title: "Xử lý sự cố", href: "/node-troubleshooting", icon: AlertCircle },
2727
],
2828
},
29+
{
30+
title: "Cấu hình nâng cao",
31+
items: [
32+
{ title: "R2 Storage", href: "/r2-storage", icon: Cloud },
33+
],
34+
},
2935
];
3036

3137
export function DocLayout({ children }: { children: React.ReactNode }) {

0 commit comments

Comments
 (0)