feat: split network recommendation toggles

This commit is contained in:
JetSprow
2026-04-30 15:53:58 +10:00
parent d2ff80abc3
commit 2591402f70
10 changed files with 78 additions and 19 deletions

View File

@@ -37,6 +37,7 @@ export default async function AdminSettingsPage() {
reminderDispatchIntervalMinutes: config.reminderDispatchIntervalMinutes,
trafficSyncEnabled: config.trafficSyncEnabled,
trafficSyncIntervalSeconds: config.trafficSyncIntervalSeconds,
networkRecommendationsEnabled: config.networkRecommendationsEnabled,
networkInsightsEnabled: config.networkInsightsEnabled,
subscriptionRiskEnabled: config.subscriptionRiskEnabled,
subscriptionRiskAutoSuspend: config.subscriptionRiskAutoSuspend,

View File

@@ -26,6 +26,7 @@ interface AppConfig {
reminderDispatchIntervalMinutes: number;
trafficSyncEnabled: boolean;
trafficSyncIntervalSeconds: number;
networkRecommendationsEnabled: boolean;
networkInsightsEnabled: boolean;
subscriptionRiskEnabled: boolean;
subscriptionRiskAutoSuspend: boolean;
@@ -252,7 +253,22 @@ export function SettingsForm({ config, coupons }: { config: AppConfig; coupons:
</div>
<div className="grid gap-5 md:grid-cols-2">
<div className="space-y-2">
<Label htmlFor="networkInsightsEnabled">线</Label>
<Label htmlFor="networkRecommendationsEnabled"></Label>
<select
id="networkRecommendationsEnabled"
name="networkRecommendationsEnabled"
defaultValue={String(config.networkRecommendationsEnabled)}
className={selectClassName}
>
<option value="false"></option>
<option value="true"></option>
</select>
<p className="text-xs leading-5 text-muted-foreground">
</p>
</div>
<div className="space-y-2">
<Label htmlFor="networkInsightsEnabled">线</Label>
<select
id="networkInsightsEnabled"
name="networkInsightsEnabled"
@@ -263,7 +279,7 @@ export function SettingsForm({ config, coupons }: { config: AppConfig; coupons:
<option value="true"></option>
</select>
<p className="text-xs leading-5 text-muted-foreground">
访线
访线
</p>
</div>
</div>