feat: password resets

fix: frontend docker file
chore: format via csharpier again
This commit is contained in:
2026-06-18 21:15:34 -04:00
parent 67ccee736a
commit d4976ac9aa
34 changed files with 3236 additions and 26 deletions
+14
View File
@@ -34,5 +34,19 @@ namespace SharpbinV3.Server
return Convert.ToHexString(hashBytes);
}
public static long TimeSpanToMilliseconds(TimeSpan value) => (long)Math.Ceiling(value.TotalMilliseconds);
public static string FormatDuration(TimeSpan value)
{
if (value.TotalHours >= 1)
{
var hours = (int)Math.Ceiling(value.TotalHours);
return $"{hours} hour{(hours == 1 ? "" : "s")}";
}
var minutes = Math.Max(1, (int)Math.Ceiling(value.TotalMinutes));
return $"{minutes} minute{(minutes == 1 ? "" : "s")}";
}
}
}