[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot] 2026-01-17 12:38:57 +00:00 committed by GitHub
parent 2e0cebb3fb
commit cf840e4936
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -1772,13 +1772,13 @@ class Monitor extends BeanModel {
if (isNaN(delay) || delay < 0) {
throw new Error("Screenshot delay must be a non-negative number");
}
// Must not exceed 0.8 * timeout (page.goto timeout is interval * 1000 * 0.8)
const maxDelayFromTimeout = this.interval * 1000 * 0.8;
if (delay >= maxDelayFromTimeout) {
throw new Error(`Screenshot delay must be less than ${maxDelayFromTimeout}ms (0.8 × interval)`);
}
// Must not exceed 0.5 * interval to prevent blocking next check
const maxDelayFromInterval = this.interval * 1000 * 0.5;
if (delay >= maxDelayFromInterval) {

View File

@ -279,7 +279,11 @@
/>
<div class="form-text">
{{ $t("screenshotDelayDescription") }}
{{ $t("screenshotDelayMaxInfo", { max: Math.floor(monitor.interval * 1000 * 0.5) }) }}
{{
$t("screenshotDelayMaxInfo", {
max: Math.floor(monitor.interval * 1000 * 0.5),
})
}}
</div>
<div class="form-text text-warning">
{{ $t("screenshotDelayWarning") }}