mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-05-06 06:00:44 +08:00
feat(channel-monitor): add feature switch settings + fix extra_models save
Settings:
- New "功能开关" tab between 通用设置 and 安全与认证
- ChannelMonitorEnabled toggle: runner skips scheduling when false,
user-facing list returns empty
- ChannelMonitorDefaultIntervalSeconds (15-3600): pre-fills interval
when creating a new monitor; each monitor can still override
Bug fix:
- ModelTagInput now commits pending input on blur, not just Enter/Tab.
Previously clicking "save" with an un-Enter'd extra model would drop
the value (DB stored extra_models=[] even when user typed entries).
Backend:
- domain_constants: SettingKeyChannelMonitor{Enabled,DefaultIntervalSeconds}
- SettingService.GetChannelMonitorRuntime: lightweight getter used by
runner tick + user handler per-request (fail-open on DB error)
- Runner tickDueChecks: bails early when feature disabled
- ChannelMonitorUserHandler: checks feature flag before serving
- Comment on runner doc: scheduler state is implicit (every tick re-reads
ListEnabled from DB), so CRUD ops on monitors self-maintain the schedule
Bump VERSION to 0.1.114.25
This commit is contained in:
@@ -469,6 +469,10 @@ export interface SystemSettings {
|
||||
balance_low_notify_recharge_url: string;
|
||||
account_quota_notify_enabled: boolean;
|
||||
account_quota_notify_emails: NotifyEmailEntry[];
|
||||
|
||||
// Channel Monitor feature switch
|
||||
channel_monitor_enabled: boolean;
|
||||
channel_monitor_default_interval_seconds: number;
|
||||
}
|
||||
|
||||
export interface UpdateSettingsRequest {
|
||||
@@ -618,6 +622,10 @@ export interface UpdateSettingsRequest {
|
||||
balance_low_notify_recharge_url?: string;
|
||||
account_quota_notify_enabled?: boolean;
|
||||
account_quota_notify_emails?: NotifyEmailEntry[];
|
||||
|
||||
// Channel Monitor feature switch
|
||||
channel_monitor_enabled?: boolean;
|
||||
channel_monitor_default_interval_seconds?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user