9ac2c9182a
- Redesigned audio player bar to be mobile-friendly - Added unloading for track switching (needs to be fixed) - Added IsLoading status so loading spinner isn't hanging around when it shouldn't be - Normalized styles with scoped files (will further reduce) - Layout Cleanup - EF fixes (migrations now function for deployment) - deploy script updates (new dedicated host)
14 lines
486 B
C#
14 lines
486 B
C#
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace DeepDrftWeb.Client.Controls.AudioPlayerBar;
|
|
|
|
public partial class TimestampLabel : ComponentBase
|
|
{
|
|
[Parameter] public required double CurrentTime { get; set; }
|
|
[Parameter] public required double? Duration { get; set; }
|
|
private static string FormatTime(double seconds)
|
|
{
|
|
var timeSpan = TimeSpan.FromSeconds(seconds);
|
|
return timeSpan.ToString(timeSpan.TotalHours >= 1 ? @"h\:mm\:ss" : @"m\:ss");
|
|
}
|
|
} |