feat: separate subscription base url

This commit is contained in:
JetSprow
2026-04-29 13:46:10 +10:00
parent 68eac100f2
commit a0c1a28f5a
14 changed files with 80 additions and 26 deletions

View File

@@ -166,7 +166,7 @@ export function NodeActions({ node, siteUrl }: { node: NodeActionValue; siteUrl:
{!siteUrl && (
<p className="rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs leading-5 text-amber-700 dark:text-amber-200">
URL
</p>
)}
<p className="text-xs leading-5 text-muted-foreground">

View File

@@ -25,6 +25,7 @@ export default async function AdminSettingsPage() {
config={{
siteName: config.siteName,
siteUrl: config.siteUrl,
subscriptionUrl: config.subscriptionUrl,
supportContact: config.supportContact,
maintenanceNotice: config.maintenanceNotice,
siteNotice: config.siteNotice,

View File

@@ -14,6 +14,7 @@ import { getErrorMessage } from "@/lib/errors";
interface AppConfig {
siteName: string;
siteUrl: string | null;
subscriptionUrl: string | null;
supportContact: string | null;
maintenanceNotice: string | null;
siteNotice: string | null;
@@ -130,9 +131,14 @@ export function SettingsForm({ config, coupons }: { config: AppConfig; coupons:
<Input id="siteName" name="siteName" defaultValue={config.siteName} required />
</div>
<div className="space-y-2">
<Label htmlFor="siteUrl"> / URL</Label>
<Input id="siteUrl" name="siteUrl" defaultValue={config.siteUrl ?? ""} placeholder="https://example.com" />
<p className="text-xs leading-5 text-muted-foreground"> Agent </p>
<Label htmlFor="siteUrl"> URL</Label>
<Input id="siteUrl" name="siteUrl" defaultValue={config.siteUrl ?? ""} placeholder="https://panel.example.com" />
<p className="text-xs leading-5 text-muted-foreground"> Agent </p>
</div>
<div className="space-y-2 md:col-span-2">
<Label htmlFor="subscriptionUrl"> URL</Label>
<Input id="subscriptionUrl" name="subscriptionUrl" defaultValue={config.subscriptionUrl ?? ""} placeholder="https://sub.example.com" />
<p className="text-xs leading-5 text-muted-foreground"> URL 使 sub 便 Cloudflare/WAF 访</p>
</div>
<div className="space-y-2 md:col-span-2">
<Label htmlFor="supportContact"></Label>