Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"copyOnly": [
"**/wwwroot/lib/bootstrap/**",
"**/*.svg",
"**/*.ttf"
"**/*.ttf",
"**/*.razor.js"
],
"modifiers": [
{
Expand Down Expand Up @@ -289,7 +290,10 @@
"sourceVariableName": "kestrelHttpPort",
"fallbackVariableName": "kestrelHttpPortGenerated"
},
"replaces": "5500"
"replaces": "5500",
"onlyIf": [{
"after": "localhost:"
}]
},
"kestrelHttpsPort": {
"type": "parameter",
Expand All @@ -311,7 +315,10 @@
"sourceVariableName": "kestrelHttpsPort",
"fallbackVariableName": "kestrelHttpsPortGenerated"
},
"replaces": "5501"
"replaces": "5501",
"onlyIf": [{
"after": "localhost:"
}]
},
"iisHttpPort": {
"type": "parameter",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// Handle navigation menu toggle
const navScrollable = document.getElementById("nav-scrollable");
const navToggler = document.querySelector(".navbar-toggler");
if (!globalThis.__mauiNavMenuCollapseInitialized) {
globalThis.__mauiNavMenuCollapseInitialized = true;

if (navScrollable && navToggler) {
navScrollable.addEventListener("click", function() {
navToggler.click();
document.addEventListener("click", function(event) {
const target = event.target;

if (target instanceof Element && target.closest("#nav-scrollable")) {
document.querySelector(".navbar-toggler")?.click();
}
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="MS_COMPONENTS_WEBASSEMBLY_VERSION" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.0" Condition="'$(IndividualLocalAuth)' == 'True'" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="MS_COMPONENTS_WEBASSEMBLY_VERSION" Condition="'$(IndividualLocalAuth)' == 'True'" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ static async Task Main(string[] args)
#if (IndividualLocalAuth)
builder.Services.AddAuthorizationCore();
builder.Services.AddCascadingAuthenticationState();
builder.Services.AddSingleton<AuthenticationStateProvider, PersistentAuthenticationStateProvider>();
builder.Services.AddAuthenticationStateDeserialization();
Comment thread
kubaflo marked this conversation as resolved.

#endif
await builder.Build().RunAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#if (IndividualLocalAuth)
builder.Services.AddAuthorizationCore();
builder.Services.AddCascadingAuthenticationState();
builder.Services.AddSingleton<AuthenticationStateProvider, PersistentAuthenticationStateProvider>();
builder.Services.AddAuthenticationStateDeserialization();
Comment thread
kubaflo marked this conversation as resolved.

#endif
await builder.Build().RunAsync();
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
<p class="components-pause-visible">
The session has been paused by the server.
</p>
<button id="components-resume-button" class="components-pause-visible">
Resume
</button>
<p class="components-resume-failed-visible">
Failed to resume the session.<br />Please reload the page.
Failed to resume the session.<br />Please retry or reload the page.
</p>
<button id="components-resume-button" class="components-pause-visible components-resume-failed-visible">
Resume
</button>
</div>
</dialog>
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@
opacity: 0;
transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
&[open]

{
animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
animation-fill-mode: both;
}

&[open] {
animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
animation-fill-mode: both;
}
}

#components-reconnect-modal::backdrop {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function resume() {
location.reload();
}
} catch {
location.reload();
reconnectModal.classList.replace("components-reconnect-paused", "components-reconnect-resume-failed");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<div id="app">Loading...</div>

<script src="_framework/blazor.webview.js" autostart="false"></script>
<!--#if (SampleContent) -->
<script type="module" src="_content/MauiApp.1.Shared/Layout/NavMenu.razor.js"></script>
<!--#endif -->
Comment thread
kubaflo marked this conversation as resolved.

</body>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"copyOnly": [
"**/wwwroot/lib/bootstrap/**",
"**/*.svg",
"**/*.ttf"
"**/*.ttf",
"**/*.razor.js"
],
"modifiers": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
// Handle navigation menu toggle
const navScrollable = document.getElementById("nav-scrollable");
const navToggler = document.querySelector(".navbar-toggler");
if (!globalThis.__mauiNavMenuCollapseInitialized) {
globalThis.__mauiNavMenuCollapseInitialized = true;

if (navScrollable && navToggler) {
navScrollable.addEventListener("click", function() {
navToggler.click();
document.addEventListener("click", function(event) {
const target = event.target;

if (target instanceof Element && target.closest("#nav-scrollable")) {
document.querySelector(".navbar-toggler")?.click();
}
});
}
3 changes: 3 additions & 0 deletions src/Templates/src/templates/maui-blazor/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
</div>

<script src="_framework/blazor.webview.js" autostart="false"></script>
<!--#if (SampleContent) -->
<script type="module" src="Components/Layout/NavMenu.razor.js"></script>
Comment thread
kubaflo marked this conversation as resolved.
<!--#endif -->
Comment thread
kubaflo marked this conversation as resolved.

</body>

Expand Down
Loading