Skip to content

Commit b4eba4c

Browse files
committed
Merge branch 'main' into feat-upload
# Conflicts: # src/BootstrapBlazor.Server/Locales/en-US.json # src/BootstrapBlazor.Server/Locales/zh-CN.json
2 parents d0ebb00 + 5246cce commit b4eba4c

File tree

10 files changed

+100
-9
lines changed

10 files changed

+100
-9
lines changed

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
<PackageReference Include="BootstrapBlazor.IconPark" Version="9.0.3" />
4646
<PackageReference Include="BootstrapBlazor.ImageCropper" Version="9.0.0" />
4747
<PackageReference Include="BootstrapBlazor.IP2Region" Version="9.0.1" />
48+
<PackageReference Include="BootstrapBlazor.JitsiMeet" Version="9.0.0" />
4849
<PackageReference Include="BootstrapBlazor.JuHeIpLocatorProvider" Version="9.0.0" />
4950
<PackageReference Include="BootstrapBlazor.Live2DDisplay" Version="9.0.1" />
5051
<PackageReference Include="BootstrapBlazor.Markdown" Version="9.0.2" />
@@ -65,7 +66,7 @@
6566
<PackageReference Include="BootstrapBlazor.Splitting" Version="9.0.3" />
6667
<PackageReference Include="BootstrapBlazor.SvgEditor" Version="9.0.3" />
6768
<PackageReference Include="BootstrapBlazor.SummerNote" Version="9.0.4" />
68-
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.2.4" />
69+
<PackageReference Include="BootstrapBlazor.TableExport" Version="9.2.5" />
6970
<PackageReference Include="BootstrapBlazor.Topology" Version="9.0.0" />
7071
<PackageReference Include="BootstrapBlazor.UniverIcon" Version="9.0.1" />
7172
<PackageReference Include="BootstrapBlazor.UniverSheet" Version="9.0.5" />
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@page "/meet"
2+
3+
<h3>JitsiMeet会议</h3>
4+
5+
<h4>通过JitsiMeet创建会议</h4>
6+
7+
<PackageTips Name="BootstrapBlazor.JitsiMeet" />
8+
9+
<Tips class="mt-3">
10+
<p>JitsiMeet是一个开源的WebRTC会议程序,可以自托管安装也可以使用官方的托管服务(免费计划为25MAU),此组件仅为JitsiMeet的客户端程序,不含服务端。</p>
11+
<p>默认的测试会议仅支持5分钟的会议,并且主持人需要登录。子托管以及官方托管服务不需要。</p>
12+
</Tips>
13+
14+
<DemoBlock Title="使用JitsiMeet创建会议室" Introduction="使用JitsiMeet创建会议室,支持执行命令,支持OnLoad回调(meet.jit.si不会触发回调也不会响应命令,请使用8x8.vc或子托管域名测试)。例子中隐藏了内置的邀请程序,无法在会议中找到邀请链接。" Name="Normal">
15+
<section class="row form-inline g-3">
16+
<div class="col-12 col-sm-6">
17+
<Display Value="_domain" DisplayText="服务器地址" ShowLabel="true"></Display>
18+
</div>
19+
<div class="col-12 col-sm-6">
20+
<Button OnClick="RunCommand">执行命令</Button>
21+
</div>
22+
</section>
23+
<Meet @ref="@_meet" Option="@_option" Domain="@_domain" OnLoad="OnLoad"></Meet>
24+
</DemoBlock>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the Apache 2.0 License
3+
// See the LICENSE file in the project root for more information.
4+
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
5+
6+
namespace BootstrapBlazor.Server.Components.Samples;
7+
8+
/// <summary>
9+
/// Meet 视频会议组件示例
10+
/// </summary>
11+
public partial class Meets : ComponentBase
12+
{
13+
private MeetOption? _option;
14+
private Meet? _meet;
15+
private readonly string _domain = "meet.jit.si";
16+
17+
[Inject, NotNull]
18+
private ToastService? ToastService { get; set; }
19+
20+
/// <summary>
21+
/// <inheritdoc />
22+
/// </summary>
23+
protected override void OnInitialized()
24+
{
25+
base.OnInitialized();
26+
27+
_option = new MeetOption
28+
{
29+
RoomName = "BootstrapBlazor",
30+
Width = "100%",
31+
Height = 700,
32+
ConfigOverwrite = new
33+
{
34+
Lobby = new { EnableChat = false },
35+
HiddenPremeetingButtons = new string[] { "invite" },
36+
DisableInviteFunctions = true,
37+
ButtonsWithNotifyClick = new[] { new { key = "invite", preventExecution = true } }
38+
},
39+
UserInfo = new UserInfo() { DisplayName = "BootstrapBlazor", Email = "[email protected]" }
40+
};
41+
}
42+
43+
private void OnLoad()
44+
{
45+
ToastService.Information("Meet 示例", "会议室加载完成");
46+
}
47+
48+
private async Task RunCommand()
49+
{
50+
if (_meet != null)
51+
{
52+
await _meet.ExecuteCommand("toggleChat");
53+
}
54+
}
55+
}
56+

