feat: 按账号调度自动学习并让首页实时跟上状态

This commit is contained in:
2026-11-16 01:14:36 +08:00
parent 158578d17c
commit 7f0466b0f6
31 changed files with 2699 additions and 631 deletions
+11 -2
View File
@@ -8,10 +8,19 @@ export const workerOptions = [
{ label: "5", value: 5 },
{ label: "6", value: 6 },
{ label: "7", value: 7 },
{ label: "8 · 最大", value: 8 },
{ label: "8", value: 8 },
];
export const dayOptions = Array.from({ length: 31 }, (_, index) => ({
label: `${index + 1}日`,
label: `每月 ${index + 1}号`,
value: index + 1,
}));
export const STUDY_POLL_FLOOR = 10;
export function studyPollSeconds(intervals: number[]): number {
if (intervals.some((value) => value <= 0)) return STUDY_POLL_FLOOR;
const positive = intervals.filter((value) => value > 0);
if (!positive.length) return STUDY_POLL_FLOOR;
return Math.max(STUDY_POLL_FLOOR, Math.min(...positive));
}