Per SETTINGS-AUDIT (all three tiers approved 2026-10-23): Dead settings: - panelOutbound, ipLimitAllowlist (+ orphan parser job), outboundDownThreshold - tg fake events outbound.down/outbound.up/xray.crash (no publisher in lite) - phantom routing sub-tabs (Happ/Clash/Incy) and subJsonRules direct-rules tab (no backend keys); subHideSettings moved to the subscription info tab first Upstream remnants: - ldap* / smtp* model+schema keys, EmailNotifications orphan component - twoFactorEnable/twoFactorToken + login-page probe (no backend handler) - externalTrafficInform* Newly approved removals: - JSON subscription family (producer, routes, UA auto-detect, mux/finalmask/ observatory) and Clash subscription family (producer, routes, UA detect) - SubBalancer (table, service, controller, settings tab) - subThemeDir (subscription page falls back to the built-in template) - datepicker jalalian option (gregorian only; Persian picker removed) JSON/Clash endpoints now 404; link-format output pinned by regression tests. Guarded keys untouched: webListen/webPort/webBasePath/certs, tg* chain, expireDiff/trafficDiff/tgBotProxy, subHideSettings, pageSize/tgLang.
35 lines
840 B
TypeScript
35 lines
840 B
TypeScript
import { DatePicker } from 'antd';
|
|
import type { Dayjs } from 'dayjs';
|
|
|
|
interface DateTimePickerProps {
|
|
value: Dayjs | null;
|
|
onChange: (next: Dayjs | null) => void;
|
|
showTime?: boolean;
|
|
format?: string;
|
|
placeholder?: string;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export default function DateTimePicker({
|
|
value,
|
|
onChange,
|
|
showTime = true,
|
|
format = 'YYYY-MM-DD HH:mm:ss',
|
|
placeholder = '',
|
|
disabled = false,
|
|
}: DateTimePickerProps) {
|
|
return (
|
|
<DatePicker
|
|
value={value}
|
|
onChange={(next) => onChange(next || null)}
|
|
onCalendarChange={(next) => onChange((Array.isArray(next) ? next[0] : next) || null)}
|
|
showTime={showTime ? { format: 'HH:mm:ss' } : false}
|
|
needConfirm={false}
|
|
format={format}
|
|
placeholder={placeholder}
|
|
disabled={disabled}
|
|
style={{ width: '100%' }}
|
|
/>
|
|
);
|
|
}
|