Skip to content

Commit

Permalink
feat(websites): update Platform website docs for recent changes of Bo…
Browse files Browse the repository at this point in the history
…ilerplate #8923 (#8924)
  • Loading branch information
ysmoradi authored Oct 16, 2024
1 parent aff0257 commit 32a278d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,11 @@
{
<BitAccordion Title=".NET 8 Sdk on Linux instructions">
<div>To install .NET 8 SDK on Linux(Ubuntu) run the following commands:</div>
<CodeBox>wget https://download.visualstudio.microsoft.com/download/pr/1ebffeb0-f090-4001-9f13-69f112936a70/5dbc249b375cca13ec4d97d48ea93b28/dotnet-sdk-8.0.402-linux-x64.tar.gz -O $HOME/dotnet.tar.gz
<CodeBox>wget https://download.visualstudio.microsoft.com/download/pr/ca6cd525-677e-4d3a-b66c-11348a6f920a/ec395f498f89d0ca4d67d903892af82d/dotnet-sdk-8.0.403-linux-x64.tar.gz -O $HOME/dotnet.tar.gz
mkdir -p $HOME/.dotnet
tar zxf $HOME/dotnet.tar.gz -C "$HOME/.dotnet"
echo 'PATH=$HOME/.dotnet:$HOME/.dotnet/tools:$PATH' >> ~/.bashrc
export PATH=$HOME/.dotnet:$HOME/.dotnet/tools:$PATH
dotnet dev-certs https --trust
rm $HOME/dotnet.tar.gz</CodeBox>
</BitAccordion>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,24 +149,17 @@
Additionally, it features an auto-update capability.
<br />
<br />
If you set BlazorWebAssemblyStandalone to true in the Directory.Build.props file, the Client.Web project can be published as a
Client.Web project can be published as a
Blazor WebAssembly Standalone application on platforms such as <a href="https://pages.cloudflare.com/" target="_blank">Cloudflare Pages</a>,
<a href="https://azure.microsoft.com/en-us/products/app-service/static" target="_blank">Azure Static Web Apps</a>,
<a href="https://pages.github.com/" target="_blank">GitHub Pages</a>, and others, without requiring ASP.NET Core.
<br />
<br />
We recommend keeping BlazorWebAssemblyStandalone set to false during development and only enabling it during the publishing process.
To do this, use the following command:
<br />
<CodeBox>dotnet publish MyFirstProject.Client.Web -c Release -p:BlazorWebAssemblyStandalone=true</CodeBox>
</div>
</section>

<section class="section-card">
<div class="section-card-txt">
<BitText Typography="BitTypography.H5" Gutter>Test Project</BitText>
A sample test project is provided to demonstrate how to add integration tests to your project in a way that replicates the real
behavior of a server, such as using SignalR. Additionally, it offers guidance on using dependency injection to mock server behavior and logic when needed.
A sample test project is provided to demonstrate how to add integration and UI tests to your project.
</div>
</section>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
Warning: It is advisable to use this option only when necessary, as integrating Entity Framework Core can increase application size and potentially reduce startup performance.
</BitGridItem>

<BitGridItem Class="grid-item" ColumnSpan="2">
<BitGridItem Class="grid-item">
<div class="row">
<BitText Typography="BitTypography.H6" Gutter>Server Database</BitText>
<BitDropdown Placeholder="Choose database" Items="@database.Items" @bind-Value="@database.Value" />
Expand Down Expand Up @@ -278,6 +278,18 @@
}
</BitGridItem>

<BitGridItem Class="grid-item">
<div class="row">
<BitText Typography="BitTypography.H6" Gutter>Push Notification (Native and Web Push)</BitText>
<BitToggle @bind-Value="notification.Value" OnText="true" OffText="false" />
</div>
<br />
<CodeBox>
@GetNotificationCommand()
</CodeBox>
Setting this parameter to True enables native push notification using firebase and APN for Androiod, iOS and macOS apps alongside with Web Push for Web Browsers.
</BitGridItem>

<BitGridItem Class="grid-item" ColumnSpan="2">
<div class="row">
<BitText Typography="BitTypography.H6" Gutter>API</BitText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ public partial class Templates05CreateProjectPage
Value = false,
Default = false,
};

private Parameter<bool> notification = new()
{
Value = false,
Default = false,
};

private Parameter<bool> appInsight = new()
{
Expand Down Expand Up @@ -152,6 +158,11 @@ private string GetFinalCommand()
finalCommand.Append(GetOfflineDbCommand());
}

if (notification.IsModified)
{
finalCommand.Append(GetNotificationCommand());
}

if (appInsight.IsModified)
{
finalCommand.Append(GetAppInsightsCommand());
Expand Down Expand Up @@ -215,6 +226,11 @@ private string GetOfflineDbCommand()
return $"--offlineDb {offlineDb.Value.ToString().ToLowerInvariant()} ";
}

private string GetNotificationCommand()
{
return $"--notification {notification.Value.ToString().ToLowerInvariant()} ";
}

private string GetAppInsightsCommand()
{
return $"--appInsights {appInsight.Value.ToString().ToLowerInvariant()} ";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@
<br />
<br />
<BitText Typography="BitTypography.H5" Gutter>Running in Blazor WebAssembly Standalone Mode</BitText>
To run the project in Blazor WebAssembly Standalone mode, set <i>BlazorWebAssemblyStandalone</i> to true in the Directory.Build.props file.
Additionally, run Client.Web in addition to server project.
To run the project in Blazor WebAssembly Standalone mode, run Client.Web in addition to server project.
<br />
<div class="image-container">
<img class="image" src="images/templates/launch-options.webp" />
Expand Down

0 comments on commit 32a278d

Please sign in to comment.