Skip to content

Commit 521f7c5

Browse files
authored
Merge pull request #9541 from bitfoundation/develop
Version 9.1.2 (#9539)
2 parents 6c529e1 + 634f534 commit 521f7c5

File tree

135 files changed

+3789
-1659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+3789
-1659
lines changed

.github/workflows/admin-sample.cd.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,56 @@ jobs:
6969
path: ${{env.DOTNET_ROOT}}/server
7070
include-hidden-files: true # Required for wwwroot/.well-known folder
7171

72+
deploy_blazor_wasm_standalone:
73+
name: build blazor wasm standalone
74+
runs-on: ubuntu-24.04
75+
76+
steps:
77+
78+
- name: Checkout source code
79+
uses: actions/checkout@v4
80+
81+
- name: Setup .NET
82+
uses: actions/setup-dotnet@v4
83+
with:
84+
global-json-file: src/global.json
85+
86+
- name: Create project from Boilerplate
87+
run: |
88+
cd src/Templates/Boilerplate && dotnet build -c Release
89+
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
90+
dotnet new install Bit.Boilerplate.0.0.0.nupkg
91+
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --sentry --serverUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --signalR --framework net9.0
92+
93+
- name: Update core appsettings.json
94+
uses: devops-actions/variable-substitution@v1.2
95+
with:
96+
files: 'AdminPanel/src/Shared/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Web/appsettings.json, AdminPanel/src/Client/AdminPanel.Client.Web/appsettings.Production.json'
97+
env:
98+
ServerAddress: ${{ env.SERVER_ADDRESS }}
99+
Logging.Sentry.Dsn: ${{ secrets.ADMINPANEL_SENTRY_DSN }}
100+
GoogleRecaptchaSiteKey: ${{ secrets.GOOGLE_RECAPTCHA_SITE_KEY }}
101+
AdsPushVapid.PublicKey: ${{ secrets.ADMINPANEL_PUBLIC_VAPIDKEY }}
102+
ApplicationInsights.ConnectionString: ${{ secrets.APPLICATION_INSIGHTS_CONNECTION_STRING }}
103+
104+
- uses: actions/setup-node@v4
105+
with:
106+
node-version: 22
107+
108+
- name: Install wasm
109+
run: cd src && dotnet workload install wasm-tools
110+
111+
- name: Generate CSS/JS files
112+
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
113+
114+
- name: Publish
115+
run: dotnet publish AdminPanel/src/Client/AdminPanel.Client.Web/AdminPanel.Client.Web.csproj -c Release -p:PwaEnabled=true -o ${{env.DOTNET_ROOT}}/client -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}"
116+
117+
- name: Upload to asw
118+
run: |
119+
npm install -g @azure/static-web-apps-cli
120+
swa deploy --deployment-token ${{ secrets.ADMINPANEL_ASW_TOKEN }} --env production --app-location ${{env.DOTNET_ROOT}}/client/wwwroot
121+
72122
deploy_api_blazor:
73123
name: deploy api + blazor
74124
needs: build_api_blazor

.github/workflows/bit.full.ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858

5959
- name: Simple tests (no --advancedTests)
6060
id: simple-test
61+
continue-on-error: true
6162
run: |
6263
dotnet new bit-bp --name SimpleTest --database Sqlite --framework net8.0
6364
cd SimpleTest/src/Server/SimpleTest.Server.Api/
@@ -79,6 +80,7 @@ jobs:
7980

8081
- name: Test Sqlite database option
8182
id: sqlite-test
83+
continue-on-error: true
8284
run: |
8385
dotnet new bit-bp --name TestSqlite --database Sqlite --advancedTests --framework net9.0
8486
cd TestSqlite/src/Server/TestSqlite.Server.Api/
@@ -101,6 +103,7 @@ jobs:
101103

102104
- name: Test SqlServer database option
103105
id: sqlserver-test
106+
continue-on-error: true
104107
run: |
105108
dotnet new bit-bp --name TestSqlServer --database SqlServer --advancedTests --framework net8.0
106109
cd TestSqlServer/src/Server/TestSqlServer.Server.Api/
@@ -121,6 +124,7 @@ jobs:
121124

