Activities of "enisn"

Payment redirection is confusing, where does LocalRedirectPreserveMethod

It redirects a page that is included in Volo.Payment.Web. It should redirect to the application which has this reference.

You can add Volo.Payment.Web to your HttpApi.Host project and redirect to the API project. This page contains gateway selection UI if configured multiple gateway, otherwise directly redirects to the single payment provider's page

Sorry for the three new questions to the payment / subscriptions:

  1. Where do I configure whether a subscription is automatically renewed or whether the user has to renew it manually? You at ABP have implemented the “Automatic Renewal” option in “Organization Management”. How does it work if this is changed? Is there a request to the payment provider and then this is stored there with the subscription?

  2. How can you implement that a customer can cancel their subscription again?

Hi,

The Payment Module implements only abstraction between payment gateways and makes payments only. Subscription logic is not implemented in the module. For the subscription feature, it uses Stripe API endpoints and it doesn't track or keep any data about subscription. It checks by using stripe APIs if the subscription ended or was canceled. So, If you need to implement a Subscription logic, you can build your own tracking & keeping data logic in a new module or use an existing subscription logic as a service. Payment module uses only payment APIs over gateways

How can you hide language, container width and appearance menus, both in Main Header Toolbar (General Settings) and in MobileNavBar (MobileGeneralSettings)? Looking into the files for LeptonX, there seem to be switches like" @if (HasMultipleStyles)" and "@if (HasContainerWidth)" but we have not been able where to control/change those. Unlike previous Lepton theme, even if you disable all languages but one, the language menu still seem to render in LeptonX but with only one choice available (the enabled language).

You can create the following component in your application:

using Microsoft.AspNetCore.Components.Rendering;
using Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.Common;
using Volo.Abp.DependencyInjection;

namespace LeptonXDemoApp.Blazor.Components;

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(GeneralSettings), typeof(EmptyGeneralSettings))]
public class EmptyGeneralSettings : GeneralSettings
{

    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    {
        __builder.OpenElement(0, "div");
        __builder.AddAttribute(1, "class", "empty-general-settings");
        __builder.CloseElement();
    }
}

How can you specify theme, container width and appearance either in code or settings (appsettings or similar) for Leptonx so you can control it but not allowing users to modify it?

You can create the following script in wwwroot/globa.js

$(function () {

    const currentInitLeptonX = window.initLeptonX;
    window.initLeptonX = function (layout, defaultStyle = "dim") {

        currentInitLeptonX(layout, defaultStyle);

        leptonx.globalConfig.defaultSettings =
        {
            appearance: "dark",
            containerWidth: 'full',
        };

        leptonx.init.run();
    }
});

And add it to the bundle configuration: (Configure both for Blazor Server)


// For Blazor Server
options.ScriptBundles.Configure(
    LeptonXThemeBundles.Scripts.Global,
    bundle =>
    {
        bundle.AddFiles("/global.js");
    }
);

// For Blazor WASM / MauiBlazor / Blazor Server
options.ScriptBundles.Configure(
    BlazorLeptonXThemeBundles.Scripts.Global,
    bundle =>
    {
        bundle.AddFiles("/global.js");
    });

3.For the MobileNavBar, is there a way to hide the "Settings" or at least move it in under the user menu so that "slot" in the tab bar can instead be used for something more useful, like navigating to a page just like Home/Dashboard? With only fem slots available, 4 including the hamburger menu, it seems like a waste to dedicate one of them to Settings that you might change once or twice (or never)

It's a design decision, there is no configuration for it right now, you can customize it by overriding the MobileNavBar component in your project.

4.How come the MobileNavBar can't be controlled like the normal main menu? Seems like the only way is to hardcode items using options.MobileMenuSelector = items => items.Where(...) which isn't ideal for various reasons.

5.How can you control/change the number of items for MobileMenuSelector ? 2 seems to be default but have found not documentation on how to change that.

It uses regular menu contributor to list menu items. Bottom bar is designed for mobile requirements and it has limited space. So only 2 items can be placed there, you can pick which ones will be there. But still all the menu items will be included in hamburger menu.

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:

  • We can implement a new page after redirection to different schemes than http(s)://
  • We can implement the logic in the MAUI app that brings to the front itself on the desktop apps and use can recognize that the login operation is done.

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?

Showing 1 to 10 of 489 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13