Skip to content

Commit 5183fc4

Browse files
committed
Merge branch 'main' into tab_dev
2 parents b10d2fb + ab93093 commit 5183fc4

File tree

23 files changed

+204
-160
lines changed

23 files changed

+204
-160
lines changed

src/.config/dotnet-tools.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</ItemGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="BootstrapBlazor.AntDesignIcon" Version="8.0.0" />
26-
<PackageReference Include="BootstrapBlazor.AzureOpenAI" Version="8.0.1" />
25+
<PackageReference Include="BootstrapBlazor.AntDesignIcon" Version="8.1.0" />
26+
<PackageReference Include="BootstrapBlazor.AzureOpenAI" Version="8.1.0" />
2727
<PackageReference Include="BootstrapBlazor.AzureTranslator" Version="8.1.0" />
2828
<PackageReference Include="BootstrapBlazor.BaiduSpeech" Version="8.1.0" />
2929
<PackageReference Include="BootstrapBlazor.BaiduOcr" Version="8.1.1" />
@@ -34,18 +34,18 @@
3434
<PackageReference Include="BootstrapBlazor.BootstrapIcon.Extensions" Version="8.0.6" />
3535
<PackageReference Include="BootstrapBlazor.Chart" Version="8.2.3" />
3636
<PackageReference Include="BootstrapBlazor.CherryMarkdown" Version="8.0.1" />
37-
<PackageReference Include="BootstrapBlazor.CodeEditor" Version="8.0.2" />
38-
<PackageReference Include="BootstrapBlazor.Dock" Version="8.1.7" />
37+
<PackageReference Include="BootstrapBlazor.CodeEditor" Version="8.1.1" />
38+
<PackageReference Include="BootstrapBlazor.Dock" Version="8.2.0" />
3939
<PackageReference Include="BootstrapBlazor.DockView" Version="8.1.6" />
4040
<PackageReference Include="BootstrapBlazor.DriverJs" Version="8.0.1" />
4141
<PackageReference Include="BootstrapBlazor.ElementIcon" Version="8.0.0" />
4242
<PackageReference Include="BootstrapBlazor.FileViewer" Version="8.1.1" />
4343
<PackageReference Include="BootstrapBlazor.FontAwesome" Version="8.0.6" />
4444
<PackageReference Include="BootstrapBlazor.Gantt" Version="8.0.1" />
4545
<PackageReference Include="BootstrapBlazor.Holiday" Version="8.0.1" />
46-
<PackageReference Include="BootstrapBlazor.Html2Pdf" Version="8.2.0" />
46+
<PackageReference Include="BootstrapBlazor.Html2Pdf" Version="8.2.1" />
4747
<PackageReference Include="BootstrapBlazor.IconPark" Version="8.0.4" />
48-
<PackageReference Include="BootstrapBlazor.ImageCropper" Version="0.0.4" />
48+
<PackageReference Include="BootstrapBlazor.ImageCropper" Version="8.1.0" />
4949
<PackageReference Include="BootstrapBlazor.Live2DDisplay" Version="8.0.0" />
5050
<PackageReference Include="BootstrapBlazor.Markdown" Version="8.0.0" />
5151
<PackageReference Include="BootstrapBlazor.MaterialDesign" Version="8.0.3" />

src/BootstrapBlazor.Server/Components/Components/CultureChooser.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private async Task SetCulture(SelectedItem item)
6868
if (SelectedCulture != item.Value)
6969
{
7070
var culture = item.Value;
71-
var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped);
71+
var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.SafeUnescaped);
7272
var query = $"?culture={Uri.EscapeDataString(culture)}&redirectUri={Uri.EscapeDataString(uri)}";
7373

7474
// use a path that matches your culture redirect controller from the previous steps

src/BootstrapBlazor.Server/Components/Layout/HomeLayout.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private Task SetLang(string cultureName)
9696
// 使用 api 方式 适用于 Server-Side 模式
9797
if (SelectedCulture != cultureName)
9898
{
99-
var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped);
99+
var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.SafeUnescaped);
100100
var query = $"?culture={Uri.EscapeDataString(cultureName)}&redirectUri={Uri.EscapeDataString(uri)}";
101101

102102
// use a path that matches your culture redirect controller from the previous steps

src/BootstrapBlazor.Server/Components/Pages/Chats.razor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public partial class Chats
2828

2929
private List<AzureOpenAIChatMessage> Messages { get; } = [];
3030

31-
private static string? GetStackClass(ChatRole role) => CssBuilder.Default("msg-stack").AddClass("msg-stack-assistant", role == ChatRole.Assistant).Build();
31+
private static string? GetStackClass(ChatRole role) => CssBuilder.Default("msg-stack")
32+
.AddClass("msg-stack-assistant", role == ChatRole.Assistant)
33+
.Build();
3234

3335
private static readonly ConcurrentDictionary<string, int> _cache = new();
3436

src/BootstrapBlazor.Server/Components/Pages/Localization.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public class CultureController : Controller
184184
if (SelectedCulture != item.Value)
185185
{
186186
var culture = item.Value;
187-
var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped);
187+
var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.SafeUnescaped);
188188
var query = $"?culture={Uri.EscapeDataString(culture)}&redirectUri={Uri.EscapeDataString(uri)}";
189189

190190
// use a path that matches your culture redirect controller from the previous steps

