-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting management Blazor UI #5541
Comments
@cotur Thank you for having developed this module. However there seems to be no
|
Hi @Stirda, Yes there is no setting page for a open source module yet, so page is empty for now.
Modules must be seperated and each module may have different scenarios for themselves. So we think, each module should manage their setting pages also, not only declaring. To create a setting page.
This contains a setting form for your module.
public class MyModuleSettingManagementComponentContributor : ISettingComponentContributor
{
public virtual async Task ConfigureAsync(SettingComponentCreationContext context)
{
if (!await CheckPermissionsInternalAsync(context))
{
return;
}
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<MyModuleResource>>();
context.Groups.Add(
new SettingComponentGroup(
"MyCompany.MyModule", // It is a unique setting component id
l["Menu:MyModule"],
typeof(MyModuleSettingManagementComponent)
)
);
}
public virtual async Task<bool> CheckPermissionsAsync(SettingComponentCreationContext context)
{
// check permission for settings page
return true;
}
}
[DependsOn(
...
typeof(AbpSettingManagementBlazorModule)
)]
public class MyBlazorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
....
Configure<SettingManagementComponentOptions>(options =>
{
options.Contributors.Add(new MyModuleSettingManagementComponentContributor());
});
}
} Now you can see your setting page in |
@cotur Thanks a lot for your detailed answer. My settings page works like a charm now. |
@cotur - are the above steps still relevant for |
@274188A yes :) |
With the same features of the MVC/Angular UI. Allow to add components by the modules
The text was updated successfully, but these errors were encountered: