From f42cb0143396a93b52db82f8b0c4e8fe5c9dddd5 Mon Sep 17 00:00:00 2001 From: gdlcf88 Date: Mon, 21 Aug 2023 17:14:42 +0800 Subject: [PATCH] Move menu items to Administration --- .../Menus/DynamicFormMenuContributor.cs | 6 +++--- .../Menus/DynamicFormMenuContributor.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/EasyAbp.DynamicForm.Blazor/Menus/DynamicFormMenuContributor.cs b/src/EasyAbp.DynamicForm.Blazor/Menus/DynamicFormMenuContributor.cs index c712232..a01a790 100644 --- a/src/EasyAbp.DynamicForm.Blazor/Menus/DynamicFormMenuContributor.cs +++ b/src/EasyAbp.DynamicForm.Blazor/Menus/DynamicFormMenuContributor.cs @@ -19,9 +19,9 @@ private async Task ConfigureMainMenuAsync(MenuConfigurationContext context) var l = context.GetLocalizer(); //Add main menu items. - var dynamicFormMenu = new ApplicationMenuItem(DynamicFormMenus.Prefix, displayName: l["Menu:DynamicForm"], - "/DynamicForm/FormTemplates/FormTemplate", icon: "fa fa-wpforms"); + var dynamicFormMenu = new ApplicationMenuItem(DynamicFormMenus.Prefix, + displayName: l["Menu:DynamicForm"], "/DynamicForm/FormTemplates/FormTemplate", icon: "fa fa-wpforms"); - context.Menu.AddItem(dynamicFormMenu); + context.Menu.GetAdministration().AddItem(dynamicFormMenu); } } \ No newline at end of file diff --git a/src/EasyAbp.DynamicForm.Web/Menus/DynamicFormMenuContributor.cs b/src/EasyAbp.DynamicForm.Web/Menus/DynamicFormMenuContributor.cs index 9b5d813..1e8ef5c 100644 --- a/src/EasyAbp.DynamicForm.Web/Menus/DynamicFormMenuContributor.cs +++ b/src/EasyAbp.DynamicForm.Web/Menus/DynamicFormMenuContributor.cs @@ -22,8 +22,8 @@ private async Task ConfigureMainMenuAsync(MenuConfigurationContext context) if (await context.IsGrantedAsync(DynamicFormPermissions.FormTemplate.Default)) { - context.Menu.AddItem(new ApplicationMenuItem(DynamicFormMenus.Prefix, displayName: l["Menu:DynamicForm"], - "~/DynamicForm/FormTemplates/FormTemplate", icon: "fa fa-wpforms")); + context.Menu.GetAdministration().AddItem(new ApplicationMenuItem(DynamicFormMenus.Prefix, + displayName: l["Menu:DynamicForm"], "~/DynamicForm/FormTemplates/FormTemplate", icon: "fa fa-wpforms")); } } } \ No newline at end of file