src/BootstrapBlazor.Server/Extensions/MenusLocalizerExtensions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,6 +1228,12 @@ void AddNotice(DemoMenuItem item)
12281228
Url = "message"
12291229
},
12301230
new()
1231+
{
1232+
IsNew = true,
1233+
Text = Localizer["Meet"],
1234+
Url = "meet"
1235+
},
1236+
new()
12311237
{
12321238
Text = Localizer["Modal"],
12331239
Url = "modal"

src/BootstrapBlazor.Server/Locales/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4942,6 +4942,7 @@
49424942
"VideoDevice": "IVideoDevice",
49434943
"AudioDevice": "IAudioDevice",
49444944
"FullScreenButton": "FullScreenButton",
4945+
"Meet": "Meet",
49454946
"InputUpload": "InputUpload",
49464947
"ButtonUpload": "ButtonUpload",
49474948
"AvatarUpload": "AvatarUpload",

src/BootstrapBlazor.Server/Locales/zh-CN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4942,6 +4942,7 @@
49424942
"VideoDevice": "视频设备服务 IVideoDevice",
49434943
"AudioDevice": "音频设备服务 IAudioDevice",
49444944
"FullScreenButton": "全屏按钮 FullScreenButton",
4945+
"Meet": "视频会议组件 Meet",
49454946
"InputUpload": "上传组件 InputUpload",
49464947
"ButtonUpload": "按钮上传组件 ButtonUpload",
49474948
"AvatarUpload": "头像上传组件 AvatarUpload",

src/BootstrapBlazor.Server/docs.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@
237237
"otp-service": "OtpServices",
238238
"video-device": "VideoDevices",
239239
"audio-device": "AudioDevices",
240-
"fullscreen-button": "FullScreenButtons"
240+
"fullscreen-button": "FullScreenButtons",
241+
"meet": "Meets"
241242
},
242243
"video": {
243244
"table": "BV1ap4y1x7Qn?p=1",

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.6.5-beta01</Version>
4+
<Version>9.6.5-beta02</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

src/BootstrapBlazor/Components/Table/Table.razor.Toolbar.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ public async Task EditAsync()
545545
if (SelectedRows.Count == 1)
546546
{
547547
// 检查是否选中了不可编辑行(行内无编辑按钮),同时检查按钮禁用状态(禁用时不可编辑)
548+
// ShowExtendEditButton 不参与逻辑,不显示扩展编辑按钮时用户可能自定义按钮调用 EditAsync 方法
548549
if (ProhibitEdit())
549550
{
550551
// 提示不可编辑
@@ -1004,12 +1005,10 @@ protected async Task<bool> ConfirmDelete()
10041005
}
10051006

10061007
private bool ProhibitEdit() => (ShowExtendEditButtonCallback != null && !ShowExtendEditButtonCallback(SelectedRows[0]))
1007-
|| !ShowExtendEditButton
1008-
|| (DisableExtendEditButtonCallback != null && DisableExtendEditButtonCallback(SelectedRows[0]))
1009-
|| DisableExtendEditButton;
1008+
|| (DisableExtendEditButtonCallback != null && DisableExtendEditButtonCallback(SelectedRows[0]))
1009+
|| DisableExtendEditButton;
10101010

10111011
private bool ProhibitDelete() => (ShowExtendDeleteButtonCallback != null && SelectedRows.Any(i => !ShowExtendDeleteButtonCallback(i)))
1012-
|| !ShowExtendDeleteButton
10131012
|| (DisableExtendDeleteButtonCallback != null && SelectedRows.Any(x => DisableExtendDeleteButtonCallback(x)))
10141013
|| DisableExtendDeleteButton;
10151014

test/UnitTest/Components/TableTest.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8679,8 +8679,10 @@ public void Modify_Ok()
86798679
pb.Add(a => a.ShowExtendEditButton, false);
86808680
pb.Add(a => a.ShowExtendDeleteButton, false);
86818681
});
8682-
Assert.True(ProhibitEdit(cut.Instance));
8683-
Assert.True(ProhibitDelete(cut.Instance));
8682+
8683+
// 不显示编辑删除按钮不参与是否可编辑删除判断,用户可能自定义按钮编辑或者删除当前行
8684+
Assert.False(ProhibitEdit(cut.Instance));
8685+
Assert.False(ProhibitDelete(cut.Instance));
86848686

86858687
cut.SetParametersAndRender(pb =>
86868688
{

0 commit comments

Comments
 (0)