Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<PackageReference Include="BootstrapBlazor.FluentSystemIcon" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.FontAwesome" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.Gantt" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.HikVision" Version="10.0.5" />
<PackageReference Include="BootstrapBlazor.HikVision" Version="10.0.6" />
<PackageReference Include="BootstrapBlazor.Holiday" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.Html2Image" Version="10.0.0" />
<PackageReference Include="BootstrapBlazor.Html2Pdf" Version="10.0.1" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@
<Button OnClick="OnCloseSound" IsDisabled="_closeSoundStatus">
<span>关闭声音</span>
</Button>
<Button OnClick="OnCapture" IsDisabled="_stopRealPlayStatus">
<span>抓图</span>
</Button>
</div>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ private async Task OnStartRealPlay()
{
_startRealPlayStatus = true;
_stopRealPlayStatus = true;
_openSoundStatus = false;
_closeSoundStatus = true;
await _hikVision.StartRealPlay(_streamType, _channelId);
}

Expand Down Expand Up @@ -111,6 +109,11 @@ private async Task OnCloseSound()
}
}

private async Task OnCapture()
{
await _hikVision.CapturePictureAndDownload();
}
Comment on lines +112 to +115
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OnCapture method lacks user feedback for success or failure. Unlike OnOpenSound and OnCloseSound methods which provide toast notifications to inform users of the operation result, this method silently executes without any feedback. Consider adding success/error toast messages similar to the sound control methods to improve user experience.

Copilot uses AI. Check for mistakes.

private async Task OnInitedAsync(bool initialized)
{
_inited = initialized;
Expand Down Expand Up @@ -176,6 +179,8 @@ private Task OnStartRealPlayedAsync()
{
_startRealPlayStatus = _hikVision.IsRealPlaying;
_stopRealPlayStatus = !_startRealPlayStatus;
_openSoundStatus = false;
_closeSoundStatus = true;
StateHasChanged();
return Task.CompletedTask;
}
Expand All @@ -184,6 +189,8 @@ private Task OnStopRealPlayedAsync()
{
_startRealPlayStatus = _hikVision.IsRealPlaying;
_stopRealPlayStatus = !_startRealPlayStatus;
_openSoundStatus = true;
_closeSoundStatus = true;
StateHasChanged();
return Task.CompletedTask;
}
Expand Down
Loading