完善folder页面的web接口实现

This commit is contained in:
xintaofei
2026-03-25 15:27:43 +08:00
parent ac09d3db9e
commit 218055ab01
18 changed files with 569 additions and 37 deletions

View File

@@ -3,6 +3,7 @@
import { useCallback, useState } from "react"
import { Eye, EyeOff } from "lucide-react"
import { useTranslations } from "next-intl"
import { randomUUID } from "@/lib/utils"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import {
@@ -72,7 +73,7 @@ export function AddGitAccountDialog({
}
const account: GitHubAccount = {
id: crypto.randomUUID(),
id: randomUUID(),
server_url: trimmedUrl,
username: trimmedUser,
scopes: [],

View File

@@ -4,6 +4,7 @@ import { useCallback, useState } from "react"
import { ExternalLink, Eye, EyeOff, Loader2 } from "lucide-react"
import { openUrl } from "@/lib/platform"
import { useTranslations } from "next-intl"
import { randomUUID } from "@/lib/utils"
import { Button } from "@/components/ui/button"
import { Input } from "@/components/ui/input"
import {
@@ -91,7 +92,7 @@ export function AddGitHubAccountDialog({
}
const account: GitHubAccount = {
id: crypto.randomUUID(),
id: randomUUID(),
server_url: serverUrl.trim() || "https://github.com",
username: result.username ?? "unknown",
scopes: result.scopes,