- Swap to using ms in some frontend areas - Rename button from "Clear

All Lockouts" to "Reset All Lockouts" - Add a tooltip to the red lock
icon on auth row - Make the red lock icon go away after resetting all
lockouts
This commit is contained in:
x032205
2025-08-27 04:47:21 -04:00
parent f52dbaa2f2
commit 8d6461b01d
8 changed files with 37 additions and 52 deletions
-23
View File
@@ -23,29 +23,6 @@ export const formatDateTime = ({
return format(date, dateFormat);
};
// Helper function to convert duration to seconds
export const durationToSeconds = (
value: number,
unit: "s" | "m" | "h" | "d" | "w" | "y"
): number => {
switch (unit) {
case "s":
return value;
case "m":
return value * 60;
case "h":
return value * 60 * 60;
case "d":
return value * 60 * 60 * 24;
case "w":
return value * 60 * 60 * 24 * 7;
case "y":
return value * 60 * 60 * 24 * 365;
default:
return 0;
}
};
// Helper function to convert seconds to value and unit
export const getObjectFromSeconds = (
totalSeconds: number,