diff --git a/.github/workflows/admin-sample.cd.yml b/.github/workflows/admin-sample.cd.yml
index 15961a161b..035715eeab 100644
--- a/.github/workflows/admin-sample.cd.yml
+++ b/.github/workflows/admin-sample.cd.yml
@@ -50,6 +50,15 @@ jobs:
- name: Install wasm
run: cd src && dotnet workload install wasm-tools wasm-experimental
+
+ - name: Configure app render mode
+ run: |
+ sed -i 's/Auto;/BlazorWebAssembly;/g' AdminPanel/src/Client/AdminPanel.Client.Core/Services/AppRenderMode.cs
+
+ - name: Configure bswup
+ run: |
+ sed -i 's/self.noPrerenderQuery/\/\/ self.noPrerenderQuery/g' AdminPanel/src/Client/AdminPanel.Client.Web/wwwroot/service-worker.js
+ sed -i 's/self.isPassive = self.disablePassiveFirstBoot = true;/self.isPassive = self.disablePassiveFirstBoot = false;/g' AdminPanel/src/Client/AdminPanel.Client.Web/wwwroot/service-worker.js
- name: Generate CSS/JS files
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks --no-restore
diff --git a/.github/workflows/bit.full.ci.yml b/.github/workflows/bit.full.ci.yml
index ecdd8021ae..6e1c7c24ac 100644
--- a/.github/workflows/bit.full.ci.yml
+++ b/.github/workflows/bit.full.ci.yml
@@ -40,6 +40,7 @@ jobs:
dotnet ef database update
cd ../../../
dotnet build TodoBPSqlite/TodoBPSqlite.sln -c Release -p:RunAOTCompilation=false
+ dotnet build TodoBPSqlite/src/Client/TodoBPSqlite.Client.Web/TodoBPSqlite.Client.Web.csproj -c Release -p:BlazorWebAssemblyStandalone=true
- name: Release build empty sample + offline db + Win exe
run: |
diff --git a/.github/workflows/todo-sample.cd.yml b/.github/workflows/todo-sample.cd.yml
index 9e15eb5796..a6aad54340 100644
--- a/.github/workflows/todo-sample.cd.yml
+++ b/.github/workflows/todo-sample.cd.yml
@@ -50,8 +50,13 @@ jobs:
- name: Install wasm
run: cd src && dotnet workload install wasm-tools wasm-experimental
- - name: Enable pre rendering
- run: sed -i 's/public static readonly bool PrerenderEnabled = false;/public static readonly bool PrerenderEnabled = true;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs
+ - name: Configure app render mode
+ run: |
+ sed -i 's/public static readonly bool PrerenderEnabled = false;/public static readonly bool PrerenderEnabled = true;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs
+ sed -i 's/Auto;/BlazorWebAssembly;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs
+
+ - name: Changes for static-todo.bitplatform.dev - Part 1
+ run: sed -i 's/http:\/\/localhost:4030/https:\/\/static-todo.bitplatform.dev/g' TodoSample/src/TodoSample.Server/Startup/Middlewares.cs
- name: Generate CSS/JS files
run: dotnet build TodoSample/src/Client/TodoSample.Client.Core/TodoSample.Client.Core.csproj -t:BeforeBuildTasks --no-restore
@@ -65,6 +70,23 @@ jobs:
name: server-bundle
path: ${{env.DOTNET_ROOT}}/server
+ - name: Changes for static-todo.bitplatform.dev - Part 2
+ run: sed -i 's/public static readonly bool PrerenderEnabled = true;/public static readonly bool PrerenderEnabled = false;/g' TodoSample/src/Client/TodoSample.Client.Core/Services/AppRenderMode.cs
+
+ - name: Configure bswup
+ run: |
+ sed -i 's/self.noPrerenderQuery/\/\/ self.noPrerenderQuery/g' TodoSample/src/Client/TodoSample.Client.Web/wwwroot/service-worker.js
+ sed -i 's/self.isPassive = self.disablePassiveFirstBoot = true;/self.isPassive = self.disablePassiveFirstBoot = false;/g' TodoSample/src/Client/TodoSample.Client.Web/wwwroot/service-worker.js
+
+ - name: Publish static todo
+ run: dotnet publish TodoSample/src/Client/TodoSample.Client.Web/TodoSample.Client.Web.csproj -c Release -p:BlazorWebAssemblyStandalone=true -o ${{env.DOTNET_ROOT}}/static
+
+ - name: Upload static artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: static-bundle
+ path: ${{env.DOTNET_ROOT}}/static
+
deploy_api_blazor:
name: deploy api + blazor
needs: build_api_blazor
@@ -323,6 +345,26 @@ jobs:
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_KEY_PRIVATE_KEY }}
+ - name: Delete App Icon
+ run: rm TodoSample/src/Client/TodoSample.Client.Maui/Resources/AppIcon/appicon.svg
+
+ - name: Extract App Icon from env
+ uses: timheuer/base64-to-file@v1
+ with:
+ fileDir: './TodoSample/src/Client/TodoSample.Client.Maui/Resources/AppIcon/'
+ fileName: 'appicon.svg'
+ encodedString: ${{ vars.TODO_ICON }}
+
+ - name: Delete App Splash Screen
+ run: rm TodoSample/src/Client/TodoSample.Client.Maui/Resources/Splash/splash.svg
+
+ - name: Extract App Splash Screen from env
+ uses: timheuer/base64-to-file@v1
+ with:
+ fileDir: './TodoSample/src/Client/TodoSample.Client.Maui/Resources/Splash/'
+ fileName: 'splash.svg'
+ encodedString: ${{ vars.TODO_SPLASH_SCREEN }}
+
- name: Generate CSS/JS files
run: dotnet build TodoSample/src/Client/TodoSample.Client.Core/TodoSample.Client.Core.csproj -t:BeforeBuildTasks --no-restore
diff --git a/README.md b/README.md
index 2e085f37ad..09e2d57fed 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,15 @@ The following apps are our open-source projects powered by the bit platform show
| AdminPanel | [![Prerendered PWA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381583-8b8eb895-80c9-4811-9641-57a5a08db163.png)](https://adminpanel.bitplatform.dev) | [![iOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381842-e72976ce-fd20-431d-a677-ca1ed625b83b.png)](https://apps.apple.com/us/app/bit-adminpanel/id6450611349) | [![Android app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251381958-24931682-87f6-44fc-a1c7-eecf46387005.png)](https://play.google.com/store/apps/details?id=com.bitplatform.AdminPanel.Template) | [![Windows app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382080-9ae97fea-934c-4097-aca4-124a2aed1595.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/AdminPanel-Windows.zip) | [![macOS app](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251382211-0d58f9ba-1a1f-4481-a0ca-b23a393cca9f.png)](https://github.com/bitfoundation/bitplatform/releases/latest/download/AdminPanel-macOS.pkg) |
| bitplatform | [![SPA](https://github-production-user-asset-6210df.s3.amazonaws.com/6169846/251395129-71a5a79c-af74-4d4e-a0f7-ed9a15cf2e46.png)](https://bitplatform.dev)|
-
+1. [bitplatform.dev](bitplatform.dev): Pre-rendered SPA with Blazor WebAssembly
+2. [components.bitplatform.dev](components.bitplatform.dev): Pre-rendered PWA with Blazor Auto
+3. [todo.bitplatform.dev](todo.bitplatform.dev): Pre-rendered PWA with Blazor WebAssembly
+4. [static-todo.bitplatform.dev](static-todo.bitplatform.dev): PWA with Blazor WebAssembly Standalone (Hosted on Cloudflare Pages)
+5. [adminpanel.bitplatform.dev](adminpanel.bitplatform.dev): PWA with Blazor WebAssembly
+
+[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.
+
+Prerendering combined with PWA functionality delivers an experience akin to that of GitHub and Reddit. The bitplatform solution, seamlessly integrated with the innovative new .NET 8 project structure, stands as the exclusive remedy for such a scenario within the realm of Blazor.
# How to contribute?
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Components/AppBswupProgressBar.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Components/AppBswupProgressBar.razor
index b494b59b7b..1b46bed028 100644
--- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Components/AppBswupProgressBar.razor
+++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Web/Components/AppBswupProgressBar.razor
@@ -46,7 +46,7 @@
content: var(--bit-bswup-percent-text, "");
}
/* If you want the update to be applied after the user approves the new Pwa version and not automatically,
- set AutoReload parameter of BswupProgress to true and uncomment the commented codes in this file: */
+ set AutoReload parameter of BswupProgress to false and uncomment the commented codes in this file: */
/*
#bit-bswup-reload {
top: 38px;
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore b/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore
index 9a3e897c1d..5b1a736062 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/.gitignore
@@ -231,4 +231,5 @@ custom.aprof
/src/Client/Boilerplate.Client.Core/wwwroot/scripts/app*.js
-/src/Boilerplate.Server/*.db*
\ No newline at end of file
+/src/Boilerplate.Server/*.db*
+.env
\ No newline at end of file
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor
index 8f7e15d3e9..ab4e72478a 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor
@@ -35,6 +35,10 @@
+ @if (AppRenderMode.PrerenderEnabled is false || noPrerender)
+ {
+
+ }
@if (HttpContext.Request.IsCrawlerClient() is false)
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.cs
index 4a370a7e8a..6b98bd92f1 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.cs
@@ -15,4 +15,4 @@
Boilerplate.Server.Startup.Middlewares.Use(app, builder.Environment, builder.Configuration);
-app.Run();
+await app.RunAsync();
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Startup/Middlewares.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Startup/Middlewares.cs
index 04ff3382fe..f462e78dbd 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Startup/Middlewares.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Startup/Middlewares.cs
@@ -41,6 +41,8 @@ public static void Use(WebApplication app, IHostEnvironment env, IConfiguration
else
{
app.UseHttpsRedirection();
+ app.UseResponseCaching();
+ app.UseResponseCompression();
}
Configure_401_403_404_Pages(app);
@@ -61,19 +63,13 @@ public static void Use(WebApplication app, IHostEnvironment env, IConfiguration
}
});
- app.UseCors(options => options.WithOrigins("https://0.0.0.0" /*BlazorHybrid*/, "app://0.0.0.0" /*BlazorHybrid*/)
+ // 0.0.0.0 origins are essential for the proper functioning of BlazorHybrid's WebView, while localhost:4030 is a prerequisite for BlazorWebAssemblyStandalone testing.
+ app.UseCors(options => options.WithOrigins("https://0.0.0.0", "app://0.0.0.0", "http://localhost:4030")
.AllowAnyHeader().AllowAnyMethod());
app.UseAuthentication();
app.UseAuthorization();
- if (env.IsDevelopment() is false)
- {
- app.UseResponseCompression();
- }
-
- app.UseResponseCaching();
-
app.UseAntiforgery();
app.UseSwagger();
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs
index 01ee1ca00d..30a7684559 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Layout/NavMenu.razor.cs
@@ -6,8 +6,6 @@ namespace Boilerplate.Client.Core.Components.Layout;
public partial class NavMenu : IDisposable
{
- [AutoInject] IUserController userController = default!;
-
private bool disposed;
private bool isSignOutModalOpen;
private string? profileImageUrl;
@@ -95,7 +93,7 @@ protected override async Task OnInitAsync()
await InvokeAsync(StateHasChanged);
});
- user = await userController.GetCurrentUser(CurrentCancellationToken);
+ user = (await HttpClient.GetFromJsonAsync("api/User/GetCurrentUser", AppJsonContext.Default.UserDto, CurrentCancellationToken))!;
var access_token = await PrerenderStateService.GetValue(AuthTokenProvider.GetAccessTokenAsync);
profileImageUrlBase = $"{Configuration.GetApiServerAddress()}api/Attachment/GetProfileImage?access_token={access_token}&file=";
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor
index a5c92e642b..0d50ddee57 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Routes.razor
@@ -5,7 +5,7 @@
-
+
@@ -16,7 +16,7 @@
-
+
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs
index 3e6ff9100e..279f9a0cc4 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs
@@ -13,7 +13,9 @@ public static class AppRenderMode
public static IComponentRenderMode NoPrerenderBlazorWebAssembly => new InteractiveWebAssemblyRenderMode(prerender: false);
public static IComponentRenderMode Current =>
- BuildConfiguration.IsDebug() ? BlazorServer /*For better development experience*/ : Auto;
+ BuildConfiguration.IsDebug()
+ ? BlazorServer // For better development experience.
+ : Auto; // For better production experience.
///
/// To enable/disable pwa support, navigate to Directory.Build.props and modify the PwaEnabled flag.
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html
index a92ba50224..5fdde0d576 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html
@@ -27,85 +27,88 @@
background-color: #0D2960;
}
- .lds-wrapper {
+ .bit-lds-grid div {
+ background-color: #123456;
+ }
+
+ .bit-lds-wrapper {
top: 50%;
left: 50%;
position: absolute;
transform: translate(-50%, -50%);
}
- .lds-grid {
- display: inline-block;
- position: relative;
+ .bit-lds-grid {
width: 80px;
height: 80px;
+ position: relative;
+ display: inline-block;
}
- .lds-grid div {
- position: absolute;
+ .bit-lds-grid div {
width: 16px;
height: 16px;
+ position: absolute;
border-radius: 50%;
- background: #fff;
- animation: lds-grid 1.2s linear infinite;
+ animation: bit-lds-grid 1.2s linear infinite;
}
- .lds-grid div:nth-child(1) {
+ .bit-lds-grid div:nth-child(1) {
top: 8px;
left: 8px;
animation-delay: 0s;
}
- .lds-grid div:nth-child(2) {
+ .bit-lds-grid div:nth-child(2) {
top: 8px;
left: 32px;
animation-delay: -0.4s;
}
- .lds-grid div:nth-child(3) {
+ .bit-lds-grid div:nth-child(3) {
top: 8px;
left: 56px;
animation-delay: -0.8s;
}
- .lds-grid div:nth-child(4) {
+ .bit-lds-grid div:nth-child(4) {
top: 32px;
left: 8px;
animation-delay: -0.4s;
}
- .lds-grid div:nth-child(5) {
+ .bit-lds-grid div:nth-child(5) {
top: 32px;
left: 32px;
animation-delay: -0.8s;
}
- .lds-grid div:nth-child(6) {
+ .bit-lds-grid div:nth-child(6) {
top: 32px;
left: 56px;
animation-delay: -1.2s;
}
- .lds-grid div:nth-child(7) {
+ .bit-lds-grid div:nth-child(7) {
top: 56px;
left: 8px;
animation-delay: -0.8s;
}
- .lds-grid div:nth-child(8) {
+ .bit-lds-grid div:nth-child(8) {
top: 56px;
left: 32px;
animation-delay: -1.2s;
}
- .lds-grid div:nth-child(9) {
+ .bit-lds-grid div:nth-child(9) {
top: 56px;
left: 56px;
animation-delay: -1.6s;
}
- @keyframes lds-grid {
+ @keyframes bit-lds-grid {
0%, 100% {
opacity: 1;
}
@@ -119,8 +122,10 @@
-
-
+
+
+
+
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj
index 18c2061d8d..f7e977615b 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Boilerplate.Client.Web.csproj
@@ -1,53 +1,61 @@
-
-
- net8.0
-
- true
- false
-
-
- true
- true
-
- false
- service-worker-assets.js
- false
- true
- Default
-
- true
-
-
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ net8.0
+
+ true
+ false
+
+ true
+ true
+
+ false
+ service-worker-assets.js
+ false
+ true
+ Default
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor
index e3e2aafd8d..f66ab0e6e3 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Components/AppBswupProgressBar.razor
@@ -46,7 +46,7 @@
content: var(--bit-bswup-percent-text, "");
}
/* If you want the update to be applied after the user approves the new Pwa version and not automatically,
- set AutoReload parameter of BswupProgress to true and uncomment the commented codes in this file: */
+ set AutoReload parameter of BswupProgress to false and uncomment the commented codes in this file: */
/*
#bit-bswup-reload {
top: 38px;
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs
index 7f8876f3bb..b58e0c82b7 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Program.cs
@@ -1,7 +1,16 @@
-using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
+//-:cnd:noEmit
+#if BlazorWebAssemblyStandalone
+using Microsoft.AspNetCore.Components.Web;
+#endif
+using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
+#if BlazorWebAssemblyStandalone
+builder.RootComponents.Add("#app-container");
+builder.RootComponents.Add("head::after");
+#endif
+
builder.Configuration.AddClientConfigurations();
Uri.TryCreate(builder.Configuration.GetApiServerAddress(), UriKind.RelativeOrAbsolute, out var apiServerAddress);
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Properties/launchSettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Properties/launchSettings.json
new file mode 100644
index 0000000000..27ed818356
--- /dev/null
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/Properties/launchSettings.json
@@ -0,0 +1,15 @@
+{
+ "profiles": {
+ "Boilerplate.Web(BlazorWebAssemblyStandalone)": {
+ "commandName": "Project",
+ "dotnetRunMessages": true,
+ "launchBrowser": true,
+ "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
+ "applicationUrl": "http://localhost:4030",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ },
+ "$schema": "http://json.schemastore.org/launchsettings.json"
+}
\ No newline at end of file
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html
new file mode 100644
index 0000000000..859413afa3
--- /dev/null
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js
index 0c4fa6ba58..6bf925d4f1 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.js
@@ -1,4 +1,39 @@
-// In development, always fetch from the network and do not enable offline support.
-// This is because caching would make development more difficult (changes would not
-// be reflected on the first load after each change).
-self.addEventListener('fetch', () => { });
\ No newline at end of file
+// bit version: 8.7.2-pre-01
+// https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup
+
+self.assetsInclude = [];
+self.assetsExclude = [
+ /bit\.blazorui\.fluent\.css$/,
+ /bit\.blazorui\.fluent-dark\.css$/,
+ /bit\.blazorui\.fluent-light\.css$/,
+ /Client\.Web\.styles\.css$/ // In .NET 8, an inexistent CSS file is inadvertently included in the assets list under the name 'Boilerplate.Client.Web.styles.css.'
+ // Subsequently, during the download process of assets list files, bswup attempts to retrieve this non - existent CSS file along with others.
+ // It is imperative that we expunge this file from the assets list.
+];
+self.externalAssets = [
+ {
+ "url": "/"
+ },
+ {
+ url: "_framework/blazor.web.js"
+ }
+];
+
+self.serverHandledUrls = [
+ /\/api\//,
+ /\/odata\//,
+ /\/jobs\//,
+ /\/core\//,
+ /\/signalr\//,
+ /\/healthchecks-ui/,
+ /\/healthz/,
+ /\/swagger/
+];
+
+self.defaultUrl = "/";
+self.caseInsensitiveUrl = true;
+self.noPrerenderQuery = 'no-prerender=true';
+self.isPassive = self.disablePassiveFirstBoot = true;
+self.errorTolerance = 'lax';
+
+self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js');
\ No newline at end of file
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js
deleted file mode 100644
index 0adc03da25..0000000000
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/service-worker.published.js
+++ /dev/null
@@ -1,38 +0,0 @@
-// bit version: 8.7.2-pre-02
-// https://github.com/bitfoundation/bitplatform/tree/develop/src/Bswup
-
-self.assetsInclude = [];
-self.assetsExclude = [
- /bit\.blazorui\.fluent\.css$/,
- /bit\.blazorui\.fluent-dark\.css$/,
- /bit\.blazorui\.fluent-light\.css$/,
- /Client\.Web\.styles\.css$/ // In .NET 8, an inexistent CSS file is inadvertently included in the assets list under the name 'Boilerplate.Client.Web.styles.css.'
- // Subsequently, during the download process of assets list files, bswup attempts to retrieve this non - existent CSS file along with others.
- // It is imperative that we expunge this file from the assets list.
-];
-self.externalAssets = [
- {
- "url": "/"
- },
- {
- "url": "_framework\/blazor.web.js"
- }
-];
-
-self.serverHandledUrls = [
- /\/api\//,
- /\/odata\//,
- /\/jobs\//,
- /\/core\//,
- /\/signalr\//,
- /\/healthchecks-ui/,
- /\/healthz/,
- /\/swagger/
-];
-
-self.defaultUrl = "/";
-self.caseInsensitiveUrl = true;
-self.noPrerenderQuery = 'no-prerender=true';
-self.isPassive = self.disablePassiveFirstBoot = true;
-
-self.importScripts('_content/Bit.Bswup/bit-bswup.sw.js');
\ No newline at end of file
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props
index 4abc97ae7f..e756f92b99 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Directory.Build.props
@@ -11,10 +11,12 @@
en-UStrue
- $(DefineConstants);MultilingualEnabled
-
false
- $(DefineConstants);PwaEnabled
+ false
+
+
+ true14.014.0
@@ -26,6 +28,9 @@
$(DefineConstants);iOS$(DefineConstants);Windows$(DefineConstants);Mac
+ $(DefineConstants);MultilingualEnabled
+ $(DefineConstants);BlazorWebAssemblyStandalone
+ $(DefineConstants);PwaEnabled
diff --git a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Services/RenderModeProvider.cs b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Services/RenderModeProvider.cs
index 6b2bb37bea..a416851b7a 100644
--- a/src/Websites/Careers/src/Bit.Websites.Careers.Client/Services/RenderModeProvider.cs
+++ b/src/Websites/Careers/src/Bit.Websites.Careers.Client/Services/RenderModeProvider.cs
@@ -18,6 +18,6 @@ public static class RenderModeProvider
#if DEBUG
PrerenderEnabledBlazorServer; // Or BlazorServer, for better development experience.
#else
- PrerenderEnabledAuto;
+ PrerenderEnabledBlazorWasm;
#endif
}
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Services/RenderModeProvider.cs b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Services/RenderModeProvider.cs
index 21bb6f5bd2..ec2dc67902 100644
--- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Services/RenderModeProvider.cs
+++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Services/RenderModeProvider.cs
@@ -18,6 +18,6 @@ public static class RenderModeProvider
#if DEBUG
PrerenderEnabledBlazorServer; // Or BlazorServer, for better development experience.
#else
- PrerenderEnabledAuto;
+ PrerenderEnabledBlazorWasm;
#endif
}
diff --git a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Services/RenderModeProvider.cs b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Services/RenderModeProvider.cs
index c9adc543cc..fddd756ae2 100644
--- a/src/Websites/Sales/src/Bit.Websites.Sales.Client/Services/RenderModeProvider.cs
+++ b/src/Websites/Sales/src/Bit.Websites.Sales.Client/Services/RenderModeProvider.cs
@@ -19,6 +19,6 @@ public static class RenderModeProvider
#if DEBUG
PrerenderEnabledBlazorServer; // Or BlazorServer, for better development experience.
#else
- PrerenderEnabledAuto;
+ PrerenderEnabledBlazorWasm;
#endif
}