src/BootstrapBlazor.Server/Components/Samples/Icons/AntDesignIcons.razor

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88

99
<PackageTips Name="BootstrapBlazor.AntDesignIcon" />
1010

11+
<Tips class="mt-3">
12+
<ul class="ul-demo">
13+
<li>@Localizer["P1"]</li>
14+
<li>@Localizer["P2"]</li>
15+
</ul>
16+
<div>@Localizer["P3"]</div>
17+
</Tips>
18+
19+
<Pre>&lt;link href="_content/BootstrapBlazor.AntDesignIcon/BootstrapBlazor.AntDesignIcon.bundle.scp.css" rel="stylesheet"&gt;</Pre>
20+
1121
<Pre>&lt;AntDesignIcon Category="AntDesignIconCategory.Outlined" Name="account-book"&gt;&lt;AntDesignIcon&gt;</Pre>
1222

1323
<AntDesignIconList CopiedTooltipText="@Localizer["CopiedTooltipText"]" />

src/BootstrapBlazor.Server/Components/Samples/Icons/ElementIcons.razor

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88

99
<PackageTips Name="BootstrapBlazor.ElementIcon" />
1010

11+
<Tips class="mt-3">
12+
<ul class="ul-demo">
13+
<li>@Localizer["P1"]</li>
14+
<li>@Localizer["P2"]</li>
15+
</ul>
16+
<div>@Localizer["P3"]</div>
17+
</Tips>
18+
19+
<Pre>&lt;link href="_content/BootstrapBlazor.ElementIcon/BootstrapBlazor.ElementIcon.bundle.scp.css" rel="stylesheet"&gt;</Pre>
20+
1121
<Pre>&lt;ElementIcon Name="add-location"&gt;&lt;ElementIcon&gt;</Pre>
1222

1323
<ElementIconList CopiedTooltipText="@Localizer["CopiedTooltipText"]" />

src/BootstrapBlazor.Server/Components/Samples/Icons/IconParks.razor

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88

99
<PackageTips Name="BootstrapBlazor.IconPark" />
1010

11+
<Tips class="mt-3">
12+
<ul class="ul-demo">
13+
<li>@Localizer["P1"]</li>
14+
<li>@Localizer["P2"]</li>
15+
</ul>
16+
<div>@Localizer["P3"]</div>
17+
</Tips>
18+
19+
<Pre>&lt;link href="_content/BootstrapBlazor.IconPark/BootstrapBlazor.IconPark.bundle.scp.css" rel="stylesheet"&gt;</Pre>
20+
1121
<Pre>&lt;ByteDanceIcon Name="abdominal"&gt;&lt;ByteDanceIcon&gt;</Pre>
1222

1323
<IconParkList CopiedTooltipText="@Localizer["CopiedTooltipText"]" />

src/BootstrapBlazor.Server/Components/Samples/ImageCroppers.razor

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,35 @@
66
<PackageTips Name="BootstrapBlazor.ImageCropper" />
77

88
<DemoBlock Title="@Localizer["ImageCropperNormalText"]" Introduction="@Localizer["ImageCropperNormalIntro"]" Name="Normal">
9-
<ImageCropper @ref="Cropper" Url="@images[0]" DefaultButton="false" />
9+
<ImageCropper @ref="_cropper" Url="@images[0]"></ImageCropper>
1010
<section ignore>
1111
<BootstrapInputGroup>
12-
<Button Text="OK" OnClick="(async () => Base64 = await Cropper.Crop())" />
13-
<Button Text="@Localizer["ImageCropperResetText"]" OnClick="Cropper.Reset" />
12+
<Button Text="OK" OnClick="Crop" />
13+
<Button Text="@Localizer["ImageCropperResetText"]" OnClick="_cropper.Reset" />
1414
<Button Text="@Localizer["ImageCropperReplaceText"]" OnClick="OnClickReplace" />
15+
<Button Text="@Localizer["ImageCropperRotateText"]" OnClick="Rotate" />
16+
<Button Text="@Localizer["ImageCropperEnableText"]" OnClick="_cropper.Enable" />
17+
<Button Text="@Localizer["ImageCropperDisabledText"]" OnClick="_cropper.Disable" />
18+
<Button Text="@Localizer["ImageCropperClearText"]" OnClick="_cropper.Clear" />
1519
</BootstrapInputGroup>
16-
<Textarea Value="@Base64" rows="3" class="mt-3" />
20+
@if (!string.IsNullOrEmpty(_base64String))
21+
{
22+
<img src="@_base64String" style="width: 240px;" />
23+
<Textarea Value="@_base64String" rows="3" class="mt-3" />
24+
}
25+
</section>
26+
</DemoBlock>
27+
28+
<DemoBlock Title="@Localizer["ImageCropperNormalText"]" Introduction="@Localizer["ImageCropperNormalIntro"]" Name="Normal">
29+
<ImageCropper @ref="_roundCropper" Url="@images[0]" CropperShape="ImageCropperShape.Round" Options="_roundOptions" />
30+
<section ignore>
31+
<BootstrapInputGroup>
32+
<Button Text="OK" OnClick="RoundCrop" />
33+
</BootstrapInputGroup>
34+
@if (!string.IsNullOrEmpty(_base64String2))
35+
{
36+
<img src="@_base64String2" style="width: 240px;" />
37+
}
1738
</section>
1839
</DemoBlock>
1940

0 commit comments

Comments
 (0)