Can you re-generate blazor bundles with abp bundle
command?
Not sure if this is a bug or intentional but when creating a Blazor WASM in ABP Suite, it creates both a ProjectName.Blazor and a ProjectName.Blazor.Client project, ie just like if you create a Blazor WebApp project. This is different from the Visual Studio template which only creates a single project for Blazor WASM, and also unlike how it was before from what I remember (could be wrong). If you create a Blazor Server project, it will still only be a ProjectName.Blazor project.
So it seeems ABP Suite basically creates a WASM version of the Blazor WebApp, which you can also see by it containing .AddInteractiveWebAssemblyComponents(); etc.
It does seem to be working though, but not sure if this is intentional but it is at least different from the Blazor WASM template in Visual Studio?
In the new version, we switched to Blazor WebApp hosting logic. Yes your project will have both of projects (.Blazor
and .Blazor.Client
) but its behavior is what you pick while creating. If you choose WASM, it'll work as blazor-wasm, if you choose server, it'll work as blazor-server. We just merged infrastructure of all blazor project-types. Still you can create an old template and upgrade it to use previous logic
It's already done by MAUI but it seems WinUI3 has a problem with that Activate()
method:
https://github.com/microsoft/microsoft-ui-xaml/issues/7595
It brings too complex solutions,
It seems this one is good: https://stackoverflow.com/a/12758966/7200126
But still I recommend waiting WinUI3 to fix it. In our side we'll add another page when redirect uri scheme is different than http(s)
On the MAUI, all the codes inside in your application, an you try adding the following code-block into your LoginOrLogoutViewModel.cs
at the end of the LoginOrLogout()
method:
#if WINDOWS
if (App.Current?.Windows.LastOrDefault()?.Handler.PlatformView is Microsoft.UI.Xaml.Window window)
{
// Bring the main window in the front
window.Activate();
}
#endif
Hi,
MAUI implements the default behaviour of OAuth login and redirects to browser to login. And browser redirect back to the application with a specific scheme like (yourapp://callback
). By default it should open your application and bring it to the front. But I reproduced the same scenario as you said, it stays in the background but login operation is completed. Here is the 2 cases:
http(s)://
If you have source-code access, you can download source-code of lepton via the following command:
abp get-source Volo.Abp.LeptonXTheme.Pro
Also I can share with you the previous version with flags:
Themes/Lepton/Components/Toolbar/LanguageSwitch/Default.cshtml
:
@using Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton.Themes.Lepton.Components.Toolbar.LanguageSwitch
@using Microsoft.AspNetCore.Http.Extensions
@model LanguageSwitchViewComponentModel
@if (Model.OtherLanguages.Any())
{
<div class="dropdown">
<a class="btn dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@if (@Model.CurrentLanguage.FlagIcon != null)
{
<span class="fi fis fi-@Model.CurrentLanguage.FlagIcon" data-bs-toggle="tooltip" title="@Model.CurrentLanguage.DisplayName" role="tooltip"></span>
}
else
{
<span class="fi fis fi-@Model.CurrentLanguage.CultureName" data-bs-toggle="tooltip" title="@Model.CurrentLanguage.DisplayName" role="tooltip"></span>
}
<span class="current-language-name">@Model.CurrentLanguage.DisplayName</span>
</a>
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuLink">
@foreach (var language in Model.OtherLanguages)
{
<a class="dropdown-item" href="~/Abp/Languages/Switch?culture=@(language.CultureName)&uiCulture=@(language.UiCultureName)&returnUrl=@(System.Net.WebUtility.UrlEncode(Context.Request.GetEncodedPathAndQuery()))">
@if (language.FlagIcon != null)
{
<span class="fi fis me-2 fi-@language.FlagIcon"></span>
}
else
{
<span class="fi fis me-2 fi-@language.CultureName"></span>
}
@language.DisplayName
</a>
}
</div>
</div>
}
Can you share which error you got?
Hi, flag-icons are removed from ABP Framework & Lepton themes.
Here was the diff from the removal operation:
If you still want to use, you can override the following component: /Themes/Lepton/Components/Toolbar/LanguageSwitch/Default.cshtml
and re-apply this changes.
And don't forget to add abp/flag-icon-css
dependency into your packages.json
:
"@abp/flag-icon-css": "~7.4.5",
Sadly I can not reproduce this problem, please provide us logs to understand problem and help you. Check console logs or find Logs/logs.txt
under your application. And also, it might be a JavasScript problem, please check browser logs too and provide us
Creating a new solution for MAUI Blazor in ABP Suite RC3 always seem to give the error below when trying to run it. Other MAUI related projects inside of ABP and outside seem to work though, like if you select to have a ABP Suite create a Mobile MAUI app. So it seems to be related to to particular template.
Severity Code Description Project File Line Suppression State Error DEP1000: Cannot copy file "C:\Users\***\.nuget\packages\volo.abp.aspnetcore.components.web.leptonxtheme\3.2.0-rc.3\staticwebassets\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css.map" to layout "M:\Projects\ASP.NET\ABP\src\ABPTester6\src\ABPTester6.MauiBlazor\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppX\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css.map". DirectoryNotFoundException - Could not find a part of the path 'M:\Projects\ASP.NET\ABP\src\ABPTester6\src\ABPTester6.MauiBlazor\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppX\wwwroot\_content\Volo.Abp.AspNetCore.Components.Web.LeptonXTheme\side-menu\libs\bootstrap-datepicker\css\bootstrap-datepicker.standalone.css.map'. [0x80070003] ABPTester6.MauiBlazor
Edit:
Maybe this is casued by the long path problems in Windows and not ABP, will do further testing.
Edit 2:
Not ABPs fault, Microsoft apparently broke MAUI again https://github.com/dotnet/maui/issues/17828 (or Windows to be exact)
You may try the Solution 3 in the following documentation to overcome this issue. Visual Studo or any other IDe still can't work but you can build from terminal via dotnet CLI https://docs.abp.io/en/abp/8.1/KB/Windows-Path-Too-Long-Fix#solution-3