diff --git a/frontend/src/components/ui/input.tsx b/frontend/src/components/ui/input.tsx index b4e0e6c1..45d847f6 100644 --- a/frontend/src/components/ui/input.tsx +++ b/frontend/src/components/ui/input.tsx @@ -8,7 +8,7 @@ const Input = React.forwardRef>( span]:line-clamp-1", + "flex h-8 w-full items-center justify-between whitespace-nowrap rounded-md border-0 bg-secondary/55 px-3 py-1 text-xs ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", className )} {...props} diff --git a/frontend/src/components/ui/textarea.tsx b/frontend/src/components/ui/textarea.tsx index b68dbe6b..e7d60dff 100644 --- a/frontend/src/components/ui/textarea.tsx +++ b/frontend/src/components/ui/textarea.tsx @@ -7,7 +7,7 @@ const Textarea = React.forwardRef{t("settings.egress.directFallback")} : nodes.map((node) => (
{node.name}
{node.lastError ?
{node.lastError}
: null}
- {scopeLabel(node.scope)} + {scopeLabel(node.scope)} {node.proxyConfigured ? t("settings.egress.configured") : t("settings.egress.direct")} {node.cookieConfigured ? t("settings.egress.configured") : t("settings.egress.none")} {Math.round(node.health * 100)}% @@ -108,25 +109,56 @@ export function EgressNodes() { } { if (!open) setEditing(undefined); }}> - - {editing ? t("settings.egress.editTitle") : t("settings.egress.addTitle")}{t("console.egressDialogDescription")} -
- setForm({ ...form, name: event.target.value })} /> - -
setForm({ ...form, enabled })} />
- setForm({ ...form, proxyURL: event.target.value })} />

{t("settings.egress.proxyProtocols")}

- {form.scope !== "grok_build" ? setForm({ ...form, userAgent: event.target.value })} /> : null} - {form.scope !== "grok_build" ? setForm({ ...form, cloudflareCookies: event.target.value })} /> : null} -
- + + + {editing ? t("settings.egress.editTitle") : t("settings.egress.addTitle")} + {t("console.egressDialogDescription")} + +
{ event.preventDefault(); save.mutate(); }}> +
+ + setForm({ ...form, enabled })} /> +
+ + setForm({ ...form, name: event.target.value })} /> + + + + + + setForm({ ...form, proxyURL: event.target.value })} /> + + {form.scope !== "grok_build" ? ( + + setForm({ ...form, userAgent: event.target.value })} /> + + ) : null} + {form.scope !== "grok_build" ? ( + + setForm({ ...form, cloudflareCookies: event.target.value })} /> + + ) : null} + + + + +
); } -function Field({ label, className, children }: { label: string; className?: string; children: ReactNode }) { - return
{children}
; +function Field({ label, controlId, description, children }: { label: string; controlId: string; description?: string; children: ReactNode }) { + return
{children}{description ?

{description}

: null}
; } function showError(error: unknown, fallback: string) { diff --git a/frontend/src/features/settings/settings-page.tsx b/frontend/src/features/settings/settings-page.tsx index 850d21d6..60613c96 100644 --- a/frontend/src/features/settings/settings-page.tsx +++ b/frontend/src/features/settings/settings-page.tsx @@ -1,9 +1,10 @@ -import { RefreshCw, RotateCcw } from "lucide-react"; +import { RotateCcw, Sparkles } from "lucide-react"; import { type ReactNode } from "react"; import { Controller } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { Button } from "@/components/ui/button"; +import { Badge } from "@/components/ui/badge"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; @@ -16,6 +17,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip import { isByteSizeUnit, isDurationUnit, type ByteSizeValue, type DurationValue } from "@/features/settings/settings-model"; import { useSettings } from "@/features/settings/use-settings"; import { ErrorState } from "@/shared/components/data-state"; +import { cn } from "@/shared/lib/cn"; export function SettingsPage() { const { t } = useTranslation(); @@ -42,8 +44,8 @@ export function SettingsPage() { }; return ( -
updateMutation.mutate(values))}> -
+ updateMutation.mutate(values))}> +

{t("settings.title")}

{t("settings.description")}

