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
10 changes: 5 additions & 5 deletions .github/workflows/bit.full.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,25 +140,25 @@ jobs:

- name: Test PostgreSQL, MySql, Other database options
run: |
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL --framework net8.0
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL --framework net8.0 --signalR
cd TestPostgreSQL/src/Server/TestPostgreSQL.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestMySql --database MySql --framework net8.0
dotnet new bit-bp --name TestMySql --database MySql --framework net8.0 --sample Admin --offlineDb
cd TestMySql/src/Server/TestMySql.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestOther --database Other --framework net9.0
dotnet new bit-bp --name TestOther --database Other --framework net9.0 --sample Todo --sentry
cd TestOther/src/Server/TestOther.Server.Api/
dotnet build

- name: Test file storage options
run: |
dotnet new bit-bp --name TestLocal --filesStorage Local --framework net8.0
dotnet new bit-bp --name TestLocal --filesStorage Local --framework net8.0 --appInsights
cd TestLocal/src/Server/TestLocal.Server.Api/
dotnet build
cd ../../../../
dotnet new bit-bp --name TestAzureBlobStorage --filesStorage AzureBlobStorage --framework net9.0
dotnet new bit-bp --name TestAzureBlobStorage --filesStorage AzureBlobStorage --framework net9.0 --captcha reCaptcha --notification
cd TestAzureBlobStorage/src/Server/TestAzureBlobStorage.Server.Api/
dotnet build

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/todo-sample.cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ jobs:

- name: Configure bswup
run: |
sed -i 's/\/\/ self.noPrerenderQuery/self.noPrerenderQuery/g' TodoSample/src/Client/TodoSample.Client.Web/wwwroot/service-worker.published.js
sed -i 's/\/\/ self.disablePassiveFirstBoot/self.disablePassiveFirstBoot/g' TodoSample/src/Client/TodoSample.Client.Web/wwwroot/service-worker.published.js

- name: Generate CSS/JS files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ public static void Use(WebApplication app, IWebHostEnvironment env, IConfigurati
UseSiteMap(app);

// Handle the rest of requests with blazor
app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>

<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
<BlazorCacheBootResources>false</BlazorCacheBootResources>
<WasmBuildNative>true</WasmBuildNative>
<StaticWebAssetFingerprintingEnabled>false</StaticWebAssetFingerprintingEnabled>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// bit version: 9.1.0
// bit version: 9.1.0

self.assetsInclude = [];
self.assetsExclude = [
/Bit\.Bswup\.NewDemo\.Client\.styles\.css$/
];
self.assetsExclude = [];
self.defaultUrl = '/';
self.prohibitedUrls = [];
self.assetsUrl = '/service-worker-assets.js';
Expand All @@ -16,10 +14,7 @@ self.externalAssets = [
"url": "/"
},
{
"url": "app.css"
},
{
"url": "_framework/blazor.web.js?v=9.0.0"
"url": "_framework/blazor.web.js"
},
{
"url": "Bit.Bswup.NewDemo.styles.css"
Expand Down
1 change: 0 additions & 1 deletion src/Bswup/Bit.Bswup.NewDemo/Bit.Bswup.NewDemo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
app.UseStaticFiles();
app.UseAntiforgery();

app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>

<div class="right-section">
<BitIconButton OnClick="ToggleTheme" IconName="Clock" />
<BitButton OnClick="ToggleTheme" IconName="Clock" />
</div>
</div>
</header>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@inherits AppComponentBase

<NavigationLock OnBeforeInternalNavigation="OnBeforeInternalNavigation" />

<section>
<BitStack Style="padding:1px">
@if (isLoading)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public partial class SessionsSection
{
private bool isLoading;
private Guid? currentSessionId;
private bool hasRevokedAnySession;
private UserSessionDto? currentSession;
private List<Guid> revokingSessionIds = [];
private UserSessionDto[] otherSessions = [];
Expand Down Expand Up @@ -63,7 +62,6 @@ private async Task RevokeSession(UserSessionDto session)
if (await AuthManager.TryEnterElevatedAccessMode(CurrentCancellationToken))
{
await userController.RevokeSession(session.Id, CurrentCancellationToken);
hasRevokedAnySession = true;
SnackBarService.Success(Localizer[nameof(AppStrings.RemoveSessionSuccessMessage)]);
await LoadSessions();
}
Expand Down Expand Up @@ -106,13 +104,4 @@ private string GetLastSeenOn(DateTimeOffset renewedOn)
: DateTimeOffset.UtcNow - renewedOn < TimeSpan.FromMinutes(15) ? Localizer[nameof(AppStrings.Recently)]
: renewedOn.ToLocalTime().ToString("g");
}

private async Task OnBeforeInternalNavigation(LocationChangingContext context)
{
if (hasRevokedAnySession && await AuthorizationService.AuthorizeAsync((await AuthenticationStateTask).User, AuthPolicies.PRIVILEGED_ACCESS) is { Succeeded: false })
{
// Refreshing the token to check if the user session can now be privileged.
await AuthManager.RefreshToken("CheckPrivilege");
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ self.defaultUrl = "/";
self.isPassive = true;
self.errorTolerance = 'lax';
self.caseInsensitiveUrl = true;
self.noPrerenderQuery = 'no-prerender=true';


// on apps with Prerendering enabled, to have the best experience for the end user un-comment the following two lines.
// on apps with Prerendering enabled, to have the best experience for the end user un-comment the following line.
// more info: https://bitplatform.dev/bswup/service-worker
// self.noPrerenderQuery = 'no-prerender=true';
// self.disablePassiveFirstBoot = true;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//+:cnd:noEmit
using Boilerplate.Server.Api.SignalR;
//#if (signalR == true)
using Microsoft.AspNetCore.SignalR;
using Boilerplate.Server.Api.SignalR;
//#endif
using Boilerplate.Shared.Dtos.Categories;
using Boilerplate.Shared.Controllers.Categories;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//+:cnd:noEmit
using Boilerplate.Server.Api.SignalR;
//#if (signalR == true)
using Microsoft.AspNetCore.SignalR;
using Boilerplate.Server.Api.SignalR;
//#endif
using Boilerplate.Shared.Dtos.Products;
using Boilerplate.Shared.Controllers.Products;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ public static void ConfigureMiddlewares(this WebApplication app)
app.UseSiteMap();

// Handle the rest of requests with blazor
//#if (framework == 'net9.0')
app.MapStaticAssets();
//#endif
var blazorApp = app.MapRazorComponents<Components.App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public static void Use(WebApplication app, IWebHostEnvironment env, IConfigurati

UseSiteMap(app);

app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public static void Use(WebApplication app, IWebHostEnvironment env, IConfigurati

UseSiteMap(app);

app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ public static void Use(WebApplication app, IWebHostEnvironment env, IConfigurati

UseSiteMap(app);

app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
Expand Down