Fix review issues in cookie pattern handling
- Fix DurationInput fallback unit from "minutes" to "seconds" and add seconds as a selectable unit to prevent silent duration inflation - Use parseFloat instead of parseInt for duration input to preserve fractional values - Scope prefix merge groups by category ID to prevent cross-category merging - Relink cookies and delete exact patterns even when prefix pattern already exists - Prefer exact matches and longest prefix in pattern selection query - Fix wrong error type in GetCookiePattern (ErrCookiePatternNotFound) - Handle singular/plural in humanizeSeconds fallback branch Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -29,5 +29,5 @@ export function humanizeSeconds(seconds: number | null): string {
|
||||
return `${count} ${count === 1 ? singular : plural}`;
|
||||
}
|
||||
}
|
||||
return `${seconds} seconds`;
|
||||
return `${seconds} ${seconds === 1 ? "second" : "seconds"}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user