Ends in:
7 DAYS
16 HRS
23 MIN
55 SEC
Ends in:
7 D
16 H
23 M
55 S

Activities of "vd"

My goal is not to rewrite the whole mobile navigation bar, just to remove a menu for both desktop and mobile.

Others have asked for mobile menu customization recently : https://abp.io/support/questions/7933/Mobile-menu-for-LeptonX-theme-modifications

Thank you

Well it makes some sense :

I had no tenant so the "standard" subscription was neither attached to any tenant nor to the host.

Hence it only worked when changing host settings and not the "standard" subscription settings.

When I create a tenant, assign it the standard edition and then login under a user that belongs to this tenant, it works.

Since we are not using tenants or subscriptions, I'll stick with the host settings.

I was accessing features through Saas > Editions > Standard > Actions > Features (which changes the features of the standard edition, Not the host)

Whereas the correct path is Settings > Feature management > Manage host features

I can reproduce in incognito mode as well.

How can I send you a minimal test project ?

Since upgrading to 8.3.1, I get a lot of warnings in the console :

Warnings seem to be related to menu items. I think that the tracking expression when enumerating the menu entries should be adjusted on your side.

  • ABP Framework version: v8.3.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server)
  • Auth Server Separated (for Angular): no
  • Steps to reproduce the issue:

Create a FeatureDefinitionProvider class in Application.Contracts :

using MyApp.Localization;
using Volo.Abp.Features;
using Volo.Abp.Localization;
using Volo.Abp.Validation.StringValues;

namespace MyApp.Features
{
    public class MyAppFeatureDefinitionProvider : FeatureDefinitionProvider
    {
        public override void Define(IFeatureDefinitionContext context)
        {
            var myGroup = context.AddGroup("MyApp");

            myGroup.AddFeature(
                "MyApp.MyFeature",
                defaultValue: "false",
                displayName: LocalizableString
                                 .Create<MyAppResource>("SomeFeature"),
                valueType: new ToggleStringValueType()
            );
        }
    }
}

Enable the feature :

Refresh the page then get the feature. I expect it to be 'true' but it's always false.

First I tried in route.provider.ts

import { ConfigStateService, RoutesService, eLayoutType } from '@abp/ng.core';
import { APP_INITIALIZER } from '@angular/core';

export const APP_ROUTE_PROVIDER = [{ provide: APP_INITIALIZER, useFactory: configureRoutes, deps: [RoutesService, ConfigStateService], multi: true }];

function configureRoutes(routes: RoutesService, config: ConfigStateService) {
    return () => {
        routes.add([
	    //...
            {
                path: '/mymy',
                name: '::Menu:MyFeature',
                iconClass: 'fas fa-whatever',
                order: 3,
                parentName: '::Menu:MyParent',
                layout: eLayoutType.application,
                //requiredPolicy: 'MyApp.MyFeature', 			 // ---> Doesn't work (I guess it only works with permissions)
                //invisible: config.getFeature('MyApp.MyFeature') != 'false',// ---> Always 'false'
            },
        ]);
    };
}

Second in app.component.ts :

import { Component } from '@angular/core';
import { NavItemsService, UserMenuService } from '@abp/ng.theme.shared';
import { eThemeLeptonXComponents, eUserMenuItems } from '@volosoft/abp.ng.theme.lepton-x';
import { ConfigStateService, ReplaceableComponentsService, RoutesService } from '@abp/ng.core';

@Component({
    selector: 'app-root',
    template: `
        &lt;abp-loader-bar&gt;&lt;/abp-loader-bar&gt;
        &lt;abp-dynamic-layout&gt;&lt;/abp-dynamic-layout&gt;
        &lt;abp-gdpr-cookie-consent&gt;&lt;/abp-gdpr-cookie-consent&gt;
    `,
})
export class AppComponent {
    constructor(
        private replaceComponent: ReplaceableComponentsService,
        private config: ConfigStateService,
        private routes: RoutesService,
    ) {
        let myFeature = this.config.getFeature('MyApp.MyFeature');  // ---> Always 'false'

        if (myFeature === 'false') {
            this.routes.remove(['::Menu:MyFeature']);
        }
    }
}

In Angular, default cookie and privacy policy links are wrong :

Please update the urls in app.module :

Hello,

Please try with this code

export class AppComponent implements OnInit { 
 
  constructor(private replaceComponent: ReplaceableComponentsService, private config: ConfigStateService ) {} 
 
  ngOnInit(): void { 
    const currentUser = this.config.getOne("currentUser"); 
      if(currentUser.roles.includes('admin')) 
        { 
          this.replaceComponent.add({ 
            component: MySettingsComponent, 
            key: eThemeLeptonXComponents.Settings, 
        }); 
        } 
 
  } 
} 
 

It will hide menu for 'admin' role and for other users it will show. You may customize it as per your requirement.

Thanks,

When I say other customer, I meant, another application instance but ok, I get the gist. Thanks.

However, I just realized that the removed 'settings' menu still appears in mobile :

Shouldn't it be removed as well ?

Thanks it works but what if for another customer, I want to keep the language selector (and remove the other settings) ?

  • abp version: 8.3.1
  • Template: app
  • Created ABP Studio Version: 0.8.1
  • Tiered: No
  • UI Framework: angular
  • Theme: leptonx
  • Theme Style: system
  • Database Provider: ef
  • Database Management System: sqlserver
  • Separate Tenant Schema: No
  • Mobile Framework: none
  • Progressive Web App: No
  • Public Website: No
  • Optional Modules:
    • GDPR
    • FileManagement
    • TextTemplateManagement
    • LanguageManagement
    • AuditLogging
    • SaaS
    • OpenIddictAdmin

How can I easily hide the bottom-right menu items ? Can I hide them separately or should I hide them one by one ?

Showing 1 to 10 of 20 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06