122125
- name: Test Multilingual disabled option
123126
id: multilingual-disabled-test
127+
continue-on-error: true
124128
run: |
125129
dotnet new bit-bp --name MultilingualDisabled --database Sqlite --advancedTests --framework net8.0
126130
cd MultilingualDisabled/src/Server/MultilingualDisabled.Server.Api/
@@ -139,6 +143,7 @@ jobs:
139143
retention-days: 14
140144

141145
- name: Test PostgreSQL, MySql, Other database options
146+
continue-on-error: true
142147
run: |
143148
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL --framework net8.0 --signalR
144149
cd TestPostgreSQL/src/Server/TestPostgreSQL.Server.Api/
@@ -153,6 +158,7 @@ jobs:
153158
dotnet build
154159
155160
- name: Test file storage options
161+
continue-on-error: true
156162
run: |
157163
dotnet new bit-bp --name TestLocal --filesStorage Local --framework net8.0 --appInsights
158164
cd TestLocal/src/Server/TestLocal.Server.Api/
@@ -163,6 +169,7 @@ jobs:
163169
dotnet build
164170
165171
- name: Test backend setup options
172+
continue-on-error: true
166173
run: |
167174
dotnet new bit-bp --name TestStandalone --api Standalone --framework net8.0
168175
cd TestStandalone/src/Server/TestStandalone.Server.Api/
@@ -176,11 +183,13 @@ jobs:
176183
dotnet build
177184
178185
- name: Test sample configuration 1
186+
continue-on-error: true
179187
run: |
180188
dotnet new bit-bp --name TestProject --database SqlServer --filesStorage AzureBlobStorage --api Integrated --captcha reCaptcha --pipeline Azure --sample Admin --offlineDb --windows --appInsights --sentry --signalR --notification --framework net9.0
181189
dotnet build TestProject/TestProject.sln -p:MultilingualEnabled=true -p:PwaEnabled=true -p:Environment=Staging
182190
183191
- name: Test sample configuration 2
192+
continue-on-error: true
184193
run: |
185194
dotnet new bit-bp --name TestProject2 --database Other --filesStorage Other --api Standalone --captcha None --pipeline None --sample None --offlineDb false --windows false --appInsights false --sentry false --signalR false --notification false --framework net8.0
186195
dotnet build TestProject2/TestProject2.sln -p:MultilingualEnabled=false -p:PwaEnabled=false -p:Environment=Development

.github/workflows/todo-sample.cd.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,53 @@ jobs:
121121
CLOUDFLARE_ZONE: ${{ secrets.BITPLATFORM_DEV_CLOUDFLARE_ZONE }}
122122
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
123123