@@ -65,42 +67,47 @@ export function SettingsPage() { {loading ?
: null} {snapshot ? ( - - - {t("settings.groups.providers")} - {t("settings.groups.delivery")} - {t("settings.groups.policies")} - {t("settings.groups.about")} + + + {t("models.providerGrokBuild")} + {t("settings.web.title")} + {t("console.name")} + {t("settings.groups.delivery")} + {t("settings.groups.policies")} + {t("updates.title")} - +
+ - {t("settings.provider.syncRecommendedVersionDescription")} ) : undefined} > -
- - - - - - +
+ + + + + +
+ + -
- - +
+ + ( @@ -111,49 +118,51 @@ export function SettingsPage() { )} /> {statsigMode === "manual" ? ( - + ) : ( - + )} - } /> - } /> - } /> - } /> - - } /> - } /> -
} />
+ } /> + } /> + } /> + } /> + + } /> + } /> +
} />
+ + -
- - } /> +
+ + } />
-
- +
+ } /> - + } /> - +
-
%
+
%
- + } /> @@ -162,14 +171,14 @@ export function SettingsPage() {
- + -
+
@@ -177,38 +186,38 @@ export function SettingsPage() { -
- - - - - +
+ + + + +
-
- } /> - } /> - } /> - } /> - -
} />
+
+ } /> + } /> + } /> + } /> + +
} />
-
- - - } /> +
+ + + } />
-
- - +
+ +
@@ -216,6 +225,7 @@ export function SettingsPage() { +
) : null} @@ -237,7 +247,7 @@ function ByteSizeInput({ id, value, onChange }: { id: string; value?: ByteSizeVa onChange={(event) => onChange({ value: event.target.value === "" ? Number.NaN : Number(event.target.value), unit })} /> { if (isDurationUnit(nextUnit)) onChange({ value: value?.value ?? 1, unit: nextUnit }); }}> - + @@ -286,14 +296,14 @@ function SettingsPane({ value, children }: { value: string; children: ReactNode ); } -function SettingsSection({ title, action, wide = false, children }: { title: string; action?: ReactNode; wide?: boolean; children: ReactNode }) { +function SettingsSection({ title, action, children }: { title: string; action?: ReactNode; children: ReactNode }) { return ( -
-
-

{title}

+
+
+

{title}

{action}
-
{children}
+
{children}
); } @@ -301,14 +311,18 @@ function SettingsSection({ title, action, wide = false, children }: { title: str function SettingsField({ controlId, label, badge, description, error, className, children }: { controlId: string; label: string; badge?: string; description?: string; error?: string; className?: string; children: ReactNode }) { const { t } = useTranslation(); return ( -
-
- - {badge ? {badge} : null} +
+
+
+
+ + {badge ? {badge} : null} +
+ {description ?

{description}

: null} + {error ?

{t("settings.invalidValue")}

: null} +
+
{children}
- {children} - {description ?

{description}

: null} - {error ?

{t("settings.invalidValue")}

: null}
); } diff --git a/frontend/src/features/system/version-update.tsx b/frontend/src/features/system/version-update.tsx index 1f6e39a3..0df2d2c4 100644 --- a/frontend/src/features/system/version-update.tsx +++ b/frontend/src/features/system/version-update.tsx @@ -1,10 +1,11 @@ import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; -import { ArrowUpRight, RefreshCw } from "lucide-react"; +import { ArrowUpRight, Info, RefreshCw } from "lucide-react"; +import { type ReactNode } from "react"; import { useTranslation } from "react-i18next"; import { Button } from "@/components/ui/button"; import { Spinner } from "@/components/ui/spinner"; -import { checkForUpdates, getVersionInfo, type UpdateStatus } from "@/entities/system/system-api"; +import { checkForUpdates, getVersionInfo } from "@/entities/system/system-api"; import { cn } from "@/shared/lib/cn"; import { formatDateTime } from "@/shared/lib/format"; @@ -72,52 +73,81 @@ export function VersionUpdateSection() { const error = version?.error || checkError || requestError; return ( -
-
-

{t("updates.title")}

- -
- -
- - - - -
- - {error ?

{error}

: null} +
+
+
+

{t("updates.title")}

+
+
+ +
+

{t("updates.noteTitle")}

+

{t("updates.noteDescription")}

+
+
+
+ +
+
{version?.currentVersion || "-"}
+ +
+
+ + {version?.latestVersion || t("updates.notChecked")} + + + + {version?.status ? : null} + {version ? t(`updates.status.${version.status}`) : t("common.loading")} + + + + {version?.checkedAt ? formatDateTime(version.checkedAt, i18n.language) : t("updates.neverChecked")} + +
+ {error ?

{error}

: null} +
{version?.releaseNotes || version?.releaseUrl ? ( -
-
-

{t("updates.releaseNotes")}

+
+
+
+

{t("updates.releaseNotes")}

+

{t("updates.releaseNotesHelp")}

+
{version.releaseUrl ? ( - ) : null}
-

- {version.releaseNotes || t("updates.noReleaseNotes")} -

-
+
+

+ {version.releaseNotes || t("updates.noReleaseNotes")} +

+
+
) : null} - -

{t("updates.manualOnly")}

-
+
); } -function VersionField({ label, value, status }: { label: string; value: string; status?: UpdateStatus }) { +function VersionField({ label, description, children }: { label: string; description: string; children: ReactNode }) { return ( -
-

{label}

-
- {status ? : null} - {value} +
+
+
+

{label}

+

{description}

+
+
{children}
); } + +function VersionValue({ children }: { children: ReactNode }) { + return
{children}
; +} diff --git a/frontend/src/index.css b/frontend/src/index.css index dbb9b04c..fe999174 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -22,7 +22,7 @@ --destructive: oklch(0.58 0.22 27); --border: oklch(0.91 0 0); --input: oklch(0.9 0 0); - --ring: oklch(0.2 0 0); + --ring: var(--border); --sidebar: oklch(0.995 0 0); --sidebar-foreground: oklch(0.18 0 0); --sidebar-primary: oklch(0.12 0 0); @@ -57,7 +57,7 @@ --destructive: oklch(0.65 0.2 28); --border: oklch(0.27 0 0); --input: oklch(0.3 0 0); - --ring: oklch(0.75 0 0); + --ring: var(--border); --sidebar: oklch(0.145 0 0); --sidebar-foreground: oklch(0.92 0 0); --sidebar-primary: oklch(0.96 0 0); diff --git a/frontend/src/shared/i18n/index.ts b/frontend/src/shared/i18n/index.ts index f8037506..a875db7e 100644 --- a/frontend/src/shared/i18n/index.ts +++ b/frontend/src/shared/i18n/index.ts @@ -139,20 +139,26 @@ const resources = { }, updates: { title: "关于与更新", + noteTitle: "Note", + noteDescription: "本项目仅供技术研究与学习交流。使用时请务必遵循 Grok 官方的使用条款及当地法律法规,否则一切后果自负!", currentVersion: "当前版本", + currentVersionHelp: "当前服务实例正在运行的版本。", latestVersion: "最新版本", + latestVersionHelp: "最近一次从官方 GitHub Releases 获取的最新版本。", statusLabel: "更新状态", - checkedAt: "上次成功检查", + statusLabelHelp: "当前版本与最新发布版本的比较结果。", + checkedAt: "上次检查", + checkedAtHelp: "最近一次成功获取官方发布信息的时间。", checkNow: "检查更新", viewRelease: "查看更新", openRelease: "打开 Release", releaseNotes: "更新说明", + releaseNotesHelp: "官方 GitHub Release 提供的版本变更摘要。", noReleaseNotes: "该版本没有更新说明。", notChecked: "尚未获取", neverChecked: "尚未成功检查", available: "发现新版本 {{version}}", currentSummary: "当前运行 {{version}}", - manualOnly: "当前仅提供版本检查与更新提示,不会自动下载、安装或重启服务。", status: { unchecked: "尚未检查", up_to_date: "已是最新", @@ -727,14 +733,15 @@ const resources = { durationUnit: "时长单位", groups: { providers: "Provider 配置", delivery: "媒体与网络", policies: "运行策略", about: "关于" }, server: { title: "服务容量", maxConcurrentRequests: "API 请求并发上限", maxConcurrentRequestsHelp: "单实例同时处理的 /v1 请求数;调低不会中断进行中的请求。" }, - provider: { title: "Grok Build", baseURL: "上游地址", fallbackBaseURL: "XAI 备用地址", clientVersion: "客户端版本", clientIdentifier: "客户端标识", tokenAuth: "Token Auth", userAgent: "User-Agent", recommendedVersion: "推荐 {{version}}", syncRecommendedVersion: "同步推荐版本", recommendedVersionApplied: "已是推荐版本", syncRecommendedVersionDescription: "填入后端当前已完成兼容回归的版本和 User-Agent,保存后生效。" }, - web: { title: "Grok Web", baseURL: "上游地址", statsigMode: "x-statsig 获取方式", statsigManual: "手动填写", statsigURL: "URL 获取", statsigValue: "x-statsig-id", statsigConfigured: "已配置", statsigKeepConfigured: "留空保持当前配置", statsigValuePlaceholder: "粘贴 x-statsig-id", statsigSignerURL: "签名服务 URL", quotaTimeout: "额度请求超时", chatTimeout: "聊天超时", imageTimeout: "图片超时", videoTimeout: "视频超时", mediaConcurrency: "媒体任务并发", recoveryBackoffBase: "额度恢复退避", recoveryBackoffMax: "额度恢复最大退避", allowNSFW: "允许 NSFW 图片" }, - batch: { title: "批量任务", importConcurrency: "导入同步并发", conversionConcurrency: "账号转换并发", syncConcurrency: "数据同步并发", refreshConcurrency: "凭据刷新并发", randomDelay: "随机延迟上限(ms)" }, - media: { title: "媒体存储", maxImageSize: "单张图片上限", maxTotalSize: "媒体存储上限", cleanupThresholdPercent: "自动清理阈值", cleanupInterval: "容量检查间隔", sizeUnit: "存储单位", publicApiBaseURL: "公共 API 地址", publicApiBaseURLHelp: "用于生成图片公开 URL 与文档示例地址。留空时回退到服务启动值,默认为 http://127.0.0.1:8000。" }, - egress: { title: "出口代理", description: "节点按 Grok Build、Grok Web、Grok Console 或 Web 资源独立管理代理和健康状态。Build 沿用 Provider 的 User-Agent;Web 与 Console 节点单独管理浏览器 User-Agent 与 Cookie。代理地址和 Cloudflare Cookie 仅写入。", add: "添加节点", saved: "代理节点已保存", deleted: "代理节点已删除", name: "名称", scope: "作用域", proxy: "代理", clearance: "Clearance", health: "健康度", directFallback: "未配置节点时使用直连", scopeBuild: "Grok Build", scopeWeb: "Grok Web", scopeWebAsset: "Grok Web(仅资源)", configured: "已配置", direct: "直连", none: "无", editTitle: "编辑代理节点", addTitle: "添加代理节点", dialogDescription: "Build 节点只配置代理并沿用 Provider 的 User-Agent;Web 与 Console 节点使用各自的浏览器 User-Agent 和 Cloudflare Cookie。", enabled: "启用", proxyURL: "代理地址", proxyProtocols: "支持 HTTP、HTTPS、SOCKS4、SOCKS4A、SOCKS5、SOCKS5H;Resin 可在用户名中使用 {account} 绑定账号租约。", userAgent: "User-Agent", cloudflareCookie: "Cloudflare Cookie", keepConfigured: "已配置,留空保持不变", operationFailed: "操作失败" }, - routing: { title: "路由策略", stickyTTL: "会话粘性时长", cooldownBase: "基础冷却时间", cooldownMax: "最大冷却时间", capacityWait: "账号满载等待", maxAttempts: "最大尝试次数", preferFreeBuild: "Grok Build Free 账号优先" }, - audit: { title: "请求审计", bufferSize: "队列容量", batchSize: "批量写入数", flushInterval: "刷新间隔" }, - clientKeys: { title: "密钥默认限制", rpmLimit: "默认 RPM", maxConcurrent: "默认并发数" }, + provider: { title: "Grok Build", baseURL: "上游地址", baseURLHelp: "Grok Build 请求使用的主要上游端点。", fallbackBaseURL: "XAI 备用地址", fallbackBaseURLHelp: "自动路由至 XAI 或 Build 请求回退时使用的端点。", clientVersion: "客户端版本", clientVersionHelp: "随 Build 请求发送的版本;建议使用已完成兼容验证的版本。", clientIdentifier: "客户端标识", clientIdentifierHelp: "随请求发送的客户端身份标识,需与上游协议保持一致。", tokenAuth: "Token Auth", tokenAuthHelp: "用于 Grok Build 上游鉴权;留空保存不会覆盖现有值。", userAgent: "User-Agent", userAgentHelp: "Grok Build 请求及其出口节点共用的客户端 User-Agent。", recommendedVersion: "推荐 {{version}}", syncRecommendedVersion: "同步最新版本", recommendedVersionApplied: "已是推荐版本", syncRecommendedVersionDescription: "使用已完成兼容验证的版本和 User-Agent 填充当前表单,保存后生效。" }, + web: { title: "Grok Web", baseURL: "上游地址", baseURLHelp: "Grok Web API 与账号操作使用的基础端点。", statsigMode: "x-statsig 获取方式", statsigModeHelp: "选择固定配置或通过签名服务动态获取请求标识。", statsigManual: "手动填写", statsigURL: "URL 获取", statsigValue: "x-statsig-id", statsigValueHelp: "直接配置 Grok Web 请求使用的 x-statsig-id。", statsigConfigured: "已配置", statsigKeepConfigured: "留空保持当前配置", statsigValuePlaceholder: "粘贴 x-statsig-id", statsigSignerURL: "签名服务 URL", statsigSignerURLHelp: "按请求获取 x-statsig-id 的内部签名服务地址。", quotaTimeout: "额度请求超时", quotaTimeoutHelp: "查询账号额度与状态时允许等待上游响应的最长时间。", chatTimeout: "聊天超时", chatTimeoutHelp: "Grok Web 聊天请求完成前允许等待的最长时间。", imageTimeout: "图片超时", imageTimeoutHelp: "图片生成与编辑任务完成前允许等待的最长时间。", videoTimeout: "视频超时", videoTimeoutHelp: "视频生成任务完成前允许等待的最长时间。", mediaConcurrency: "媒体任务并发", mediaConcurrencyHelp: "单实例可同时执行的图片与视频任务数;修改后需重启。", recoveryBackoffBase: "额度恢复退避", recoveryBackoffBaseHelp: "额度恢复检查连续失败后的初始重试间隔。", recoveryBackoffMax: "额度恢复最大退避", recoveryBackoffMaxHelp: "额度恢复检查采用指数退避时允许达到的最大间隔。", allowNSFW: "允许 NSFW 图片", allowNSFWHelp: "允许 Grok Web 图片请求启用成人内容偏好。" }, + console: { baseURLHelp: "Grok Console 请求与账号操作使用的基础端点。", chatTimeoutHelp: "Grok Console 聊天请求完成前允许等待的最长时间。" }, + batch: { title: "批量任务", importConcurrency: "导入同步并发", importConcurrencyHelp: "批量导入后并行执行账号初始化与信息同步的任务数。", conversionConcurrency: "账号转换并发", conversionConcurrencyHelp: "跨 Provider 转换账号时允许同时处理的任务数。", syncConcurrency: "数据同步并发", syncConcurrencyHelp: "批量同步账号额度、状态与能力时允许同时处理的任务数。", refreshConcurrency: "凭据刷新并发", refreshConcurrencyHelp: "批量刷新账号凭据时允许同时处理的任务数。", randomDelay: "随机延迟上限(ms)", randomDelayHelp: "批量任务启动前增加的随机延迟上限,用于平滑上游请求峰值。" }, + media: { title: "媒体存储", maxImageSize: "单张图片上限", maxImageSizeHelp: "单个图片文件允许写入本地媒体存储的最大大小。", maxTotalSize: "媒体存储上限", maxTotalSizeHelp: "本地图片与视频文件允许占用的总存储空间。", cleanupThresholdPercent: "自动清理阈值", cleanupThresholdPercentHelp: "存储使用率达到该比例后,系统按时间清理较早的媒体文件。", cleanupInterval: "容量检查间隔", cleanupIntervalHelp: "后台检查媒体存储使用量并触发清理的时间间隔。", sizeUnit: "存储单位", publicApiBaseURL: "公共 API 地址", publicApiBaseURLHelp: "用于生成图片公开 URL 与文档示例地址。留空时回退到服务启动值,默认为 http://127.0.0.1:8000。" }, + egress: { title: "出口代理", description: "节点按 Grok Build、Grok Web、Grok Console 或 Web 资源独立管理代理和健康状态。Build 沿用 Provider 的 User-Agent;Web 与 Console 节点单独管理浏览器 User-Agent 与 Cookie。代理地址和 Cloudflare Cookie 仅写入。", add: "添加节点", saved: "代理节点已保存", deleted: "代理节点已删除", name: "名称", scope: "作用域", proxy: "代理", clearance: "Clearance", health: "健康度", directFallback: "未配置节点时使用直连", scopeBuild: "Grok Build", scopeWeb: "Grok Web", scopeWebAsset: "Grok Web(仅资源)", configured: "已配置", direct: "直连", none: "无", editTitle: "编辑代理节点", addTitle: "添加代理节点", dialogDescription: "Build 节点只配置代理并沿用 Provider 的 User-Agent;Web 与 Console 节点使用各自的浏览器 User-Agent 和 Cloudflare Cookie。", enabled: "启用", proxyURL: "代理地址", proxyProtocols: "支持 HTTP、HTTPS、SOCKS4、SOCKS4A、SOCKS5、SOCKS5H\nResin 可在用户名中使用 {account} 绑定账号租约。", userAgent: "User-Agent", cloudflareCookie: "Cloudflare Cookie", keepConfigured: "已配置,留空保持不变", operationFailed: "操作失败" }, + routing: { title: "路由策略", stickyTTL: "会话粘性时长", stickyTTLHelp: "同一会话优先复用已选账号的有效时长;到期后重新参与调度。", cooldownBase: "基础冷却时间", cooldownBaseHelp: "账号发生可恢复故障后首次进入冷却的时长。", cooldownMax: "最大冷却时间", cooldownMaxHelp: "连续故障触发指数退避时允许达到的最长冷却时间。", capacityWait: "账号满载等待", capacityWaitHelp: "全部候选账号并发已满时,切换或失败前等待容量释放的时间。", maxAttempts: "最大尝试次数", maxAttemptsHelp: "单次请求在可用账号之间切换并重试的最大次数。", preferFreeBuild: "Grok Build Free 账号优先", preferFreeBuildHelp: "启用后优先选择已确认可用的 Free 账号,其他路由条件保持不变。" }, + audit: { title: "请求审计", bufferSize: "队列容量", bufferSizeHelp: "审计记录进入持久化前可在内存队列中等待的最大数量。", batchSize: "批量写入数", batchSizeHelp: "每次数据库事务最多写入的审计记录数量。", flushInterval: "刷新间隔", flushIntervalHelp: "队列未达到批量写入数时,强制提交待处理审计记录的间隔。" }, + clientKeys: { title: "密钥默认限制", rpmLimit: "默认 RPM", rpmLimitHelp: "新建客户端密钥默认允许的每分钟请求数。", maxConcurrent: "默认并发数", maxConcurrentHelp: "新建客户端密钥默认允许同时执行的请求数。" }, units: { seconds: "秒", minutes: "分", hours: "时", days: "天" }, }, docs: { @@ -1043,7 +1050,7 @@ const resources = { expiryUnknown: "Credential expiry is unknown", }, common: { actions: "Actions", cancel: "Cancel", close: "Close", copy: "Copy", copied: "Copied", copyFailed: "Copy failed", create: "Create", delete: "Delete", disabled: "Disabled", disable: "Disable", edit: "Edit", enabled: "Enabled", enable: "Enable", loading: "Loading", importingProgress: "Importing, completed {{completed}} / {{total}}", syncingProgress: "Syncing initial data, completed {{completed}} / {{total}}", noData: "No data", pageOf: "Page {{page}}/{{pages}}", perPage: "Per page", rows: "rows", firstPage: "First page", lastPage: "Last page", previousPage: "Previous page", nextPage: "Next page", selectedCount: "{{count}} selected", selectPage: "Select this page", selectItem: "Select {{name}}", refresh: "Refresh", retry: "Retry", filter: "Filters", all: "All", clearFilters: "Clear filters", save: "Save", reset: "Reset", sortAscending: "Sort {{column}} ascending", sortDescending: "Sort {{column}} descending" }, - updates: { title: "About & updates", currentVersion: "Current version", latestVersion: "Latest version", statusLabel: "Update status", checkedAt: "Last successful check", checkNow: "Check for updates", viewRelease: "View update", openRelease: "Open Release", releaseNotes: "Release notes", noReleaseNotes: "No release notes are available for this version.", notChecked: "Not fetched", neverChecked: "No successful check yet", available: "New version {{version}} available", currentSummary: "Running {{version}}", manualOnly: "Only version checks and update notices are enabled. The service will not download, install, or restart automatically.", status: { unchecked: "Not checked", up_to_date: "Up to date", update_available: "Update available", check_failed: "Check failed" } }, + updates: { title: "About & updates", noteTitle: "Note", noteDescription: "This project is intended solely for technical research and educational exchange. You must comply with Grok's official terms of use and applicable local laws; you are solely responsible for any consequences.", currentVersion: "Current version", currentVersionHelp: "Version currently running on this service instance.", latestVersion: "Latest version", latestVersionHelp: "Latest version retrieved from the official GitHub Releases feed.", statusLabel: "Update status", statusLabelHelp: "Comparison between the running version and the latest release.", checkedAt: "Last check", checkedAtHelp: "Most recent successful retrieval of official release information.", checkNow: "Check for updates", viewRelease: "View update", openRelease: "Open Release", releaseNotes: "Release notes", releaseNotesHelp: "Version summary published with the official GitHub Release.", noReleaseNotes: "No release notes are available for this version.", notChecked: "Not fetched", neverChecked: "No successful check yet", available: "New version {{version}} available", currentSummary: "Running {{version}}", status: { unchecked: "Not checked", up_to_date: "Up to date", update_available: "Update available", check_failed: "Check failed" } }, nav: { dashboard: "Dashboard", accounts: "Accounts", models: "Models", clientKeys: "Client keys", creativeConsole: "Creative console", gallery: "Gallery", videoGallery: "Video Gallery", audits: "Request audits", docs: "Documentation", settings: "Settings" }, creativeConsole: { title: "Creative console", @@ -1197,7 +1204,7 @@ const resources = { errorFrameCount_one: "{{count}} error frame", errorFrameCount_other: "{{count}} error frames", }, - settings: { title: "Runtime settings", description: "Manage hot-reloadable gateway runtime parameters.", saved: "Settings saved and applied", restartRequired: "Restart required", invalidValue: "Enter a valid value", durationUnit: "Duration unit", groups: { providers: "Providers", delivery: "Media & network", policies: "Runtime policies", about: "About" }, server: { title: "Service capacity", maxConcurrentRequests: "API request concurrency limit", maxConcurrentRequestsHelp: "Maximum simultaneous /v1 requests per instance. Lowering the limit does not interrupt active requests." }, provider: { title: "Grok Build provider", baseURL: "Upstream URL", fallbackBaseURL: "XAI fallback URL", clientVersion: "Client version", clientIdentifier: "Client identifier", tokenAuth: "Token auth", userAgent: "User-Agent", recommendedVersion: "Recommended {{version}}", syncRecommendedVersion: "Sync recommended version", recommendedVersionApplied: "Recommended version active", syncRecommendedVersionDescription: "Fill in the backend version and User-Agent that passed compatibility regression; save to apply." }, web: { title: "Grok Web", baseURL: "Upstream URL", statsigMode: "x-statsig source", statsigManual: "Manual", statsigURL: "Fetch from URL", statsigValue: "x-statsig-id", statsigConfigured: "Configured", statsigKeepConfigured: "Leave blank to keep the current value", statsigValuePlaceholder: "Paste x-statsig-id", statsigSignerURL: "Signer URL", quotaTimeout: "Quota timeout", chatTimeout: "Chat timeout", imageTimeout: "Image timeout", videoTimeout: "Video timeout", mediaConcurrency: "Media job concurrency", recoveryBackoffBase: "Quota recovery backoff", recoveryBackoffMax: "Maximum recovery backoff", allowNSFW: "Allow NSFW images" }, batch: { title: "Batch tasks", importConcurrency: "Import sync concurrency", conversionConcurrency: "Account conversion concurrency", syncConcurrency: "Data sync concurrency", refreshConcurrency: "Credential refresh concurrency", randomDelay: "Maximum random delay (ms)" }, media: { title: "Media storage", maxImageSize: "Maximum image size", maxTotalSize: "Media storage limit", cleanupThresholdPercent: "Automatic cleanup threshold", cleanupInterval: "Capacity check interval", sizeUnit: "Storage unit", publicApiBaseURL: "Public API base URL", publicApiBaseURLHelp: "Used for public image URLs and docs examples. Leave empty to use the service startup value, which defaults to http://127.0.0.1:8000." }, egress: { title: "Egress proxies", description: "Nodes manage proxy and health independently for Grok Build, Grok Web, Grok Console, or Web assets. Build inherits the Provider User-Agent; Web and Console nodes manage their own browser User-Agent and cookies. Proxy URLs and Cloudflare cookies are write-only.", add: "Add node", saved: "Proxy node saved", deleted: "Proxy node deleted", name: "Name", scope: "Scope", proxy: "Proxy", clearance: "Clearance", health: "Health", directFallback: "Direct connection is used when no node is configured", scopeBuild: "Grok Build", scopeWeb: "Grok Web", scopeWebAsset: "Grok Web (assets only)", configured: "Configured", direct: "Direct", none: "None", editTitle: "Edit proxy node", addTitle: "Add proxy node", dialogDescription: "Build nodes only configure the proxy and inherit the Provider User-Agent; Web and Console nodes use their own browser User-Agent and Cloudflare cookies.", enabled: "Enabled", proxyURL: "Proxy URL", proxyProtocols: "Supports HTTP, HTTPS, SOCKS4, SOCKS4A, SOCKS5, and SOCKS5H with optional username and password. Resin users can put {account} in the username to bind one lease per account.", userAgent: "User-Agent", cloudflareCookie: "Cloudflare Cookie", keepConfigured: "Configured; leave blank to keep unchanged", operationFailed: "Operation failed" }, routing: { title: "Routing policy", stickyTTL: "Sticky session TTL", cooldownBase: "Base cooldown", cooldownMax: "Maximum cooldown", capacityWait: "Saturated account wait", maxAttempts: "Maximum attempts", preferFreeBuild: "Prefer Grok Build Free accounts" }, audit: { title: "Request audit", bufferSize: "Queue capacity", batchSize: "Batch size", flushInterval: "Flush interval" }, clientKeys: { title: "Client key defaults", rpmLimit: "Default RPM", maxConcurrent: "Default concurrency" }, units: { seconds: "Seconds", minutes: "Minutes", hours: "Hours", days: "Days" } }, + settings: { title: "Runtime settings", description: "Manage hot-reloadable gateway runtime parameters.", saved: "Settings saved and applied", restartRequired: "Restart required", invalidValue: "Enter a valid value", durationUnit: "Duration unit", groups: { providers: "Providers", delivery: "Media & network", policies: "Runtime policies", about: "About" }, server: { title: "Service capacity", maxConcurrentRequests: "API request concurrency limit", maxConcurrentRequestsHelp: "Maximum simultaneous /v1 requests per instance. Lowering the limit does not interrupt active requests." }, provider: { title: "Grok Build provider", baseURL: "Upstream URL", baseURLHelp: "Primary upstream endpoint used for Grok Build requests.", fallbackBaseURL: "XAI fallback URL", fallbackBaseURLHelp: "Endpoint used when routing to XAI or falling back from Grok Build.", clientVersion: "Client version", clientVersionHelp: "Version sent with Build requests. Use a version that has passed compatibility validation.", clientIdentifier: "Client identifier", clientIdentifierHelp: "Client identity sent with requests; keep it aligned with the upstream protocol.", tokenAuth: "Token auth", tokenAuthHelp: "Authenticates Grok Build upstream requests. Saving an empty value preserves the current secret.", userAgent: "User-Agent", userAgentHelp: "Client User-Agent shared by Grok Build requests and their egress nodes.", recommendedVersion: "Recommended {{version}}", syncRecommendedVersion: "Sync latest version", recommendedVersionApplied: "Recommended version active", syncRecommendedVersionDescription: "Fill the form with the validated version and User-Agent; save to apply." }, web: { title: "Grok Web", baseURL: "Upstream URL", baseURLHelp: "Base endpoint used for Grok Web API calls and account operations.", statsigMode: "x-statsig source", statsigModeHelp: "Use a fixed value or retrieve request identity dynamically from a signer service.", statsigManual: "Manual", statsigURL: "Fetch from URL", statsigValue: "x-statsig-id", statsigValueHelp: "Fixed x-statsig-id attached to Grok Web requests.", statsigConfigured: "Configured", statsigKeepConfigured: "Leave blank to keep the current value", statsigValuePlaceholder: "Paste x-statsig-id", statsigSignerURL: "Signer URL", statsigSignerURLHelp: "Internal signer endpoint used to retrieve x-statsig-id per request.", quotaTimeout: "Quota timeout", quotaTimeoutHelp: "Maximum time to wait for upstream quota and account-status queries.", chatTimeout: "Chat timeout", chatTimeoutHelp: "Maximum time to wait for a Grok Web chat request to complete.", imageTimeout: "Image timeout", imageTimeoutHelp: "Maximum time to wait for image generation or editing to complete.", videoTimeout: "Video timeout", videoTimeoutHelp: "Maximum time to wait for video generation to complete.", mediaConcurrency: "Media job concurrency", mediaConcurrencyHelp: "Image and video jobs one instance may run concurrently. Changes require a restart.", recoveryBackoffBase: "Quota recovery backoff", recoveryBackoffBaseHelp: "Initial retry interval after consecutive quota-recovery check failures.", recoveryBackoffMax: "Maximum recovery backoff", recoveryBackoffMaxHelp: "Maximum interval reached by exponential backoff for quota-recovery checks.", allowNSFW: "Allow NSFW images", allowNSFWHelp: "Allow Grok Web image requests to enable the adult-content preference." }, console: { baseURLHelp: "Base endpoint used for Grok Console requests and account operations.", chatTimeoutHelp: "Maximum time to wait for a Grok Console chat request to complete." }, batch: { title: "Batch tasks", importConcurrency: "Import sync concurrency", importConcurrencyHelp: "Accounts initialized and synchronized concurrently after a batch import.", conversionConcurrency: "Account conversion concurrency", conversionConcurrencyHelp: "Cross-provider account conversions that may run concurrently.", syncConcurrency: "Data sync concurrency", syncConcurrencyHelp: "Quota, status, and capability synchronizations that may run concurrently.", refreshConcurrency: "Credential refresh concurrency", refreshConcurrencyHelp: "Account credential refreshes that may run concurrently.", randomDelay: "Maximum random delay (ms)", randomDelayHelp: "Maximum randomized delay before batch work starts to smooth upstream request bursts." }, media: { title: "Media storage", maxImageSize: "Maximum image size", maxImageSizeHelp: "Largest individual image that may be written to local media storage.", maxTotalSize: "Media storage limit", maxTotalSizeHelp: "Total local storage available to image and video files.", cleanupThresholdPercent: "Automatic cleanup threshold", cleanupThresholdPercentHelp: "Storage utilization that triggers removal of older media files.", cleanupInterval: "Capacity check interval", cleanupIntervalHelp: "Interval between background storage checks and cleanup evaluation.", sizeUnit: "Storage unit", publicApiBaseURL: "Public API base URL", publicApiBaseURLHelp: "Used for public image URLs and docs examples. Leave empty to use the service startup value, which defaults to http://127.0.0.1:8000." }, egress: { title: "Egress proxies", description: "Nodes manage proxy and health independently for Grok Build, Grok Web, Grok Console, or Web assets. Build inherits the Provider User-Agent; Web and Console nodes manage their own browser User-Agent and cookies. Proxy URLs and Cloudflare cookies are write-only.", add: "Add node", saved: "Proxy node saved", deleted: "Proxy node deleted", name: "Name", scope: "Scope", proxy: "Proxy", clearance: "Clearance", health: "Health", directFallback: "Direct connection is used when no node is configured", scopeBuild: "Grok Build", scopeWeb: "Grok Web", scopeWebAsset: "Grok Web (assets only)", configured: "Configured", direct: "Direct", none: "None", editTitle: "Edit proxy node", addTitle: "Add proxy node", dialogDescription: "Build nodes only configure the proxy and inherit the Provider User-Agent; Web and Console nodes use their own browser User-Agent and Cloudflare cookies.", enabled: "Enabled", proxyURL: "Proxy URL", proxyProtocols: "Supports HTTP, HTTPS, SOCKS4, SOCKS4A, SOCKS5, and SOCKS5H.\nResin users can put {account} in the username to bind one lease per account.", userAgent: "User-Agent", cloudflareCookie: "Cloudflare Cookie", keepConfigured: "Configured; leave blank to keep unchanged", operationFailed: "Operation failed" }, routing: { title: "Routing policy", stickyTTL: "Sticky session TTL", stickyTTLHelp: "How long a session prefers its selected account before returning to normal scheduling.", cooldownBase: "Base cooldown", cooldownBaseHelp: "Initial cooldown applied after a recoverable account failure.", cooldownMax: "Maximum cooldown", cooldownMaxHelp: "Longest cooldown allowed when repeated failures trigger exponential backoff.", capacityWait: "Saturated account wait", capacityWaitHelp: "How long to wait for capacity before switching accounts or failing when all candidates are saturated.", maxAttempts: "Maximum attempts", maxAttemptsHelp: "Maximum account switches and retries allowed for one request.", preferFreeBuild: "Prefer Grok Build Free accounts", preferFreeBuildHelp: "Prefer confirmed usable Free accounts without changing other routing eligibility rules." }, audit: { title: "Request audit", bufferSize: "Queue capacity", bufferSizeHelp: "Maximum audit records held in memory before persistence.", batchSize: "Batch size", batchSizeHelp: "Maximum audit records written in one database transaction.", flushInterval: "Flush interval", flushIntervalHelp: "Maximum time pending audit records wait before they are committed." }, clientKeys: { title: "Client key defaults", rpmLimit: "Default RPM", rpmLimitHelp: "Requests per minute assigned to newly created client keys.", maxConcurrent: "Default concurrency", maxConcurrentHelp: "Concurrent requests assigned to newly created client keys." }, units: { seconds: "Seconds", minutes: "Minutes", hours: "Hours", days: "Days" } }, docs: { title: "API documentation",