124+
deploy_blazor_wasm_standalone:
125+
name: build blazor wasm standalone
126+
runs-on: ubuntu-24.04
127+
128+
steps:
129+
130+
- name: Checkout source code
131+
uses: actions/checkout@v4
132+
133+
- name: Setup .NET
134+
uses: actions/setup-dotnet@v4
135+
with:
136+
global-json-file: src/global.json
137+
138+
- name: Create project from Boilerplate
139+
run: |
140+
cd src/Templates/Boilerplate && dotnet build -c Release
141+
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0
142+
dotnet new install Bit.Boilerplate.0.0.0.nupkg
143+
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --serverUrl ${{ env.SERVER_ADDRESS }} --filesStorage AzureBlobStorage --notification --captcha reCaptcha --framework net9.0
144+
145+
- name: Update core appsettings.json
146+
uses: devops-actions/variable-substitution@v1.2
147+
with:
148+
files: 'TodoSample/src/Shared/appsettings.json, TodoSample/src/Client/TodoSample.Client.Core/appsettings.json, TodoSample/src/Client/TodoSample.Client.Web/appsettings.json, TodoSample/src/Client/TodoSample.Client.Web/appsettings.Production.json'
149+
env:
150+
ServerAddress: ${{ env.SERVER_ADDRESS }}
151+
GoogleRecaptchaSiteKey: ${{ secrets.GOOGLE_RECAPTCHA_SITE_KEY }}
152+
153+
- uses: actions/setup-node@v4
154+
with:
155+
node-version: 22
156+
157+
- name: Install wasm
158+
run: cd src && dotnet workload install wasm-tools
159+
160+
- name: Generate CSS/JS files
161+
run: dotnet build TodoSample/src/Client/TodoSample.Client.Core/TodoSample.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release
162+
163+
- name: Publish
164+
run: dotnet publish TodoSample/src/Client/TodoSample.Client.Web/TodoSample.Client.Web.csproj -c Release -p:PwaEnabled=true -o ${{env.DOTNET_ROOT}}/client -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" -p:RunAOTCompilation=true -p:MultilingualEnabled=false
165+
166+
- name: Upload to asw
167+
run: |
168+
npm install -g @azure/static-web-apps-cli
169+
swa deploy --deployment-token ${{ secrets.TODO_ASW_TOKEN }} --env production --app-location ${{env.DOTNET_ROOT}}/client/wwwroot
170+
124171
build_blazor_hybrid_windows:
125172
name: build blazor hybrid (windows)
126173
runs-on: windows-2022

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
![License](https://img.shields.io/github/license/bitfoundation/bitplatform.svg)
66
![CI Status](https://github.com/bitfoundation/bitplatform/actions/workflows/bit.ci.yml/badge.svg)
77
![NuGet version](https://img.shields.io/nuget/v/bit.blazorui.svg?logo=nuget)
8-
[![Nuget downloads](https://img.shields.io/badge/packages_download-5.5M-blue.svg?logo=nuget)](https://www.nuget.org/profiles/bit-foundation)
8+
[![Nuget downloads](https://img.shields.io/badge/packages_download-5.6M-blue.svg?logo=nuget)](https://www.nuget.org/profiles/bit-foundation)
99
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/bitfoundation/bitplatform.svg)](http://isitmaintained.com/project/bitfoundation/bitplatform "Average time to resolve an issue")
1010
[![Percentage of issues still open](http://isitmaintained.com/badge/open/bitfoundation/bitplatform.svg)](http://isitmaintained.com/project/bitfoundation/bitplatform "Percentage of issues still open")
1111

@@ -47,7 +47,9 @@ The following apps are our open-source projects powered by the bit platform show
4747
1. [bitplatform.dev](https://bitplatform.dev): .NET 9 Pre-rendered SPA with Blazor WebAssembly
4848
2. [blazorui.bitplatform.dev](https://blazorui.bitplatform.dev): .NET 9 Pre-rendered PWA with Blazor WebAssembly
4949
3. [todo.bitplatform.dev](https://todo.bitplatform.dev): .NET 8 Pre-rendered PWA with Blazor WebAssembly
50-
5. [adminpanel.bitplatform.dev](https://adminpanel.bitplatform.dev): .NET 9 PWA with Blazor WebAssembly Standalone (Hosted on Cloudflare Pages)
50+
5. [adminpanel.bitplatform.dev](https://adminpanel.bitplatform.dev): .NET 9 PWA with Blazor WebAssembly
51+
6. [adminpanel.bitplatform.cc](https://adminpanel.bitplatform.cc): .NET 9 PWA with Blazor WebAssembly Standalone (Free Azure static web app)
52+
7. [todo.bitplatform.cc](https://todo.bitplatform.cc): AOT Compiled .NET 9 PWA with Blazor WebAssembly Standalone (Free Azure static web app)
5153

5254
[Todo](https://todo.bitplatform.dev) & [Adminpanel](https://adminpanel.bitplatform.dev) web apps will launch their respective Android and iOS applications if you have already installed them, mirroring the behavior of apps like YouTube and Instagram.
5355

src/Besql/Bit.Besql/wwwroot/bit-besql.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var BitBesql = window.BitBesql || {};
2-
BitBesql.version = window['bit-besql version'] = '9.1.1';
2+
BitBesql.version = window['bit-besql version'] = '9.1.2';
33

44
BitBesql.init = async function init(fileName) {
55
const sqliteFilePath = `/${fileName}`;

src/Bit.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<PackageProjectUrl>https://github.com/bitfoundation/bitplatform</PackageProjectUrl>
2828

2929
<!-- Version -->
30-
<ReleaseVersion>9.1.1</ReleaseVersion>
30+
<ReleaseVersion>9.1.2</ReleaseVersion>
3131
<PackageVersion>$(ReleaseVersion)</PackageVersion>
3232
<PackageReleaseNotes>https://github.com/bitfoundation/bitplatform/releases/tag/v-$(ReleaseVersion)</PackageReleaseNotes>
3333
<Version Condition=" '$(Configuration)' == 'Release' ">$([System.String]::Copy($(ReleaseVersion)).Replace('-pre-', '.'))</Version>

src/BlazorUI/Bit.BlazorUI.Tests/Bit.BlazorUI.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="bunit.web" Version="1.36.0" />
16+
<PackageReference Include="bunit.web" Version="1.37.7" />
1717
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1818
<PackageReference Include="MSTest.TestAdapter" Version="3.6.4" />
1919
<PackageReference Include="MSTest.TestFramework" Version="3.6.4" />

src/BlazorUI/Bit.BlazorUI/Components/Buttons/BitActionButton/BitActionButton.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ else
3131
{
3232
<a @ref="RootElement" @attributes="HtmlAttributes" @onclick="HandleOnClick"
3333
id="@_Id"
34+
rel="@_rel"
3435
style="@StyleBuilder.Value"
3536
class="@ClassBuilder.Value"
3637
dir="@Dir?.ToString().ToLower()"

src/BlazorUI/Bit.BlazorUI/Components/Buttons/BitActionButton/BitActionButton.razor.cs

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ namespace Bit.BlazorUI;
44

55
public partial class BitActionButton : BitComponentBase
66
{
7+
private string? _rel;
78
private int? _tabIndex;
89
private BitButtonType _buttonType;
910

@@ -62,7 +63,9 @@ public partial class BitActionButton : BitComponentBase
6263
/// The value of the href attribute of the link rendered by the button.
6364
/// If provided, the component will be rendered as an anchor tag instead of button.
6465
/// </summary>
65-
[Parameter] public string? Href { get; set; }
66+
[Parameter]
67+
[CallOnSet(nameof(OnSetHrefAndRel))]
68+
public string? Href { get; set; }
6669

6770
/// <summary>
6871
/// The icon name of the icon to render inside the button.
@@ -90,6 +93,13 @@ public partial class BitActionButton : BitComponentBase
9093
[Parameter, ResetClassBuilder]
9194
public bool ReversedIcon { get; set; }
9295

96+
/// <summary>
97+
/// If Href provided, specifies the relationship between the current document and the linked document.
98+
/// </summary>
99+
[Parameter]
100+
[CallOnSet(nameof(OnSetHrefAndRel))]
101+
public BitLinkRel? Rel { get; set; }
102+
93103
/// <summary>
94104
/// The size of the button.
95105
/// </summary>
@@ -172,4 +182,15 @@ protected virtual async Task HandleOnClick(MouseEventArgs e)
172182
await OnClick.InvokeAsync(e);
173183
}
174184
}
185+
186+
private void OnSetHrefAndRel()
187+
{
188+
if (Rel.HasValue is false || Href.HasNoValue() || Href!.StartsWith('#'))
189+
{
190+
_rel = null;
191+
return;
192+
}
193+
194+
_rel = BitLinkRelUtils.GetRels(Rel.Value);
195+
}
175196
}

src/BlazorUI/Bit.BlazorUI/Components/Buttons/BitButtonGroup/BitButtonGroup.razor

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
tabindex="@(isEnabled ? 0 : -1)"
2222
disabled="@(isEnabled is false)"
2323
aria-disabled="@(isEnabled is false)"
24+
title="@GetItemTitle(item)"
2425
style="@GetStyle(item)"
25-
class="bit-btg-itm @GetClass(item)">
26+
class="@GetItemClass(item)">
2627
@if (template is not null)
2728
{
2829
@template(item)
@@ -33,12 +34,17 @@
3334
}
3435
else
3536
{
36-
var iconName = GetIconName(item);
37+
var iconName = GetItemIconName(item);
3738
@if (iconName.HasValue())
3839
{
3940
<i class="bit-icon bit-icon--@iconName" />
4041
}
41-
<span class="bit-btg-btx">@GetText(item)</span>
42+
43+
var text = GetItemText(item);
44+
if (text.HasValue())
45+
{
46+
<span class="bit-btg-btx">@text</span>
47+
}
4248
}
4349
</button>
4450
}

0 commit comments

Comments
 (0)