Browse Source

Basically done

pull/4/head
liangshiwei 4 years ago
parent
commit
ae4be7a25f
  1. 20
      delete-bin-obj-folders.bat
  2. 200
      lsw.Abp.AntDesignUI.sln
  3. 18
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/AbpFeatureManagementBlazorAntDesignModule.cs
  4. 12
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/AbpFeatureManagementComponentBase.cs
  5. 78
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/Components/FeatureManagementModal.razor
  6. 202
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/Components/FeatureManagementModal.razor.cs
  7. 17
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.csproj
  8. 13
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI/AbpFeatureManagementBlazorWebServerAntDesignModule.cs
  9. 14
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI/Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI.csproj
  10. 15
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI/AbpFeatureManagementBlazorWebAssemblyAntDesignModule.cs
  11. 16
      modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI/Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI.csproj
  12. 19
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/AbpIdentityBlazorAntDesignAutoMapperProfile.cs
  13. 68
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/AbpIdentityBlazorAntDesignModule.cs
  14. 40
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/AbpIdentityWebMainMenuContributor.cs
  15. 9
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/IdentityMenuNames.cs
  16. 17
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI.csproj
  17. 70
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleManagement.razor
  18. 137
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleManagement.razor.cs
  19. 22
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleNameComponent.razor
  20. 9
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleNameComponent.razor.cs
  21. 129
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/UserManagement.razor
  22. 212
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/UserManagement.razor.cs
  23. 7
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/_Imports.razor
  24. 14
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI/AbpIdentityBlazorServerAntDesignModule.cs
  25. 12
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI/Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI.csproj
  26. 15
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI/AbpIdentityBlazorWebAssemblyAntDesignModule.cs
  27. 17
      modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI/Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI.csproj
  28. 24
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/AbpAspNetCoreComponentsServerAntDesignThemeModule.cs
  29. 20
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/AntDesignThemeToolbarContributor.cs
  30. 14
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorAntDesignThemeBundles.cs
  31. 8
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorAntDesignThemeScriptContributor.cs
  32. 12
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorAntDesignThemeStyleContributor.cs
  33. 3
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/FodyWeavers.xml
  34. 11
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj
  35. 64
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Themes/AntDesignTheme/LanguageSwitch.razor
  36. 42
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Themes/AntDesignTheme/LoginDisplay.razor
  37. 32
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Themes/AntDesignTheme/LoginDisplay.razor.cs
  38. 7
      modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Themes/AntDesignTheme/_Imports.razor
  39. 4
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/AbpPageHeader.razor.cs
  40. 2
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/PageLayout.cs
  41. 2
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.csproj
  42. 4
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Settings/MenuPlacement.cs
  43. 1
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor
  44. 3
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor.cs
  45. 20
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/MainMenuItem.razor
  46. 12
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/MainMenuItem.razor.cs
  47. 57
      modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/wwwroot/libs/abp/css/theme.css
  48. 4
      modules/Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme/AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule.cs
  49. 7
      modules/Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme/Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj
  50. 20
      modules/Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme/Themes/AntDesignTheme/LoginDisplay.razor
  51. 16
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/AbpPermissionManagementBlazorAntDesignModule.cs
  52. 48
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/Components/PermissionManagementModal.razor
  53. 187
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/Components/PermissionManagementModal.razor.cs
  54. 16
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.csproj
  55. 6
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/_Imports.razor
  56. 13
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI/AbpPermissionManagementBlazorServerAntDesignModule.cs
  57. 12
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI/Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI.csproj
  58. 15
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI/AbpPermissionManagementBlazorWebAssemblyAntDesignModule.cs
  59. 16
      modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI/Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI.csproj
  60. 43
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/AbpSettingManagementBlazorAntDesignModule.cs
  61. 11
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/ISettingComponentContributor.cs
  62. 30
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/AntDesignThemeGroup/AntDesignThemeGroupViewComponent.razor
  63. 70
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/AntDesignThemeGroup/AntDesignThemeGroupViewComponent.razor.cs
  64. 46
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor
  65. 54
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs
  66. 33
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/SettingManagement.razor
  67. 57
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/SettingManagement.razor.cs
  68. 21
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingComponentCreationContext.cs
  69. 38
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingComponentGroup.cs
  70. 11
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingManagementBlazorAutoMapperProfile.cs
  71. 15
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingManagementComponentOptions.cs
  72. 62
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingManagementMenuContributor.cs
  73. 6
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingManagementMenus.cs
  74. 71
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Settings/AntDesignSettingDefultPageContributor.cs
  75. 16
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Volo.Abp.SettingManagement.Blazor.AntDesignUI.csproj
  76. 5
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/_Imports.razor
  77. 14
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI/AbpSettingManagementBlazorWebAssemblyAntDesignModule.cs
  78. 12
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI/Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI.csproj
  79. 15
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI/AbpSettingManagementBlazorWebAssemblyAntDesignModule.cs
  80. 17
      modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI/Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI.csproj
  81. 57
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/AbpTenantManagementBlazorAntDesignModule.cs
  82. 13
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/AbpTenantManagementBlazorAutoMapperProfile.cs
  83. 16
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/Lsw.Abp.TenantManagement.Blazor.AntDesignUI.csproj
  84. 66
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/Pages/TenantManagement.razor
  85. 137
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/Pages/TenantManagement.razor.cs
  86. 38
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/TenantManagementBlazorMenuContributor.cs
  87. 8
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/TenantManagementMenuNames.cs
  88. 7
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/_Imports.razor
  89. 14
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI/AbpTenantManagementBlazorServerAntDesignModule.cs
  90. 12
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI/Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI.csproj
  91. 17
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI/AbpTenantManagementBlazorWebAssemblyAntDesignModule.cs
  92. 16
      modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI/Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI.csproj
  93. 1
      samples/BookStore/.gitattributes
  94. 262
      samples/BookStore/.gitignore
  95. 5
      samples/BookStore/.prettierrc
  96. 51
      samples/BookStore/BookStore.BlazorServer/BookStore.BlazorServer.csproj
  97. 240
      samples/BookStore/BookStore.BlazorServer/BookStoreBlazorModule.cs
  98. 10
      samples/BookStore/BookStore.BlazorServer/BookStoreBrandingProvider.cs
  99. 12
      samples/BookStore/BookStore.BlazorServer/BookStoreComponentBase.cs
  100. 52
      samples/BookStore/BookStore.BlazorServer/Menus/BookStoreMenuContributor.cs

20
delete-bin-obj-folders.bat

@ -0,0 +1,20 @@
@ECHO off
cls
ECHO Deleting all BIN and OBJ folders...
ECHO.
FOR /d /r . %%d in (bin,obj) DO (
IF EXIST "%%d" (
ECHO %%d | FIND /I "\node_modules\" > Nul && (
ECHO.Skipping: %%d
) || (
ECHO.Deleting: %%d
rd /s/q "%%d"
)
)
)
ECHO.
ECHO.BIN and OBJ folders have been successfully deleted. Press any key to exit.
pause > nul

200
lsw.Abp.AntDesignUI.sln

@ -18,6 +18,70 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{DA09D6FA-2
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesignUIApp", "test\AntDesignUIApp\AntDesignUIApp.csproj", "{62B99860-4CED-404F-A378-37B40043F10C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AntDesignUIApp", "test\AntDesignUIApp\AntDesignUIApp.csproj", "{62B99860-4CED-404F-A378-37B40043F10C}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BookStore", "BookStore", "{1F85F600-70F9-4286-B8BD-6A124D9DC43D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.Application", "samples\BookStore\src\BookStore.Application\BookStore.Application.csproj", "{39E479A5-92DB-4F5B-918A-1920886D4D60}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.Application.Contracts", "samples\BookStore\src\BookStore.Application.Contracts\BookStore.Application.Contracts.csproj", "{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.Blazor", "samples\BookStore\src\BookStore.Blazor\BookStore.Blazor.csproj", "{2A93E06E-1046-415B-81AC-D02995701EB6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.DbMigrator", "samples\BookStore\src\BookStore.DbMigrator\BookStore.DbMigrator.csproj", "{ED293EED-7565-45DB-806B-80AB348E76EB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.Domain", "samples\BookStore\src\BookStore.Domain\BookStore.Domain.csproj", "{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.Domain.Shared", "samples\BookStore\src\BookStore.Domain.Shared\BookStore.Domain.Shared.csproj", "{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.EntityFrameworkCore", "samples\BookStore\src\BookStore.EntityFrameworkCore\BookStore.EntityFrameworkCore.csproj", "{10ABF4AB-D8A0-46C0-8017-61455CEF2570}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.HttpApi", "samples\BookStore\src\BookStore.HttpApi\BookStore.HttpApi.csproj", "{5290EAE2-F272-479D-BB76-0C059EEBA077}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.HttpApi.Client", "samples\BookStore\src\BookStore.HttpApi.Client\BookStore.HttpApi.Client.csproj", "{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.HttpApi.Host", "samples\BookStore\src\BookStore.HttpApi.Host\BookStore.HttpApi.Host.csproj", "{8223814F-FD5F-4D77-8C37-6B578333ADE6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PermissionManagement", "PermissionManagement", "{30DCF9C7-BEA3-46D8-83C4-748FF24FFB96}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.PermissionManagement.Blazor.AntDesignUI", "modules\PermissionManagement\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.csproj", "{FD90132E-3B0E-4677-A7CE-8783FCC5E427}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "IdentityManagement", "IdentityManagement", "{8EC75594-FF27-4590-A726-B0C240EC0DC6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI", "modules\PermissionManagement\Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI\Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI.csproj", "{EF106F75-3B60-4C72-902D-DDE46EEF7D84}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI", "modules\PermissionManagement\Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI.csproj", "{B5CBA610-B248-489F-9840-05DF0C1AAC69}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.IdentityManagement.Blazor.AntDesignUI", "modules\IdentityManagement\Lsw.Abp.IdentityManagement.Blazor.AntDesignUI\Lsw.Abp.IdentityManagement.Blazor.AntDesignUI.csproj", "{62606EC9-E888-47C0-BBAC-E7E40652DFD3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI", "modules\IdentityManagement\Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI.csproj", "{E59DA556-0472-4409-BDCE-C992F73531F5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI", "modules\IdentityManagement\Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI\Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI.csproj", "{782E3414-6807-49A6-A7C4-9239BBACE0AE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TenantManagement", "TenantManagement", "{9FB30E31-D5F4-4E67-877E-78FAD7C3846D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.TenantManagement.Blazor.AntDesignUI", "modules\TenantManagement\Lsw.Abp.TenantManagement.Blazor.AntDesignUI\Lsw.Abp.TenantManagement.Blazor.AntDesignUI.csproj", "{995DD783-AAA5-450A-AF5C-6DFA513343F8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FeatureManagement", "FeatureManagement", "{5774E9F0-F6AE-4EDA-8240-315F82F3D1E1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.FeatureManagement.Blazor.AntDesignUI", "modules\FeatureManagement\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.csproj", "{496912B1-C4E3-477E-8AF8-D95DFC604B7C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI", "modules\FeatureManagement\Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI.csproj", "{C8437CD7-37CB-40B7-8862-96A1533C1818}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI", "modules\FeatureManagement\Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI.csproj", "{C404A7B8-8271-417D-B02C-20EDC7FB48B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI", "modules\TenantManagement\Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI.csproj", "{268E0BF9-A6A4-4255-835C-0995CE4B3F2E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI", "modules\TenantManagement\Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI\Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI.csproj", "{55BB2D05-7DCF-4BA4-B9E4-823A98C2B626}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SettingManagement", "SettingManagement", "{CCAB1F41-EAB4-4564-B956-C32ED0B03EC2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.Blazor.AntDesignUI", "modules\SettingManagement\Volo.Abp.SettingManagement.Blazor.AntDesignUI\Volo.Abp.SettingManagement.Blazor.AntDesignUI.csproj", "{2E033BD6-16C2-4F3A-ADD5-C08D6FB8482B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI", "modules\SettingManagement\Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI\Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI.csproj", "{3D8714C4-B78B-4B5E-8675-F6531C21AE2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI", "modules\SettingManagement\Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI\Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI.csproj", "{F3ADEF50-755E-4FCB-9746-C946CB0306B3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStore.BlazorServer", "samples\BookStore\BookStore.BlazorServer\BookStore.BlazorServer.csproj", "{1E5B082C-96F6-44B4-856E-AC26A5395243}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -29,6 +93,38 @@ Global
{7C86BBAF-609E-4651-B1AF-FBF3EA669E3A} = {0C432416-770F-4331-84E6-5835408A9BD8} {7C86BBAF-609E-4651-B1AF-FBF3EA669E3A} = {0C432416-770F-4331-84E6-5835408A9BD8}
{84F26612-0056-4CD1-849B-B0B8F046350D} = {0C432416-770F-4331-84E6-5835408A9BD8} {84F26612-0056-4CD1-849B-B0B8F046350D} = {0C432416-770F-4331-84E6-5835408A9BD8}
{62B99860-4CED-404F-A378-37B40043F10C} = {DA09D6FA-2DA0-4C76-AF49-BF24A015FF49} {62B99860-4CED-404F-A378-37B40043F10C} = {DA09D6FA-2DA0-4C76-AF49-BF24A015FF49}
{1F85F600-70F9-4286-B8BD-6A124D9DC43D} = {E36D7268-C7A6-4A7F-81DB-57070F4B049C}
{39E479A5-92DB-4F5B-918A-1920886D4D60} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{2A93E06E-1046-415B-81AC-D02995701EB6} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{ED293EED-7565-45DB-806B-80AB348E76EB} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{10ABF4AB-D8A0-46C0-8017-61455CEF2570} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{5290EAE2-F272-479D-BB76-0C059EEBA077} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{8223814F-FD5F-4D77-8C37-6B578333ADE6} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{30DCF9C7-BEA3-46D8-83C4-748FF24FFB96} = {0C432416-770F-4331-84E6-5835408A9BD8}
{FD90132E-3B0E-4677-A7CE-8783FCC5E427} = {30DCF9C7-BEA3-46D8-83C4-748FF24FFB96}
{8EC75594-FF27-4590-A726-B0C240EC0DC6} = {0C432416-770F-4331-84E6-5835408A9BD8}
{EF106F75-3B60-4C72-902D-DDE46EEF7D84} = {30DCF9C7-BEA3-46D8-83C4-748FF24FFB96}
{B5CBA610-B248-489F-9840-05DF0C1AAC69} = {30DCF9C7-BEA3-46D8-83C4-748FF24FFB96}
{62606EC9-E888-47C0-BBAC-E7E40652DFD3} = {8EC75594-FF27-4590-A726-B0C240EC0DC6}
{E59DA556-0472-4409-BDCE-C992F73531F5} = {8EC75594-FF27-4590-A726-B0C240EC0DC6}
{782E3414-6807-49A6-A7C4-9239BBACE0AE} = {8EC75594-FF27-4590-A726-B0C240EC0DC6}
{9FB30E31-D5F4-4E67-877E-78FAD7C3846D} = {0C432416-770F-4331-84E6-5835408A9BD8}
{995DD783-AAA5-450A-AF5C-6DFA513343F8} = {9FB30E31-D5F4-4E67-877E-78FAD7C3846D}
{5774E9F0-F6AE-4EDA-8240-315F82F3D1E1} = {0C432416-770F-4331-84E6-5835408A9BD8}
{496912B1-C4E3-477E-8AF8-D95DFC604B7C} = {5774E9F0-F6AE-4EDA-8240-315F82F3D1E1}
{C8437CD7-37CB-40B7-8862-96A1533C1818} = {5774E9F0-F6AE-4EDA-8240-315F82F3D1E1}
{C404A7B8-8271-417D-B02C-20EDC7FB48B7} = {5774E9F0-F6AE-4EDA-8240-315F82F3D1E1}
{268E0BF9-A6A4-4255-835C-0995CE4B3F2E} = {9FB30E31-D5F4-4E67-877E-78FAD7C3846D}
{55BB2D05-7DCF-4BA4-B9E4-823A98C2B626} = {9FB30E31-D5F4-4E67-877E-78FAD7C3846D}
{CCAB1F41-EAB4-4564-B956-C32ED0B03EC2} = {0C432416-770F-4331-84E6-5835408A9BD8}
{2E033BD6-16C2-4F3A-ADD5-C08D6FB8482B} = {CCAB1F41-EAB4-4564-B956-C32ED0B03EC2}
{3D8714C4-B78B-4B5E-8675-F6531C21AE2C} = {CCAB1F41-EAB4-4564-B956-C32ED0B03EC2}
{F3ADEF50-755E-4FCB-9746-C946CB0306B3} = {CCAB1F41-EAB4-4564-B956-C32ED0B03EC2}
{1E5B082C-96F6-44B4-856E-AC26A5395243} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9EA4AA35-DEFC-4C25-8333-78137853EC5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9EA4AA35-DEFC-4C25-8333-78137853EC5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@ -51,5 +147,109 @@ Global
{62B99860-4CED-404F-A378-37B40043F10C}.Debug|Any CPU.Build.0 = Debug|Any CPU {62B99860-4CED-404F-A378-37B40043F10C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62B99860-4CED-404F-A378-37B40043F10C}.Release|Any CPU.ActiveCfg = Release|Any CPU {62B99860-4CED-404F-A378-37B40043F10C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62B99860-4CED-404F-A378-37B40043F10C}.Release|Any CPU.Build.0 = Release|Any CPU {62B99860-4CED-404F-A378-37B40043F10C}.Release|Any CPU.Build.0 = Release|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Release|Any CPU.Build.0 = Release|Any CPU
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}.Release|Any CPU.Build.0 = Release|Any CPU
{2A93E06E-1046-415B-81AC-D02995701EB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A93E06E-1046-415B-81AC-D02995701EB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A93E06E-1046-415B-81AC-D02995701EB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A93E06E-1046-415B-81AC-D02995701EB6}.Release|Any CPU.Build.0 = Release|Any CPU
{ED293EED-7565-45DB-806B-80AB348E76EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED293EED-7565-45DB-806B-80AB348E76EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED293EED-7565-45DB-806B-80AB348E76EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED293EED-7565-45DB-806B-80AB348E76EB}.Release|Any CPU.Build.0 = Release|Any CPU
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}.Release|Any CPU.Build.0 = Release|Any CPU
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}.Release|Any CPU.Build.0 = Release|Any CPU
{10ABF4AB-D8A0-46C0-8017-61455CEF2570}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10ABF4AB-D8A0-46C0-8017-61455CEF2570}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10ABF4AB-D8A0-46C0-8017-61455CEF2570}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10ABF4AB-D8A0-46C0-8017-61455CEF2570}.Release|Any CPU.Build.0 = Release|Any CPU
{5290EAE2-F272-479D-BB76-0C059EEBA077}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5290EAE2-F272-479D-BB76-0C059EEBA077}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5290EAE2-F272-479D-BB76-0C059EEBA077}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5290EAE2-F272-479D-BB76-0C059EEBA077}.Release|Any CPU.Build.0 = Release|Any CPU
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}.Release|Any CPU.Build.0 = Release|Any CPU
{8223814F-FD5F-4D77-8C37-6B578333ADE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8223814F-FD5F-4D77-8C37-6B578333ADE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8223814F-FD5F-4D77-8C37-6B578333ADE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8223814F-FD5F-4D77-8C37-6B578333ADE6}.Release|Any CPU.Build.0 = Release|Any CPU
{FD90132E-3B0E-4677-A7CE-8783FCC5E427}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD90132E-3B0E-4677-A7CE-8783FCC5E427}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD90132E-3B0E-4677-A7CE-8783FCC5E427}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD90132E-3B0E-4677-A7CE-8783FCC5E427}.Release|Any CPU.Build.0 = Release|Any CPU
{EF106F75-3B60-4C72-902D-DDE46EEF7D84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF106F75-3B60-4C72-902D-DDE46EEF7D84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF106F75-3B60-4C72-902D-DDE46EEF7D84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF106F75-3B60-4C72-902D-DDE46EEF7D84}.Release|Any CPU.Build.0 = Release|Any CPU
{B5CBA610-B248-489F-9840-05DF0C1AAC69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5CBA610-B248-489F-9840-05DF0C1AAC69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B5CBA610-B248-489F-9840-05DF0C1AAC69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5CBA610-B248-489F-9840-05DF0C1AAC69}.Release|Any CPU.Build.0 = Release|Any CPU
{62606EC9-E888-47C0-BBAC-E7E40652DFD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{62606EC9-E888-47C0-BBAC-E7E40652DFD3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{62606EC9-E888-47C0-BBAC-E7E40652DFD3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{62606EC9-E888-47C0-BBAC-E7E40652DFD3}.Release|Any CPU.Build.0 = Release|Any CPU
{E59DA556-0472-4409-BDCE-C992F73531F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E59DA556-0472-4409-BDCE-C992F73531F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E59DA556-0472-4409-BDCE-C992F73531F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E59DA556-0472-4409-BDCE-C992F73531F5}.Release|Any CPU.Build.0 = Release|Any CPU
{782E3414-6807-49A6-A7C4-9239BBACE0AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{782E3414-6807-49A6-A7C4-9239BBACE0AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{782E3414-6807-49A6-A7C4-9239BBACE0AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{782E3414-6807-49A6-A7C4-9239BBACE0AE}.Release|Any CPU.Build.0 = Release|Any CPU
{995DD783-AAA5-450A-AF5C-6DFA513343F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{995DD783-AAA5-450A-AF5C-6DFA513343F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{995DD783-AAA5-450A-AF5C-6DFA513343F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{995DD783-AAA5-450A-AF5C-6DFA513343F8}.Release|Any CPU.Build.0 = Release|Any CPU
{496912B1-C4E3-477E-8AF8-D95DFC604B7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{496912B1-C4E3-477E-8AF8-D95DFC604B7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{496912B1-C4E3-477E-8AF8-D95DFC604B7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{496912B1-C4E3-477E-8AF8-D95DFC604B7C}.Release|Any CPU.Build.0 = Release|Any CPU
{C8437CD7-37CB-40B7-8862-96A1533C1818}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C8437CD7-37CB-40B7-8862-96A1533C1818}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C8437CD7-37CB-40B7-8862-96A1533C1818}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C8437CD7-37CB-40B7-8862-96A1533C1818}.Release|Any CPU.Build.0 = Release|Any CPU
{C404A7B8-8271-417D-B02C-20EDC7FB48B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C404A7B8-8271-417D-B02C-20EDC7FB48B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C404A7B8-8271-417D-B02C-20EDC7FB48B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C404A7B8-8271-417D-B02C-20EDC7FB48B7}.Release|Any CPU.Build.0 = Release|Any CPU
{268E0BF9-A6A4-4255-835C-0995CE4B3F2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{268E0BF9-A6A4-4255-835C-0995CE4B3F2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{268E0BF9-A6A4-4255-835C-0995CE4B3F2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{268E0BF9-A6A4-4255-835C-0995CE4B3F2E}.Release|Any CPU.Build.0 = Release|Any CPU
{55BB2D05-7DCF-4BA4-B9E4-823A98C2B626}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{55BB2D05-7DCF-4BA4-B9E4-823A98C2B626}.Debug|Any CPU.Build.0 = Debug|Any CPU
{55BB2D05-7DCF-4BA4-B9E4-823A98C2B626}.Release|Any CPU.ActiveCfg = Release|Any CPU
{55BB2D05-7DCF-4BA4-B9E4-823A98C2B626}.Release|Any CPU.Build.0 = Release|Any CPU
{2E033BD6-16C2-4F3A-ADD5-C08D6FB8482B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E033BD6-16C2-4F3A-ADD5-C08D6FB8482B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E033BD6-16C2-4F3A-ADD5-C08D6FB8482B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E033BD6-16C2-4F3A-ADD5-C08D6FB8482B}.Release|Any CPU.Build.0 = Release|Any CPU
{3D8714C4-B78B-4B5E-8675-F6531C21AE2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3D8714C4-B78B-4B5E-8675-F6531C21AE2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3D8714C4-B78B-4B5E-8675-F6531C21AE2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3D8714C4-B78B-4B5E-8675-F6531C21AE2C}.Release|Any CPU.Build.0 = Release|Any CPU
{F3ADEF50-755E-4FCB-9746-C946CB0306B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3ADEF50-755E-4FCB-9746-C946CB0306B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3ADEF50-755E-4FCB-9746-C946CB0306B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F3ADEF50-755E-4FCB-9746-C946CB0306B3}.Release|Any CPU.Build.0 = Release|Any CPU
{1E5B082C-96F6-44B4-856E-AC26A5395243}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E5B082C-96F6-44B4-856E-AC26A5395243}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E5B082C-96F6-44B4-856E-AC26A5395243}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E5B082C-96F6-44B4-856E-AC26A5395243}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

18
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/AbpFeatureManagementBlazorAntDesignModule.cs

@ -0,0 +1,18 @@
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Features;
using Volo.Abp.Modularity;
namespace Lsw.Abp.FeatureManagement.Blazor.AntDesignUI;
[DependsOn(
typeof(AbpAspNetCoreComponentsWebAntDesignThemeModule),
typeof(AbpAutoMapperModule),
typeof(AbpFeatureManagementApplicationContractsModule),
typeof(AbpFeaturesModule)
)]
public class AbpFeatureManagementBlazorAntDesignModule : AbpModule
{
}

12
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/AbpFeatureManagementComponentBase.cs

@ -0,0 +1,12 @@
using Volo.Abp.AspNetCore.Components;
using Volo.Abp.FeatureManagement.Localization;
namespace Lsw.Abp.FeatureManagement.Blazor.AntDesignUI;
public abstract class AbpFeatureManagementComponentBase : AbpComponentBase
{
protected AbpFeatureManagementComponentBase()
{
LocalizationResource = typeof(AbpFeatureManagementResource);
}
}

78
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/Components/FeatureManagementModal.razor

@ -0,0 +1,78 @@
@using AntDesign
@using Microsoft.AspNetCore.Components
@using Microsoft.Extensions.Localization
@using Volo.Abp.Validation.StringValues
@inherits AbpFeatureManagementComponentBase
<Modal Title="@L["Features"]"
Visible="@_visible"
OnOk="@SaveAsync"
OnCancel="@CloseModal" Style="min-width: 700px">
@if (_visible)
{
@if (Groups == null || !Groups.Any())
{
<Empty Description="false" />
}
else
{
<Tabs TabPosition="@TabPosition.Left">
@foreach (var group in Groups)
{
<TabPane Key="@GetNormalizedGroupName(group.Name)" Tab="@group.DisplayName">
<h4>@group.DisplayName</h4>
<Divider/>
@foreach (var feature in group.Features)
{
var disabled = IsDisabled(feature.Provider.Name);
<div style="@GetFeatureStyles(feature)">
@if (feature.ValueType is FreeTextStringValueType)
{
<Text>@feature.DisplayName</Text>
<Input
TValue="string"
Disabled="@disabled"
@bind-Value="@feature.Value"
OnChange=" args => OnFeatureValueChangedAsync(args, feature)"/>
@if (feature.Description != null)
{
<span>@feature.Description</span>
}
}
@if (feature.ValueType is SelectionStringValueType type)
{
var items = type.ItemSource.Items;
<Select DataSource="@items"
@bind-Value="@SelectionStringValues[feature.Name]"
LabelName="@nameof(ISelectionStringValueItem.DisplayText)"
ValueName="@nameof(ISelectionStringValueItem.Value)"
DefaultActiveFirstItem="false">
<ItemTemplate>
<span>@CreateStringLocalizer(context.DisplayText.ResourceName).GetString(context.DisplayText.Name)</span>
</ItemTemplate>
</Select>
}
@if (feature.ValueType is ToggleStringValueType)
{
<Checkbox
Disabled="@disabled"
@bind-Checked="@ToggleValues[feature.Name]"
OnChange="b => OnSelectedValueChangedAsync(b, feature)">
@feature.DisplayName
</Checkbox>
}
</div>
}
</TabPane>
}
</Tabs>
}
}
</Modal>

202
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/Components/FeatureManagementModal.razor.cs

@ -0,0 +1,202 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AntDesign;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Components.Messages;
using Volo.Abp.AspNetCore.Components.Web.Configuration;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Features;
using Volo.Abp.Localization;
using Volo.Abp.Validation.StringValues;
namespace Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.Components;
public partial class FeatureManagementModal
{
[Inject]
protected IFeatureAppService FeatureAppService { get; set; }
[Inject]
protected IUiMessageService UiMessageService { get; set; }
[Inject]
protected IStringLocalizerFactory HtmlLocalizerFactory { get; set; }
[Inject]
protected IOptions<AbpLocalizationOptions> LocalizationOptions { get; set; }
[Inject]
private ICurrentApplicationConfigurationCacheResetService CurrentApplicationConfigurationCacheResetService { get; set; }
protected Modal Modal;
protected string ProviderName;
protected string ProviderKey;
protected List<FeatureGroupDto> Groups { get; set; }
protected Dictionary<string, bool> ToggleValues;
protected Dictionary<string, string> SelectionStringValues;
private bool _visible;
public virtual async Task OpenAsync([NotNull] string providerName, string providerKey = null)
{
try
{
ProviderName = providerName;
ProviderKey = providerKey;
ToggleValues = new Dictionary<string, bool>();
SelectionStringValues = new Dictionary<string, string>();
Groups = (await FeatureAppService.GetAsync(ProviderName, ProviderKey))?.Groups;
Groups ??= new List<FeatureGroupDto>();
foreach (var featureGroupDto in Groups)
{
foreach (var featureDto in featureGroupDto.Features)
{
if (featureDto.ValueType is ToggleStringValueType)
{
ToggleValues.Add(featureDto.Name, bool.Parse(featureDto.Value));
}
if (featureDto.ValueType is SelectionStringValueType)
{
SelectionStringValues.Add(featureDto.Name, featureDto.Value);
}
}
}
_visible = true;
StateHasChanged();
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
public virtual void CloseModal()
{
_visible = false;
}
protected virtual async Task SaveAsync()
{
try
{
var features = new UpdateFeaturesDto
{
Features = Groups.SelectMany(g => g.Features).Select(f => new UpdateFeatureDto
{
Name = f.Name,
Value = f.ValueType is ToggleStringValueType ? ToggleValues[f.Name].ToString() :
f.ValueType is SelectionStringValueType ? SelectionStringValues[f.Name] : f.Value
}).ToList()
};
await FeatureAppService.UpdateAsync(ProviderName, ProviderKey, features);
await CurrentApplicationConfigurationCacheResetService.ResetAsync();
_visible = false;
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
protected virtual string GetNormalizedGroupName(string name)
{
return "FeatureGroup_" + name.Replace(".", "_");
}
protected virtual string GetFeatureStyles(FeatureDto feature)
{
return $"margin-left: {feature.Depth * 20}px; margin-top: 10px";
}
protected virtual bool IsDisabled(string providerName)
{
return providerName != ProviderName && providerName != DefaultValueFeatureValueProvider.ProviderName;
}
protected virtual async Task OnFeatureValueChangedAsync(string value, FeatureDto feature)
{
if (feature?.ValueType?.Validator.IsValid(value) == true)
{
feature.Value = value;
}
else
{
await UiMessageService.Warn(L["Volo.Abp.FeatureManagement:InvalidFeatureValue", feature.DisplayName]);
}
}
protected virtual Task OnSelectedValueChangedAsync(bool value, FeatureDto feature)
{
ToggleValues[feature.Name] = value;
if (value)
{
CheckParents(feature.ParentName);
}
else
{
UncheckChildren(feature.Name);
}
return Task.CompletedTask;
}
protected virtual void CheckParents(string parentName)
{
if (parentName.IsNullOrWhiteSpace())
{
return;
}
foreach (var featureGroupDto in Groups)
{
foreach (var featureDto in featureGroupDto.Features)
{
if (featureDto.Name == parentName && ToggleValues.ContainsKey(featureDto.Name))
{
ToggleValues[featureDto.Name] = true;
CheckParents(featureDto.ParentName);
}
}
}
}
protected virtual void UncheckChildren(string featureName)
{
foreach (var featureGroupDto in Groups)
{
foreach (var featureDto in featureGroupDto.Features)
{
if (featureDto.ParentName == featureName && ToggleValues.ContainsKey(featureDto.Name))
{
ToggleValues[featureDto.Name] = false;
UncheckChildren(featureDto.Name);
}
}
}
}
protected virtual IStringLocalizer CreateStringLocalizer(string resourceName)
{
var resource = LocalizationOptions.Value.Resources.Values.FirstOrDefault(x => x.ResourceName == resourceName);
return HtmlLocalizerFactory.Create(resource != null ? resource.ResourceType : LocalizationOptions.Value.DefaultResourceType);
}
}

17
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI/Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.csproj

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.4" />
<PackageReference Include="Volo.Abp.Features" Version="5.1.4" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.csproj" />
</ItemGroup>
</Project>

13
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI/AbpFeatureManagementBlazorWebServerAntDesignModule.cs

@ -0,0 +1,13 @@
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme;
using Lsw.Abp.FeatureManagement.Blazor.AntDesignUI;
using Volo.Abp.Modularity;
namespace Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI;
[DependsOn(
typeof(AbpFeatureManagementBlazorAntDesignModule),
typeof(AbpAspNetCoreComponentsServerAntDesignThemeModule)
)]
public class AbpFeatureManagementBlazorWebServerAntDesignModule : AbpModule
{
}

14
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI/Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI.csproj

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj" />
<ProjectReference Include="..\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

15
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI/AbpFeatureManagementBlazorWebAssemblyAntDesignModule.cs

@ -0,0 +1,15 @@
using Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme;
using Lsw.Abp.FeatureManagement.Blazor.AntDesignUI;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Modularity;
namespace Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI;
[DependsOn(
typeof(AbpFeatureManagementBlazorAntDesignModule),
typeof(AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule),
typeof(AbpFeatureManagementHttpApiClientModule)
)]
public class AbpFeatureManagementBlazorWebAssemblyAntDesignModule : AbpModule
{
}

16
modules/FeatureManagement/Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI/Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi.Client" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj" />
<ProjectReference Include="..\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

19
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/AbpIdentityBlazorAntDesignAutoMapperProfile.cs

@ -0,0 +1,19 @@
using AutoMapper;
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity;
namespace Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
public class AbpIdentityBlazorAntDesignAutoMapperProfile: Profile
{
public AbpIdentityBlazorAntDesignAutoMapperProfile()
{
CreateMap<IdentityUserDto, IdentityUserUpdateDto>()
.MapExtraProperties()
.Ignore(x => x.Password)
.Ignore(x => x.RoleNames);
CreateMap<IdentityRoleDto, IdentityRoleUpdateDto>()
.MapExtraProperties();
}
}

68
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/AbpIdentityBlazorAntDesignModule.cs

@ -0,0 +1,68 @@
using Lsw.Abp.AntDesignUI;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing;
using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.ObjectExtending.Modularity;
using Volo.Abp.Threading;
using Volo.Abp.UI.Navigation;
namespace Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
[DependsOn(
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpAutoMapperModule),
typeof(AbpPermissionManagementBlazorAntDesignModule),
typeof(AbpAspNetCoreComponentsWebAntDesignThemeModule),
typeof(AbpAntDesignUIModule)
)]
public class AbpIdentityBlazorAntDesignModule: AbpModule
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpIdentityBlazorAntDesignModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpIdentityBlazorAntDesignAutoMapperProfile>(validate: true);
});
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new AbpIdentityWebMainMenuContributor());
});
Configure<AbpRouterOptions>(options =>
{
options.AdditionalAssemblies.Add(typeof(AbpIdentityBlazorAntDesignModule).Assembly);
});
}
public override void PostConfigureServices(ServiceConfigurationContext context)
{
OneTimeRunner.Run(() =>
{
ModuleExtensionConfigurationHelper
.ApplyEntityConfigurationToUi(
IdentityModuleExtensionConsts.ModuleName,
IdentityModuleExtensionConsts.EntityNames.Role,
createFormTypes: new[] { typeof(IdentityRoleCreateDto) },
editFormTypes: new[] { typeof(IdentityRoleUpdateDto) }
);
ModuleExtensionConfigurationHelper
.ApplyEntityConfigurationToUi(
IdentityModuleExtensionConsts.ModuleName,
IdentityModuleExtensionConsts.EntityNames.User,
createFormTypes: new[] { typeof(IdentityUserCreateDto) },
editFormTypes: new[] { typeof(IdentityUserUpdateDto) }
);
});
}
}

40
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/AbpIdentityWebMainMenuContributor.cs

@ -0,0 +1,40 @@
using System.Threading.Tasks;
using AntDesign;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Identity;
using Volo.Abp.Identity.Localization;
using Volo.Abp.UI.Navigation;
namespace Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
public class AbpIdentityWebMainMenuContributor : IMenuContributor
{
public virtual Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name != StandardMenus.Main)
{
return Task.CompletedTask;
}
var administrationMenu = context.Menu.GetAdministration();
administrationMenu.Icon = IconType.Outline.PicLeft;
var l = context.GetLocalizer<IdentityResource>();
var identityMenuItem = new ApplicationMenuItem(IdentityMenuNames.GroupName, l["Menu:IdentityManagement"],
icon: IconType.Outline.User);
administrationMenu.AddItem(identityMenuItem);
identityMenuItem.AddItem(new ApplicationMenuItem(
IdentityMenuNames.Roles,
l["Roles"],
url: "~/identity/roles").RequirePermissions(IdentityPermissions.Roles.Default));
identityMenuItem.AddItem(new ApplicationMenuItem(
IdentityMenuNames.Users,
l["Users"],
url: "~/identity/users").RequirePermissions(IdentityPermissions.Users.Default));
return Task.CompletedTask;
}
}

9
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/IdentityMenuNames.cs

@ -0,0 +1,9 @@
namespace Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
public class IdentityMenuNames
{
public const string GroupName = "AbpIdentity";
public const string Roles = GroupName + ".Roles";
public const string Users = GroupName + ".Users";
}

17
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI.csproj

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.4" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.csproj" />
<ProjectReference Include="..\..\PermissionManagement\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

70
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleManagement.razor

@ -0,0 +1,70 @@
@page "/identity/roles"
@attribute [Authorize(IdentityPermissions.Roles.Default)]
@using Microsoft.AspNetCore.Authorization
@using Volo.Abp.Identity
@using Volo.Abp.Identity.Localization
@using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.Components
@using Volo.Abp.AspNetCore.Components.Web
@inject AbpBlazorMessageLocalizerHelper<IdentityResource> LH
@inherits AbpCrudPageBase<IIdentityRoleAppService, IdentityRoleDto, Guid, GetIdentityRolesInput, IdentityRoleCreateDto, IdentityRoleUpdateDto>
<AbpPageHeader Title="@L["Roles"]" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar"/>
<div class="page-content">
<AbpExtensibleDataGrid TItem="IdentityRoleDto"
Data="@Entities"
OnChange="@OnDataGridReadAsync"
TotalItems="@TotalCount"
PageSize="@PageSize"
CurrentPage="@CurrentPage"
Columns="@RoleManagementTableColumns">
</AbpExtensibleDataGrid>
</div>
@if (HasCreatePermission)
{
<Modal @ref="CreateModal" Title="@L["NewRole"]" Visible="@CreateModalVisible" OnCancel="@CloseCreateModalAsync" OnOk="CreateEntityAsync">
<Form
Layout="@FormLayout.Vertical"
@ref="@CreateFormRef"
Model="@NewEntity">
<FormItem Label="@L["DisplayName:RoleName"]">
<Input @bind-Value="@context.Name"/>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.IsDefault">@L["DisplayName:IsDefault"]</Checkbox>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.IsPublic">@L["DisplayName:IsPublic"]</Checkbox>
</FormItem>
</Form>
</Modal>
}
@if (HasUpdatePermission)
{
<Modal @ref="EditModal" Title="@L["Edit"]" Visible="@EditModalVisible" OnCancel="@CloseEditModalAsync" OnOk="UpdateEntityAsync">
<Form
Layout="@FormLayout.Vertical"
@ref="@EditFormRef"
Model="@EditingEntity">
<input type="hidden" name="ConcurrencyStamp" @bind-value="EditingEntity.ConcurrencyStamp"/>
<FormItem Label="@L["DisplayName:RoleName"]">
<Input @bind-Value="@context.Name"/>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.IsDefault">@L["DisplayName:IsDefault"]</Checkbox>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.IsPublic">@L["DisplayName:IsPublic"]</Checkbox>
</FormItem>
</Form>
</Modal>
}
@if (HasManagePermissionsPermission)
{
<PermissionManagementModal @ref="PermissionManagementModal"/>
}

137
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleManagement.razor.cs

@ -0,0 +1,137 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AntDesign;
using Lsw.Abp.AntDesignUI;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.PageToolbars;
using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.Components;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.AspNetCore.Components.Web.Extensibility.EntityActions;
using Volo.Abp.AspNetCore.Components.Web.Extensibility.TableColumns;
using Volo.Abp.Identity;
using Volo.Abp.Identity.Localization;
namespace Lsw.Abp.IdentityManagement.Blazor.AntDesignUI.Pages;
public partial class RoleManagement
{
protected const string PermissionProviderName = "R";
protected PermissionManagementModal PermissionManagementModal;
protected string ManagePermissionsPolicyName;
protected bool HasManagePermissionsPermission { get; set; }
protected PageToolbar Toolbar { get; } = new();
protected List<TableColumn> RoleManagementTableColumns => TableColumns.Get<RoleManagement>();
public RoleManagement()
{
ObjectMapperContext = typeof(AbpIdentityBlazorAntDesignModule);
LocalizationResource = typeof(IdentityResource);
CreatePolicyName = IdentityPermissions.Roles.Create;
UpdatePolicyName = IdentityPermissions.Roles.Update;
DeletePolicyName = IdentityPermissions.Roles.Delete;
ManagePermissionsPolicyName = IdentityPermissions.Roles.ManagePermissions;
}
protected override ValueTask SetBreadcrumbItemsAsync()
{
BreadcrumbItems = new List<AbpBreadcrumbItem>()
{
new(L["Menu:IdentityManagement"]),
new(L["Roles"])
};
return base.SetBreadcrumbItemsAsync();
}
protected override ValueTask SetEntityActionsAsync()
{
EntityActions
.Get<RoleManagement>()
.AddRange(new EntityAction[]
{
new EntityAction
{
Text = L["Edit"],
Visible = (data) => HasUpdatePermission,
Clicked = async (data) =>
{
await OpenEditModalAsync(data.As<IdentityRoleDto>());
}
},
new EntityAction
{
Text = L["Permissions"],
Visible = (data) => HasManagePermissionsPermission,
Clicked = async (data) =>
{
await PermissionManagementModal.OpenAsync(PermissionProviderName,
data.As<IdentityRoleDto>().Name);
}
},
new EntityAction
{
Text = L["Delete"],
Visible = (data) => HasDeletePermission,
Clicked = async (data) => await DeleteEntityAsync(data.As<IdentityRoleDto>()),
ConfirmationMessage = (data) => GetDeleteConfirmationMessage(data.As<IdentityRoleDto>())
}
});
return base.SetEntityActionsAsync();
}
protected override ValueTask SetTableColumnsAsync()
{
RoleManagementTableColumns
.AddRange(new TableColumn[]
{
new TableColumn
{
Title = L["RoleName"],
Data = nameof(IdentityRoleDto.Name),
Component = typeof(RoleNameComponent)
},
new TableColumn
{
Title = L["Actions"],
Actions = EntityActions.Get<RoleManagement>()
},
});
//TODO Implement object extensions
// RoleManagementTableColumns.AddRange(GetExtensionTableColumns(IdentityModuleExtensionConsts.ModuleName,
// IdentityModuleExtensionConsts.EntityNames.Role));
return base.SetTableColumnsAsync();
}
protected override async Task SetPermissionsAsync()
{
await base.SetPermissionsAsync();
HasManagePermissionsPermission =
await AuthorizationService.IsGrantedAsync(IdentityPermissions.Roles.ManagePermissions);
}
protected override string GetDeleteConfirmationMessage(IdentityRoleDto entity)
{
return string.Format(L["RoleDeletionConfirmationMessage"], entity.Name);
}
protected override ValueTask SetToolbarItemsAsync()
{
Toolbar.AddButton(L["NewRole"],
OpenCreateModalAsync,
IconType.Outline.Plus,
requiredPolicyName: CreatePolicyName);
return base.SetToolbarItemsAsync();
}
}

22
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleNameComponent.razor

@ -0,0 +1,22 @@
@using System;
@using Volo.Abp.Identity
@using Microsoft.Extensions.Localization
@using Volo.Abp.Identity.Localization
@inject IStringLocalizer<IdentityResource> L
@(Data.As<IdentityRoleDto>().Name)
@if (Data.As<IdentityRoleDto>().IsDefault)
{
<Badge Dot="true"
Status="success"
Style="margin-left: 0.25rem"
Text="@L["DisplayName:IsDefault"]"/>
}
@if (Data.As<IdentityRoleDto>().IsPublic)
{
<Badge Dot="true"
Status="processing"
Style="margin-left: 0.25rem"
Text="@L["DisplayName:IsPublic"]"/>
}

9
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/RoleNameComponent.razor.cs

@ -0,0 +1,9 @@
using Microsoft.AspNetCore.Components;
namespace Lsw.Abp.IdentityManagement.Blazor.AntDesignUI.Pages;
public partial class RoleNameComponent: ComponentBase
{
[Parameter]
public object Data { get; set; }
}

129
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/UserManagement.razor

@ -0,0 +1,129 @@
@page "/identity/users"
@attribute [Authorize(IdentityPermissions.Users.Default)]
@using Microsoft.AspNetCore.Authorization
@using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.Components
@using Volo.Abp.Identity
@using Volo.Abp.Identity.Localization
@inject AbpBlazorMessageLocalizerHelper<IdentityResource> LH
@inherits AbpCrudPageBase<IIdentityUserAppService, IdentityUserDto, Guid, GetIdentityUsersInput, IdentityUserCreateDto, IdentityUserUpdateDto>
<AbpPageHeader Title="@L["Users"]" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar"/>
<div class="page-content">
<AbpExtensibleDataGrid TItem="IdentityUserDto"
Data="@Entities"
OnChange="@OnDataGridReadAsync"
TotalItems="@TotalCount"
PageSize="@PageSize"
CurrentPage="@CurrentPage"
Columns="@UserManagementTableColumns">
</AbpExtensibleDataGrid>
</div>
@if (HasCreatePermission)
{
<Modal @ref="CreateModal" Title="@L["NewUser"]" Visible="@CreateModalVisible" OnCancel="@CloseCreateModalAsync" OnOk="CreateEntityAsync">
<Form
@ref="@CreateFormRef"
Layout="@FormLayout.Vertical"
Model="@NewEntity">
@if (CreateModalVisible)
{
<Tabs>
<TabPane Tab="@L["UserInformations"]">
<FormItem Label="@L["DisplayName:UserName"]">
<Input @bind-Value="@context.UserName"/>
</FormItem>
<FormItem Label="@L["DisplayName:Name"]">
<Input @bind-Value="@context.Name"/>
</FormItem>
<FormItem Label="@L["DisplayName:Surname"]">
<Input @bind-Value="@context.Surname"/>
</FormItem>
<FormItem Label="@L["DisplayName:Password"]">
<InputPassword @bind-Value="@context.Password"/>
</FormItem>
<FormItem Label="@L["DisplayName:Email"]">
<Input @bind-Value="@context.Email"/>
</FormItem>
<FormItem Label="@L["DisplayName:PhoneNumber"]">
<Input @bind-Value="@context.PhoneNumber"/>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.IsActive">@L["DisplayName:IsActive"]</Checkbox>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.LockoutEnabled">@L["DisplayName:LockoutEnabled"]</Checkbox>
</FormItem>
</TabPane>
<TabPane Tab="@L["Roles"]">
@foreach (var role in NewUserRoles)
{
<FormItem WrapperColOffset="2">
<Checkbox @bind-Value="role.IsAssigned">@role.Name</Checkbox>
</FormItem>
}
</TabPane>
</Tabs>
}
</Form>
</Modal>
}
@if (HasUpdatePermission)
{
<Modal @ref="EditModal" Title="@L["Edit"]" Visible="@EditModalVisible" OnCancel="@CloseEditModalAsync" OnOk="UpdateEntityAsync">
<Form
@ref="@EditFormRef"
Layout="@FormLayout.Vertical"
Model="@EditingEntity">
@if (EditModalVisible)
{
<Tabs>
<TabPane Tab="@L["UserInformations"]">
<FormItem Label="@L["DisplayName:UserName"]">
<Input @bind-Value="@context.UserName"/>
</FormItem>
<FormItem Label="@L["DisplayName:Name"]">
<Input @bind-Value="@context.Name"/>
</FormItem>
<FormItem Label="@L["DisplayName:Surname"]">
<Input @bind-Value="@context.Surname"/>
</FormItem>
<FormItem Label="@L["DisplayName:Password"]">
<InputPassword @bind-Value="@context.Password"/>
</FormItem>
<FormItem Label="@L["DisplayName:Email"]">
<Input @bind-Value="@context.Email"/>
</FormItem>
<FormItem Label="@L["DisplayName:PhoneNumber"]">
<Input @bind-Value="@context.PhoneNumber"/>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.IsActive">@L["DisplayName:IsActive"]</Checkbox>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.LockoutEnabled">@L["DisplayName:LockoutEnabled"]</Checkbox>
</FormItem>
</TabPane>
<TabPane Tab="@L["Roles"]">
@foreach (var role in EditUserRoles)
{
<FormItem WrapperColOffset="2">
<Checkbox @bind-Value="role.IsAssigned">@role.Name</Checkbox>
</FormItem>
}
</TabPane>
</Tabs>
}
</Form>
</Modal>
}
@if (HasManagePermissionsPermission)
{
<PermissionManagementModal @ref="PermissionManagementModal"/>
}

212
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/Pages/UserManagement.razor.cs

@ -0,0 +1,212 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AntDesign;
using Lsw.Abp.AntDesignUI;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.PageToolbars;
using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.Components;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.AspNetCore.Components.Web.Extensibility.EntityActions;
using Volo.Abp.AspNetCore.Components.Web.Extensibility.TableColumns;
using Volo.Abp.Identity;
using Volo.Abp.Identity.Localization;
namespace Lsw.Abp.IdentityManagement.Blazor.AntDesignUI.Pages;
public partial class UserManagement
{
protected const string PermissionProviderName = "U";
protected PermissionManagementModal PermissionManagementModal;
protected IReadOnlyList<IdentityRoleDto> Roles;
protected AssignedRoleViewModel[] NewUserRoles;
protected AssignedRoleViewModel[] EditUserRoles;
protected string ManagePermissionsPolicyName;
protected bool HasManagePermissionsPermission { get; set; }
protected PageToolbar Toolbar { get; } = new();
private List<TableColumn> UserManagementTableColumns => TableColumns.Get<UserManagement>();
public UserManagement()
{
ObjectMapperContext = typeof(AbpIdentityBlazorAntDesignModule);
LocalizationResource = typeof(IdentityResource);
CreatePolicyName = IdentityPermissions.Users.Create;
UpdatePolicyName = IdentityPermissions.Users.Update;
DeletePolicyName = IdentityPermissions.Users.Delete;
ManagePermissionsPolicyName = IdentityPermissions.Users.ManagePermissions;
}
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
try
{
Roles = (await AppService.GetAssignableRolesAsync()).Items;
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
protected override ValueTask SetBreadcrumbItemsAsync()
{
BreadcrumbItems = new List<AbpBreadcrumbItem>()
{
new(L["Menu:IdentityManagement"]),
new(L["Users"])
};
return base.SetBreadcrumbItemsAsync();
}
protected override async Task SetPermissionsAsync()
{
await base.SetPermissionsAsync();
HasManagePermissionsPermission =
await AuthorizationService.IsGrantedAsync(IdentityPermissions.Users.ManagePermissions);
}
protected override Task OpenCreateModalAsync()
{
NewUserRoles = Roles.Select(x => new AssignedRoleViewModel
{
Name = x.Name,
IsAssigned = x.IsDefault
}).ToArray();
return base.OpenCreateModalAsync();
}
protected override Task OnCreatingEntityAsync()
{
// apply roles before saving
NewEntity.RoleNames = NewUserRoles.Where(x => x.IsAssigned).Select(x => x.Name).ToArray();
return base.OnCreatingEntityAsync();
}
protected override async Task OpenEditModalAsync(IdentityUserDto entity)
{
try
{
var userRoleNames = (await AppService.GetRolesAsync(entity.Id)).Items.Select(r => r.Name).ToList();
EditUserRoles = Roles.Select(x => new AssignedRoleViewModel
{
Name = x.Name,
IsAssigned = userRoleNames.Contains(x.Name)
}).ToArray();
await base.OpenEditModalAsync(entity);
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
protected override Task OnUpdatingEntityAsync()
{
// apply roles before saving
EditingEntity.RoleNames = EditUserRoles.Where(x => x.IsAssigned).Select(x => x.Name).ToArray();
return base.OnUpdatingEntityAsync();
}
protected override string GetDeleteConfirmationMessage(IdentityUserDto entity)
{
return string.Format(L["UserDeletionConfirmationMessage"], entity.UserName);
}
protected override ValueTask SetEntityActionsAsync()
{
EntityActions
.Get<UserManagement>()
.AddRange(new EntityAction[]
{
new EntityAction
{
Text = L["Edit"],
Visible = (data) => HasUpdatePermission,
Clicked = async (data) => await OpenEditModalAsync(data.As<IdentityUserDto>())
},
new EntityAction
{
Text = L["Permissions"],
Visible = (data) => HasManagePermissionsPermission,
Clicked = async (data) =>
{
await PermissionManagementModal.OpenAsync(PermissionProviderName,
data.As<IdentityUserDto>().Id.ToString());
}
},
new EntityAction
{
Text = L["Delete"],
Visible = (data) => HasDeletePermission,
Clicked = async (data) => await DeleteEntityAsync(data.As<IdentityUserDto>()),
ConfirmationMessage = (data) => GetDeleteConfirmationMessage(data.As<IdentityUserDto>())
}
});
return base.SetEntityActionsAsync();
}
protected override ValueTask SetTableColumnsAsync()
{
UserManagementTableColumns
.AddRange(new TableColumn[]
{
new TableColumn
{
Title = L["UserName"],
Data = nameof(IdentityUserDto.UserName),
},
new TableColumn
{
Title = L["Email"],
Data = nameof(IdentityUserDto.Email),
},
new TableColumn
{
Title = L["PhoneNumber"],
Data = nameof(IdentityUserDto.PhoneNumber),
},
new TableColumn
{
Title = L["Actions"],
Actions = EntityActions.Get<UserManagement>()
},
});
return base.SetEntityActionsAsync();
}
protected override ValueTask SetToolbarItemsAsync()
{
Toolbar.AddButton(L["NewUser"], OpenCreateModalAsync,
IconType.Outline.Plus,
requiredPolicyName: CreatePolicyName);
return base.SetToolbarItemsAsync();
}
}
public class AssignedRoleViewModel
{
public string Name { get; set; }
public bool IsAssigned { get; set; }
}

7
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.AntDesignUI/_Imports.razor

@ -0,0 +1,7 @@
@using Microsoft.AspNetCore.Components.Web
@using Volo.Abp.AspNetCore.Components.Web
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components
@using AntDesign
@using AntDesign.TableModels
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout

14
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI/AbpIdentityBlazorServerAntDesignModule.cs

@ -0,0 +1,14 @@
using Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI;
using Volo.Abp.Modularity;
namespace Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI;
[DependsOn(
typeof(AbpIdentityBlazorAntDesignModule),
typeof(AbpPermissionManagementBlazorAntDesignModule)
)]
public class AbpIdentityBlazorServerAntDesignModule : AbpModule
{
}

12
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI/Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI.csproj

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj" />
<ProjectReference Include="..\Lsw.Abp.IdentityManagement.Blazor.AntDesignUI\Lsw.Abp.IdentityManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

15
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI/AbpIdentityBlazorWebAssemblyAntDesignModule.cs

@ -0,0 +1,15 @@
using Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
using Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
namespace Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI;
[DependsOn(
typeof(AbpIdentityBlazorAntDesignModule),
typeof(AbpPermissionManagementBlazorWebAssemblyAntDesignModule),
typeof(AbpIdentityHttpApiClientModule)
)]
public class AbpIdentityBlazorWebAssemblyAntDesignModule: AbpModule
{
}

17
modules/IdentityManagement/Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI/Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI.csproj

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\PermissionManagement\Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI.csproj" />
<ProjectReference Include="..\Lsw.Abp.IdentityManagement.Blazor.AntDesignUI\Lsw.Abp.IdentityManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

24
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/AbpAspNetCoreComponentsServerAntDesignThemeModule.cs

@ -1,5 +1,6 @@
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling; using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme; using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Toolbars;
using Volo.Abp.AspNetCore.Components.Server; using Volo.Abp.AspNetCore.Components.Server;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling; using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages; using Volo.Abp.AspNetCore.Mvc.UI.Packages;
@ -32,6 +33,29 @@ public class AbpAspNetCoreComponentsServerAntDesignThemeModule : AbpModule
{ {
bundle.AddContributors(typeof(BlazorGlobalScriptContributor)); bundle.AddContributors(typeof(BlazorGlobalScriptContributor));
}); });
options
.StyleBundles
.Add(BlazorAntDesignThemeBundles.Styles.Global, bundle =>
{
bundle
.AddBaseBundles(BlazorStandardBundles.Styles.Global)
.AddContributors(typeof(BlazorAntDesignThemeStyleContributor));
});
options
.ScriptBundles
.Add(BlazorAntDesignThemeBundles.Scripts.Global, bundle =>
{
bundle
.AddBaseBundles(BlazorStandardBundles.Scripts.Global)
.AddContributors(typeof(BlazorAntDesignThemeScriptContributor));
});
});
Configure<AbpToolbarOptions>(options =>
{
options.Contributors.Add(new AntDesignThemeToolbarContributor());
}); });
} }
} }

20
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/AntDesignThemeToolbarContributor.cs

@ -0,0 +1,20 @@
using System.Threading.Tasks;
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Themes.AntDesignTheme;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Toolbars;
namespace Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme;
public class AntDesignThemeToolbarContributor: IToolbarContributor
{
public Task ConfigureToolbarAsync(IToolbarConfigurationContext context)
{
if (context.Toolbar.Name == StandardToolbars.Main)
{
context.Toolbar.Items.Add(new ToolbarItem(typeof(LanguageSwitch)));
context.Toolbar.Items.Add(new ToolbarItem(typeof(LoginDisplay)));
}
return Task.CompletedTask;
}
}

14
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorAntDesignThemeBundles.cs

@ -0,0 +1,14 @@
namespace Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling;
public class BlazorAntDesignThemeBundles
{
public static class Styles
{
public static string Global = "Blazor.AntDesignTheme.Global";
}
public static class Scripts
{
public static string Global = "Blazor.AntDesignTheme.Global";
}
}

8
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorAntDesignThemeScriptContributor.cs

@ -0,0 +1,8 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling;
public class BlazorAntDesignThemeScriptContributor: BundleContributor
{
}

12
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorAntDesignThemeStyleContributor.cs

@ -0,0 +1,12 @@
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling;
public class BlazorAntDesignThemeStyleContributor: BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/_content/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/libs/abp/css/theme.css");
}
}

3
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>

11
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj

@ -7,17 +7,14 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Components.Server" Version="5.1.3" /> <PackageReference Include="Volo.Abp.AspNetCore.Components.Server" Version="5.1.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Bundling" Version="5.1.3" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Bundling" Version="5.1.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Packages" Version="5.1.3" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Packages" Version="5.1.4" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.csproj" /> <ProjectReference Include="..\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Themes\AntDesignTheme" />
</ItemGroup>
</Project> </Project>

64
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Themes/AntDesignTheme/LanguageSwitch.razor

@ -0,0 +1,64 @@
@using Volo.Abp.Localization
@using System.Globalization
@using System.Collections.Immutable
@using Microsoft.AspNetCore.RequestLocalization
@inject ILanguageProvider LanguageProvider
@inject NavigationManager NavigationManager
@inject IAbpRequestLocalizationOptionsProvider RequestLocalizationOptionsProvider
@if (_otherLanguages != null && _otherLanguages.Any())
{
<Dropdown>
<Overlay>
<Menu>
@foreach (var language in _otherLanguages)
{
<MenuItem OnClick="() => ChangeLanguage(language)">
@language.DisplayName
</MenuItem>
}
</Menu>
</Overlay>
<ChildContent>
<a class="ant-dropdown-link" @onclick:preventDefault>
@_currentLanguage.DisplayName <Icon Type="down" />
</a>
</ChildContent>
</Dropdown>
}
@code {
private IReadOnlyList<LanguageInfo> _otherLanguages;
private LanguageInfo _currentLanguage;
protected override async Task OnInitializedAsync()
{
var languages = await LanguageProvider.GetLanguagesAsync();
var currentLanguage = languages.FindByCulture(
CultureInfo.CurrentCulture.Name,
CultureInfo.CurrentUICulture.Name
);
if (currentLanguage == null)
{
var localizationOptions = await RequestLocalizationOptionsProvider.GetLocalizationOptionsAsync();
currentLanguage = new LanguageInfo(
localizationOptions.DefaultRequestCulture.Culture.Name,
localizationOptions.DefaultRequestCulture.UICulture.Name,
localizationOptions.DefaultRequestCulture.UICulture.DisplayName);
}
_currentLanguage = currentLanguage;
_otherLanguages = languages.Where(l => l != _currentLanguage).ToImmutableList();
}
private void ChangeLanguage(LanguageInfo language)
{
var relativeUrl = NavigationManager.Uri.RemovePreFix(NavigationManager.BaseUri).EnsureStartsWith('/').EnsureStartsWith('~');
NavigationManager.NavigateTo(
$"Abp/Languages/Switch?culture={language.CultureName}&uiCulture={language.UiCultureName}&returnUrl={relativeUrl}",
forceLoad: true
);
}
}

42
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Themes/AntDesignTheme/LoginDisplay.razor

@ -0,0 +1,42 @@
@using Volo.Abp.Users
@using Volo.Abp.MultiTenancy
@using Microsoft.Extensions.Localization
@using global::Localization.Resources.AbpUi
@inject ICurrentUser CurrentUser
@inject ICurrentTenant CurrentTenant
@inject IJSRuntime JsRuntime
@inject NavigationManager Navigation
@inject IStringLocalizer<AbpUiResource> L
<AuthorizeView>
<Authorized>
<Dropdown>
<Overlay>
<Menu>
@if (Menu != null)
{
@foreach (var menuItem in Menu.Items)
{
<a class="nav-link ant-dropdown-menu-item" target="@menuItem.Target" href="@menuItem.Url?.TrimStart('/', '~')">@menuItem.DisplayName</a>
}
}
<MenuDivider/>
</Menu>
</Overlay>
<ChildContent>
@if (CurrentTenant.Name != null)
{
<span><i>@CurrentTenant.Name</i>\@CurrentUser.UserName</span>
}
else
{
<span>@CurrentUser.UserName</span>
}
<Icon Type="down" />
</ChildContent>
</Dropdown>
</Authorized>
<NotAuthorized>
<a class="nav-link" href="Account/Login">@L["Login"]</a>
</NotAuthorized>
</AuthorizeView>

32
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Themes/AntDesignTheme/LoginDisplay.razor.cs

@ -0,0 +1,32 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Routing;
using Volo.Abp.UI.Navigation;
namespace Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Themes.AntDesignTheme;
public partial class LoginDisplay : IDisposable
{
[Inject]
protected IMenuManager MenuManager { get; set; }
protected ApplicationMenu Menu { get; set; }
protected override async Task OnInitializedAsync()
{
Menu = await MenuManager.GetAsync(StandardMenus.User);
Navigation.LocationChanged += OnLocationChanged;
}
protected virtual void OnLocationChanged(object sender, LocationChangedEventArgs e)
{
InvokeAsync(StateHasChanged);
}
public void Dispose()
{
Navigation.LocationChanged -= OnLocationChanged;
}
}

7
modules/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Themes/AntDesignTheme/_Imports.razor

@ -0,0 +1,7 @@
@using Microsoft.AspNetCore.Components.Web
@using System.Net.Http
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.JSInterop
@using AntDesign

4
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/AbpPageHeader.razor.cs

@ -30,9 +30,9 @@ public partial class AbpPageHeader : ComponentBase
public RenderFragment ChildContent { get; set; } public RenderFragment ChildContent { get; set; }
[Parameter] [Parameter]
public List<BreadcrumbItem> BreadcrumbItems { public List<AbpBreadcrumbItem> BreadcrumbItems {
get => PageLayout.BreadcrumbItems.ToList(); get => PageLayout.BreadcrumbItems.ToList();
set => PageLayout.BreadcrumbItems = new ObservableCollection<BreadcrumbItem>(value); set => PageLayout.BreadcrumbItems = new ObservableCollection<AbpBreadcrumbItem>(value);
} }
[Parameter] [Parameter]

2
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/PageLayout.cs

@ -21,7 +21,7 @@ public class PageLayout : IScopedDependency, INotifyPropertyChanged
} }
} }
public virtual ObservableCollection<BreadcrumbItem> BreadcrumbItems { get; set; } = new(); public virtual ObservableCollection<AbpBreadcrumbItem> BreadcrumbItems { get; set; } = new();
public virtual ObservableCollection<PageToolbarItem> ToolbarItems { get; set; } = new(); public virtual ObservableCollection<PageToolbarItem> ToolbarItems { get; set; } = new();

2
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.csproj

@ -7,7 +7,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Volo.Abp.UI.Navigation" Version="5.1.3" /> <PackageReference Include="Volo.Abp.UI.Navigation" Version="5.1.4" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

4
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Settings/MenuPlacement.cs

@ -2,6 +2,6 @@
public enum MenuPlacement public enum MenuPlacement
{ {
Top, Top = 1,
Left Left = 2
} }

1
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor

@ -28,6 +28,7 @@ else
{ {
<Layout Class="ant-design-layout"> <Layout Class="ant-design-layout">
<Sider <Sider
Style="@SiderStyle"
Class="ant-design-side" Class="ant-design-side"
Theme="@SiderTheme" Theme="@SiderTheme"
Collapsible Collapsible

3
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor.cs

@ -20,6 +20,8 @@ public partial class DefaultLayout
protected SiderTheme SiderTheme { get; set; } protected SiderTheme SiderTheme { get; set; }
protected string SiderStyle { get; set; } = "min-width:256px";
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
await SetLayout(); await SetLayout();
@ -45,5 +47,6 @@ public partial class DefaultLayout
protected virtual void OnCollapse() protected virtual void OnCollapse()
{ {
Collapsed = !Collapsed; Collapsed = !Collapsed;
SiderStyle = Collapsed ? "" : "min-width:256px";
} }
} }

20
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/MainMenuItem.razor

@ -8,16 +8,16 @@
if (Menu.IsLeaf && Menu.Url != null) if (Menu.IsLeaf && Menu.Url != null)
{ {
<MenuItem Key="@elementId" RouterLink="@url" Disabled="@Menu.IsDisabled"> <MenuItem Key="@elementId" RouterLink="@url" Disabled="@Menu.IsDisabled">
@if (Menu.Icon != null) @if (!Menu.Icon.IsNullOrWhiteSpace())
{ {
<Icon Type="@Menu.Icon" Theme="outline"></Icon> <Icon Type="@Menu.Icon" Theme="outline"></Icon>
} }
<span>@Menu.Name</span> <span>@Menu.DisplayName</span>
</MenuItem> </MenuItem>
} }
else else
{ {
<SubMenu Title="@Menu.Name" TitleTemplate="@GetSubMenuTemplate()" Key="@elementId"> <SubMenu Title="@Menu.DisplayName" TitleTemplate="@GetSubMenuTemplate(Menu)" Key="@elementId">
@foreach (var menuItem in Menu.Items) @foreach (var menuItem in Menu.Items)
{ {
<MainMenuItem Menu="@menuItem"></MainMenuItem> <MainMenuItem Menu="@menuItem"></MainMenuItem>
@ -25,3 +25,17 @@
</SubMenu> </SubMenu>
} }
} }
@{
RenderFragment GetSubMenuTemplate(ApplicationMenuItem menu)
{
return @<span>
@if (!Menu.Icon.IsNullOrWhiteSpace())
{
<Icon Type="@Menu.Icon" Theme="outline"></Icon>
}
<span>@menu.DisplayName</span>
</span>;
}
}

12
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/MainMenuItem.razor.cs

@ -8,16 +8,4 @@ public partial class MainMenuItem : ComponentBase
{ {
[Parameter] [Parameter]
public ApplicationMenuItem Menu { get; set; } public ApplicationMenuItem Menu { get; set; }
private RenderFragment GetSubMenuTemplate()
{
return null;
// return @<span>
// @if (Menu.Icon != null)
// {
// <Icon Type="@Menu.Icon" Theme="outline"></Icon>
// }
// <span>@Menu.Name</span>
// </span>;
}
} }

57
modules/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/wwwroot/libs/abp/css/theme.css

@ -41,7 +41,7 @@ app {
} }
.page-content { .page-content {
min-height: 80vh; min-height: 70vh;
background: #fff; background: #fff;
padding: 24px; padding: 24px;
margin-top: 8px; margin-top: 8px;
@ -69,22 +69,27 @@ app {
} }
.ant-design-side .ant-design-brand { .ant-design-side .ant-design-brand {
font-size: 15px; font-size: 18px;
font-weight: 600; font-weight: 600;
display: flex; display: flex;
padding: 16px 16px; padding: 16px 16px;
cursor: pointer; cursor: pointer;
} }
.ant-design-side .ant-design-brand a {
display: flex
}
.ant-design-side .ant-design-brand img { .ant-design-side .ant-design-brand img {
display: inline-block; display: inline-block;
height: 35px height: 40px
} }
.ant-design-side .ant-design-brand h1 { .ant-design-side .ant-design-brand h1 {
display: inline-block; display: inline-block;
color: white; color: white;
margin: 0 0 0 12px; margin: 0 0 0 15px;
} }
.ant-layout-sider-light .ant-design-brand h1 { .ant-layout-sider-light .ant-design-brand h1 {
@ -115,11 +120,51 @@ app {
color: #001529; color: #001529;
} }
.ant-design-header-top .ant-menu-root{ .ant-design-header-top .ant-menu-root {
margin-left: 20px; margin-left: 20px;
float: left; float: left;
} }
.abp-application-layout .ant-menu-sub li{ .abp-application-layout .ant-menu-sub li {
min-width: 120px; min-width: 120px;
} }
.ant-design-header-left .nav-link {
color: #001529;
}
.ant-design-header-left-light .nav-link {
color: white;
}
.ant-design-header-top .nav-link {
color: white;
}
.ant-design-header-top-light .nav-link {
color: #001529;
}
.ant-dropdown-link {
margin-right: 20px;
}
.ant-design-header-left .ant-dropdown-link {
color: #001529;
}
.ant-design-header-top .ant-dropdown-trigger {
color: white;
}
.ant-design-header-top-light .ant-dropdown-trigger{
color: #001529;
}
.ant-design-header-top-light .ant-dropdown-trigger{
color: #001529;
}
.ant-design-header-left-light .ant-dropdown-trigger{
color: white;
}

4
modules/Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme/AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule.cs

@ -2,13 +2,15 @@
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing; using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Toolbars; using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Toolbars;
using Volo.Abp.AspNetCore.Components.WebAssembly; using Volo.Abp.AspNetCore.Components.WebAssembly;
using Volo.Abp.Http.Client.IdentityModel.WebAssembly;
using Volo.Abp.Modularity; using Volo.Abp.Modularity;
namespace Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme; namespace Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme;
[DependsOn( [DependsOn(
typeof(AbpAspNetCoreComponentsWebAntDesignThemeModule), typeof(AbpAspNetCoreComponentsWebAntDesignThemeModule),
typeof(AbpAspNetCoreComponentsWebAssemblyModule) typeof(AbpAspNetCoreComponentsWebAssemblyModule),
typeof(AbpHttpClientIdentityModelWebAssemblyModule)
)] )]
public class AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule : AbpModule public class AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule : AbpModule
{ {

7
modules/Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme/Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj

@ -12,10 +12,9 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="6.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="6.0.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly" Version="5.1.3" /> <PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly" Version="5.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.1" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="6.0.1" /> <PackageReference Include="Volo.Abp.Http.Client.IdentityModel.WebAssembly" Version="5.1.4" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>

20
modules/Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme/Themes/AntDesignTheme/LoginDisplay.razor

@ -1,6 +1,6 @@
@using global::Localization.Resources.AbpUi @using global::Localization.Resources.AbpUi
@using Microsoft.Extensions.Localization @using Microsoft.Extensions.Localization
@* @using Microsoft.AspNetCore.Components.Authorization *@ @using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.JSInterop @using Microsoft.JSInterop
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase @inherits Volo.Abp.AspNetCore.Components.AbpComponentBase
@inject IJSRuntime JsRuntime @inject IJSRuntime JsRuntime
@ -28,15 +28,15 @@
</Menu> </Menu>
</Overlay> </Overlay>
<ChildContent> <ChildContent>
@* @if (CurrentTenant.Name != null) *@ @if (CurrentTenant.Name != null)
@* { *@ {
@* <span><i>@CurrentTenant.Name</i>\@CurrentUser.UserName</span> *@ <span><i>@CurrentTenant.Name</i>\@CurrentUser.UserName</span>
@* } *@ }
@* else *@ else
@* { *@ {
@* <span>@CurrentUser.UserName</span> *@ <span>@CurrentUser.UserName</span>
@* } *@ }
@* <Icon Type="down" /> *@ <Icon Type="down" />
</ChildContent> </ChildContent>
</Dropdown> </Dropdown>
</Authorized> </Authorized>

16
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/AbpPermissionManagementBlazorAntDesignModule.cs

@ -0,0 +1,16 @@
using Lsw.Abp.AntDesignUI;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
namespace Lsw.Abp.PermissionManagement.Blazor.AntDesignUI;
[DependsOn(
typeof(AbpAntDesignUIModule),
typeof(AbpAutoMapperModule),
typeof(AbpPermissionManagementApplicationContractsModule)
)]
public class AbpPermissionManagementBlazorAntDesignModule : AbpModule
{
}

48
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/Components/PermissionManagementModal.razor

@ -0,0 +1,48 @@
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase
<Modal Title="@($"{L["Permissions"]} - {_entityDisplayName}")"
Visible="@_visible"
OnOk="@SaveAsync"
OnCancel="@ClosingModal" Style="min-width: 700px">
@if (_visible)
{
var grantAll = _groups.All(x => x.Permissions.All(p => p.IsGranted));
<Checkbox @bind-Checked="@grantAll" OnChange="@GrantAllChanged">@L["SelectAllInAllTabs"]</Checkbox>
<Divider/>
@if (_groups != null)
{
<Tabs DefaultActiveKey="@_selectedTabName" TabPosition="@TabPosition.Left">
@foreach (var group in _groups)
{
var selectAllInThisTab = group.Permissions.All(x => x.IsGranted);
<TabPane Key="@GetNormalizedGroupName(group.Name)" Tab="@group.DisplayName">
<h4>@group.DisplayName</h4>
<Divider/>
<Checkbox
@bind-Checked="@selectAllInThisTab"
OnChange="b => GroupGrantAllChanged(b, group)">
@L["SelectAllInThisTab"]
</Checkbox>
<Divider/>
@foreach (var permission in group.Permissions)
{
var margin = permission.ParentName != null ? "1rem" : "0";
<div style="margin: @margin">
<Checkbox
Disabled="@(IsDisabledPermission(permission))"
@bind-Checked="@permission.IsGranted"
OnChange="b => PermissionChanged(b, group, permission)">
@GetShownName(permission)
</Checkbox>
</div>
}
</TabPane>
}
</Tabs>
}
}
</Modal>

187
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/Components/PermissionManagementModal.razor.cs

@ -0,0 +1,187 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Volo.Abp.AspNetCore.Components.Web.Configuration;
using Volo.Abp.PermissionManagement;
using Volo.Abp.PermissionManagement.Localization;
namespace Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.Components;
public partial class PermissionManagementModal
{
[Inject]
protected IPermissionAppService PermissionAppService { get; set; }
[Inject]
protected ICurrentApplicationConfigurationCacheResetService CurrentApplicationConfigurationCacheResetService { get; set; }
private string _providerName;
private string _providerKey;
private bool _visible;
private string _entityDisplayName;
private List<PermissionGroupDto> _groups;
private List<PermissionGrantInfoDto> _disabledPermissions = new();
private string _selectedTabName;
public PermissionManagementModal()
{
LocalizationResource = typeof(AbpPermissionManagementResource);
}
private async Task SaveAsync(MouseEventArgs e)
{
try
{
var updateDto = new UpdatePermissionsDto
{
Permissions = _groups
.SelectMany(g => g.Permissions)
.Select(p => new UpdatePermissionDto { IsGranted = p.IsGranted, Name = p.Name })
.ToArray()
};
await PermissionAppService.UpdateAsync(_providerName, _providerKey, updateDto);
await CurrentApplicationConfigurationCacheResetService.ResetAsync();
_visible = false;
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
private void ClosingModal(MouseEventArgs e)
{
_visible = false;
}
public async Task OpenAsync(string providerName, string providerKey, string entityDisplayName = null)
{
try
{
_providerName = providerName;
_providerKey = providerKey;
var result = await PermissionAppService.GetAsync(_providerName, _providerKey);
_entityDisplayName = entityDisplayName ?? result.EntityDisplayName;
_groups = result.Groups;
foreach (var permission in _groups.SelectMany(x => x.Permissions))
{
if (permission.IsGranted && permission.GrantedProviders.All(x => x.ProviderName != _providerName))
{
_disabledPermissions.Add(permission);
}
}
_selectedTabName = GetNormalizedGroupName(_groups.First().Name);
_visible = true;
StateHasChanged();
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
private string GetNormalizedGroupName(string name)
{
return "PermissionGroup_" + name.Replace(".", "_");
}
private void GrantAllChanged(bool value)
{
foreach (var groupDto in _groups)
{
foreach (var permission in groupDto.Permissions)
{
if (!IsDisabledPermission(permission))
{
SetPermissionGrant(permission, value);
}
}
}
}
private void GroupGrantAllChanged(bool value, PermissionGroupDto permissionGroup)
{
foreach (var permission in permissionGroup.Permissions)
{
if (!IsDisabledPermission(permission))
{
SetPermissionGrant(permission, value);
}
}
}
private bool IsDisabledPermission(PermissionGrantInfoDto permissionGrantInfo)
{
return _disabledPermissions.Any(x => x == permissionGrantInfo);
}
private void PermissionChanged(bool value, PermissionGroupDto permissionGroup, PermissionGrantInfoDto permission)
{
SetPermissionGrant(permission, value);
if (value && permission.ParentName != null)
{
var parentPermission = GetParentPermission(permissionGroup, permission);
SetPermissionGrant(parentPermission, true);
}
else if (value == false)
{
var childPermissions = GetChildPermissions(permissionGroup, permission);
foreach (var childPermission in childPermissions)
{
SetPermissionGrant(childPermission, false);
}
}
}
private void SetPermissionGrant(PermissionGrantInfoDto permission, bool value)
{
if (permission.IsGranted == value)
{
return;
}
permission.IsGranted = value;
}
private PermissionGrantInfoDto GetParentPermission(PermissionGroupDto permissionGroup, PermissionGrantInfoDto permission)
{
return permissionGroup.Permissions.First(x => x.Name == permission.ParentName);
}
private List<PermissionGrantInfoDto> GetChildPermissions(PermissionGroupDto permissionGroup, PermissionGrantInfoDto permission)
{
return permissionGroup.Permissions.Where(x => x.Name.StartsWith(permission.Name)).ToList();
}
private string GetShownName(PermissionGrantInfoDto permissionGrantInfo)
{
if (!IsDisabledPermission(permissionGrantInfo))
{
return permissionGrantInfo.DisplayName;
}
return string.Format(
"{0} ({1})",
permissionGrantInfo.DisplayName,
permissionGrantInfo.GrantedProviders
.Where(p => p.ProviderName != _providerName)
.Select(p => p.ProviderName)
.JoinAsString(", ")
);
}
}

16
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.4" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\src\Lsw.Abp.AntDesignUI\Lsw.Abp.AntDesignUI.csproj" />
</ItemGroup>
</Project>

6
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.AntDesignUI/_Imports.razor

@ -0,0 +1,6 @@
@using Microsoft.AspNetCore.Components.Web
@using Volo.Abp.AspNetCore.Components.Web
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components
@using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.Components

13
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI/AbpPermissionManagementBlazorServerAntDesignModule.cs

@ -0,0 +1,13 @@
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme;
using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI;
using Volo.Abp.Modularity;
namespace Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI;
[DependsOn(
typeof(AbpPermissionManagementBlazorAntDesignModule),
typeof(AbpAspNetCoreComponentsServerAntDesignThemeModule)
)]
public class AbpPermissionManagementBlazorServerAntDesignModule : AbpModule
{
}

12
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI/Lsw.Abp.PermissionManagement.Blazor.Server.AntDesignUI.csproj

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj" />
<ProjectReference Include="..\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

15
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI/AbpPermissionManagementBlazorWebAssemblyAntDesignModule.cs

@ -0,0 +1,15 @@
using Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme;
using Lsw.Abp.PermissionManagement.Blazor.AntDesignUI;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
namespace Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI;
[DependsOn(
typeof(AbpPermissionManagementBlazorAntDesignModule),
typeof(AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule),
typeof(AbpPermissionManagementHttpApiClientModule)
)]
public class AbpPermissionManagementBlazorWebAssemblyAntDesignModule : AbpModule
{
}

16
modules/PermissionManagement/Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI/Lsw.Abp.PermissionManagement.Blazor.WebAssembly.AntDesignUI.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj" />
<ProjectReference Include="..\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

43
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/AbpSettingManagementBlazorAntDesignModule.cs

@ -0,0 +1,43 @@
using AutoMapper;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI.Settings;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpSettingManagementApplicationContractsModule),
typeof(AbpAspNetCoreComponentsWebAntDesignThemeModule)
)]
public class AbpSettingManagementBlazorAntDesignModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpSettingManagementBlazorAntDesignModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<SettingManagementBlazorAutoMapperProfile>(validate: true);
});
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new SettingManagementMenuContributor());
});
Configure<AbpRouterOptions>(options =>
{
options.AdditionalAssemblies.Add(typeof(AbpSettingManagementBlazorAntDesignModule).Assembly);
});
Configure<SettingManagementComponentOptions>(options =>
{
options.Contributors.Add(new AntDesignSettingDefultPageContributor());
});
}
}

11
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/ISettingComponentContributor.cs

@ -0,0 +1,11 @@
using System.Threading.Tasks;
// ReSharper disable once CheckNamespace
namespace Volo.Abp.SettingManagement.Blazor;
public interface ISettingComponentContributor
{
Task ConfigureAsync(SettingComponentCreationContext context);
Task<bool> CheckPermissionsAsync(SettingComponentCreationContext context);
}

30
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/AntDesignThemeGroup/AntDesignThemeGroupViewComponent.razor

@ -0,0 +1,30 @@
@using Volo.Abp.SettingManagement.Localization
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase
@inject AbpBlazorMessageLocalizerHelper<AbpSettingManagementResource> LH
<Form
Layout="@FormLayout.Vertical"
Model="@AbpAntDesignThemeOptions">
<FormItem Label="Menu placement">
<Select DataSource="@MenuPlacements"
ValueName="@nameof(SelectOptionItem.Value)"
LabelName="@nameof(SelectOptionItem.Text)"
@bind-Value="@context.Menu.Placement">
</Select>
</FormItem>
<FormItem Label="Menu theme">
<Select DataSource="@MenuThemes"
ValueName="@nameof(SelectOptionItem.Value)"
LabelName="@nameof(SelectOptionItem.Text)"
@bind-Value="@context.Menu.Theme">
</Select>
</FormItem>
<FormItem WrapperColOffset="8">
<Button Type="@ButtonType.Primary" HtmlType="submit" OnClick="@UpdateSettingAsync">
@L["Submit"]
</Button>
</FormItem>
</Form>

70
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/AntDesignThemeGroup/AntDesignThemeGroupViewComponent.razor.cs

@ -0,0 +1,70 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using AntDesign;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Settings;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Options;
using Volo.Abp.SettingManagement.Localization;
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement.AntDesignThemeGroup;
//TODO localization
public partial class AntDesignThemeGroupViewComponent
{
public const string Name = "Volo.Abp.AntDesignThemeGroupViewComponent";
[Inject]
protected IOptions<AbpAntDesignThemeOptions> Options { get; set; }
[Inject]
protected IAntDesignSettingsProvider AntDesignSettingsProvider { get; set; }
[CascadingParameter]
protected SettingManagement SettingManagement { get; set; }
protected AbpAntDesignThemeOptions AbpAntDesignThemeOptions { get; set; } = new();
protected readonly List<SelectOptionItem> MenuPlacements = new()
{
new SelectOptionItem("Left",MenuPlacement.Left),
new SelectOptionItem("Top",MenuPlacement.Top)
};
protected readonly List<SelectOptionItem> MenuThemes = new()
{
new SelectOptionItem("Dark",MenuTheme.Dark),
new SelectOptionItem("Light",MenuTheme.Light)
};
public AntDesignThemeGroupViewComponent()
{
LocalizationResource = typeof(AbpSettingManagementResource);
}
protected override void OnInitialized()
{
AbpAntDesignThemeOptions = Options.Value;
}
private async Task UpdateSettingAsync()
{
await AntDesignSettingsProvider.TriggerSettingChanged();
await Notify.Success(L["SuccessfullySaved"]);
}
}
public class SelectOptionItem
{
public SelectOptionItem(string text, object value)
{
Text = text;
Value = value;
}
public string Text { get; set; }
public object Value { get; set; }
}

46
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor

@ -0,0 +1,46 @@
@using Volo.Abp.SettingManagement.Localization
@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase
@inject AbpBlazorMessageLocalizerHelper<AbpSettingManagementResource> LH
<Form
Layout="@FormLayout.Vertical"
Model="@EmailSettings">
<FormItem Label="@L["DefaultFromDisplayName"]">
<Input @bind-Value="@context.DefaultFromDisplayName"/>
</FormItem>
<FormItem Label="@L["DefaultFromAddress"]">
<Input @bind-Value="@context.DefaultFromAddress"/>
</FormItem>
<FormItem Label="@L["SmtpHost"]">
<Input @bind-Value="@context.SmtpHost"/>
</FormItem>
<FormItem Label="@L["SmtpPort"]">
<Input @bind-Value="@context.SmtpPort"/>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.SmtpEnableSsl">@L["SmtpEnableSsl"]</Checkbox>
</FormItem>
<FormItem>
<Checkbox @bind-Value="context.SmtpUseDefaultCredentials">@L["SmtpUseDefaultCredentials"]</Checkbox>
</FormItem>
@if (EmailSettings.SmtpUseDefaultCredentials)
{
<FormItem Label="@L["SmtpDomain"]">
<Input @bind-Value="@context.SmtpDomain"/>
</FormItem>
<FormItem Label="@L["SmtpUserName"]">
<Input @bind-Value="@context.SmtpUserName"/>
</FormItem>
<FormItem Label="@L["Password"]">
<InputPassword @bind-Value="@context.SmtpPassword"/>
</FormItem>
}
<FormItem WrapperColOffset="8">
<Button Type="@ButtonType.Primary" HtmlType="submit" OnClick="@UpdateSettingsAsync">
@L["Submit"]
</Button>
</FormItem>
</Form>

54
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/EmailSettingGroup/EmailSettingGroupViewComponent.razor.cs

@ -0,0 +1,54 @@
using System;
using System.Threading.Tasks;
using AutoMapper;
using Microsoft.AspNetCore.Components;
using Volo.Abp.AspNetCore.Components.Messages;
using Volo.Abp.AspNetCore.Components.Web.Configuration;
using Volo.Abp.SettingManagement.Localization;
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement.EmailSettingGroup;
public partial class EmailSettingGroupViewComponent
{
[Inject]
protected IEmailSettingsAppService EmailSettingsAppService { get; set; }
[Inject]
private ICurrentApplicationConfigurationCacheResetService CurrentApplicationConfigurationCacheResetService { get; set; }
protected EmailSettingsDto EmailSettings = new();
public EmailSettingGroupViewComponent()
{
ObjectMapperContext = typeof(AbpSettingManagementBlazorAntDesignModule);
LocalizationResource = typeof(AbpSettingManagementResource);
}
protected override async Task OnInitializedAsync()
{
try
{
EmailSettings = await EmailSettingsAppService.GetAsync();
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
protected virtual async Task UpdateSettingsAsync()
{
try
{
await EmailSettingsAppService.UpdateAsync(ObjectMapper.Map<EmailSettingsDto, UpdateEmailSettingsDto>(EmailSettings));
await CurrentApplicationConfigurationCacheResetService.ResetAsync();
await Message.Success(L["SuccessfullySaved"]);
}
catch (Exception ex)
{
await HandleErrorAsync(ex);
}
}
}

33
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/SettingManagement.razor

@ -0,0 +1,33 @@
@page "/setting-management"
@using Microsoft.AspNetCore.Authorization
@using Volo.Abp.Features
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout
@attribute [Authorize]
@attribute [RequiresFeature(SettingManagementFeatures.Enable)]
<CascadingValue Value="this" IsFixed="true">
<AbpPageHeader Title="@L["Settings"]" BreadcrumbItems="@BreadcrumbItems"/>
<div class="page-content">
<Tabs ActiveKey="@SelectedGroup" TabPosition="@TabPosition.Left">
@foreach (var group in SettingComponentCreationContext.Groups)
{
<TabPane Key="@GetNormalizedString(group.Id)" Tab="@group.DisplayName">
<h4>@group.DisplayName</h4>
<Divider/>
@{
SettingItemRenders.Add(b =>
{
b.OpenComponent(0, group.ComponentType);
b.CloseComponent();
});
}
@SettingItemRenders.Last()
</TabPane>
}
</Tabs>
</div>
</CascadingValue>

57
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Pages/SettingManagement/SettingManagement.razor.cs

@ -0,0 +1,57 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AntDesign;
using Lsw.Abp.AntDesignUI;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement.AntDesignThemeGroup;
using Volo.Abp.SettingManagement.Localization;
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement;
public partial class SettingManagement
{
[Inject]
protected IServiceProvider ServiceProvider { get; set; }
protected SettingComponentCreationContext SettingComponentCreationContext { get; set; }
[Inject]
protected IOptions<SettingManagementComponentOptions> _options { get; set; }
[Inject]
protected IStringLocalizer<AbpSettingManagementResource> L { get; set; }
protected SettingManagementComponentOptions Options => _options.Value;
protected List<RenderFragment> SettingItemRenders { get; set; } = new();
protected string SelectedGroup { get; set; }
protected List<AbpBreadcrumbItem> BreadcrumbItems = new();
protected override async Task OnInitializedAsync()
{
BreadcrumbItems = new List<AbpBreadcrumbItem>
{
new(L["Settings"])
};
SettingComponentCreationContext = new SettingComponentCreationContext(ServiceProvider);
foreach (var contributor in Options.Contributors)
{
await contributor.ConfigureAsync(SettingComponentCreationContext);
}
SettingItemRenders.Clear();
}
protected virtual string GetNormalizedString(string value)
{
return value.Replace('.', '_');
}
}

21
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingComponentCreationContext.cs

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using Volo.Abp.DependencyInjection;
// ReSharper disable once CheckNamespace
namespace Volo.Abp.SettingManagement.Blazor;
public class SettingComponentCreationContext : IServiceProviderAccessor
{
public IServiceProvider ServiceProvider { get; }
public List<SettingComponentGroup> Groups { get; }
public SettingComponentCreationContext(IServiceProvider serviceProvider)
{
ServiceProvider = serviceProvider;
Groups = new List<SettingComponentGroup>();
}
}

38
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingComponentGroup.cs

@ -0,0 +1,38 @@
// ReSharper disable once CheckNamespace
using System;
using JetBrains.Annotations;
namespace Volo.Abp.SettingManagement.Blazor;
public class SettingComponentGroup
{
public string Id {
get => _id;
set => _id = Check.NotNullOrWhiteSpace(value, nameof(Id));
}
private string _id;
public string DisplayName {
get => _displayName;
set => _displayName = Check.NotNullOrWhiteSpace(value, nameof(DisplayName));
}
private string _displayName;
public Type ComponentType {
get => _componentType;
set => _componentType = Check.NotNull(value, nameof(ComponentType));
}
private Type _componentType;
public object Parameter { get; set; }
public SettingComponentGroup([NotNull] string id, [NotNull] string displayName, [NotNull] Type componentType, object parameter = null)
{
Id = id;
DisplayName = displayName;
ComponentType = componentType;
Parameter = parameter;
}
}

11
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingManagementBlazorAutoMapperProfile.cs

@ -0,0 +1,11 @@
using AutoMapper;
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI;
public class SettingManagementBlazorAutoMapperProfile : Profile
{
public SettingManagementBlazorAutoMapperProfile()
{
CreateMap<EmailSettingsDto, UpdateEmailSettingsDto>();
}
}

15
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingManagementComponentOptions.cs

@ -0,0 +1,15 @@
// ReSharper disable once CheckNamespace
using System.Collections.Generic;
namespace Volo.Abp.SettingManagement.Blazor;
public class SettingManagementComponentOptions
{
public List<ISettingComponentContributor> Contributors { get; }
public SettingManagementComponentOptions()
{
Contributors = new List<ISettingComponentContributor>();
}
}

62
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingManagementMenuContributor.cs

@ -0,0 +1,62 @@
using System.Linq;
using System.Threading.Tasks;
using AntDesign;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.Features;
using Volo.Abp.SettingManagement.Localization;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI;
public class SettingManagementMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
}
private async Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var settingManagementPageOptions = context.ServiceProvider.GetRequiredService<IOptions<SettingManagementComponentOptions>>().Value;
var settingPageCreationContext = new SettingComponentCreationContext(context.ServiceProvider);
if (!settingManagementPageOptions.Contributors.Any() ||
!(await CheckAnyOfPagePermissionsGranted(settingManagementPageOptions, settingPageCreationContext))
)
{
return;
}
var l = context.GetLocalizer<AbpSettingManagementResource>();
context.Menu.GetAdministration().TryRemoveMenuItem(SettingManagementMenus.GroupName);
context.Menu
.GetAdministration()
.AddItem(
new ApplicationMenuItem(
SettingManagementMenus.GroupName,
l["Settings"],
"~/setting-management",
icon: IconType.Outline.Setting
).RequireFeatures(SettingManagementFeatures.Enable)
);
}
protected virtual async Task<bool> CheckAnyOfPagePermissionsGranted(
SettingManagementComponentOptions settingManagementComponentOptions,
SettingComponentCreationContext settingComponentCreationContext)
{
foreach (var contributor in settingManagementComponentOptions.Contributors)
{
if (await contributor.CheckPermissionsAsync(settingComponentCreationContext))
{
return true;
}
}
return false;
}
}

6
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/SettingManagementMenus.cs

@ -0,0 +1,6 @@
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI;
public class SettingManagementMenus
{
public const string GroupName = "SettingManagement";
}

71
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Settings/AntDesignSettingDefultPageContributor.cs

@ -0,0 +1,71 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Volo.Abp.Features;
using Volo.Abp.MultiTenancy;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement.AntDesignThemeGroup;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI.Pages.SettingManagement.EmailSettingGroup;
using Volo.Abp.SettingManagement.Localization;
namespace Volo.Abp.SettingManagement.Blazor.AntDesignUI.Settings;
public class AntDesignSettingDefultPageContributor : ISettingComponentContributor
{
public async Task ConfigureAsync(SettingComponentCreationContext context)
{
if (!await CheckPermissionsInternalAsync(context))
{
return;
}
var l = context.ServiceProvider.GetRequiredService<IStringLocalizer<AbpSettingManagementResource>>();
context.Groups.Add(
new SettingComponentGroup(
"Volo.Abp.SettingManagement",
l["Menu:Emailing"],
typeof(EmailSettingGroupViewComponent)
)
);
context.Groups.Add(
new SettingComponentGroup(
AntDesignThemeGroupViewComponent.Name,
"Theme",
typeof(AntDesignThemeGroupViewComponent)
)
);
}
public async Task<bool> CheckPermissionsAsync(SettingComponentCreationContext context)
{
return await CheckPermissionsInternalAsync(context);
}
private async Task<bool> CheckPermissionsInternalAsync(SettingComponentCreationContext context)
{
if (!await CheckFeatureAsync(context))
{
return false;
}
var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
return await authorizationService.IsGrantedAsync(SettingManagementPermissions.Emailing);
}
private async Task<bool> CheckFeatureAsync(SettingComponentCreationContext context)
{
var currentTenant = context.ServiceProvider.GetRequiredService<ICurrentTenant>();
if (!currentTenant.IsAvailable)
{
return true;
}
var featureCheck = context.ServiceProvider.GetRequiredService<IFeatureChecker>();
return await featureCheck.IsEnabledAsync(SettingManagementFeatures.AllowTenantsToChangeEmailSettings);
}
}

16
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/Volo.Abp.SettingManagement.Blazor.AntDesignUI.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.4" />
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FeatureManagement\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

5
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.AntDesignUI/_Imports.razor

@ -0,0 +1,5 @@
@using Microsoft.AspNetCore.Components.Web
@using Volo.Abp.AspNetCore.Components.Web
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components

14
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI/AbpSettingManagementBlazorWebAssemblyAntDesignModule.cs

@ -0,0 +1,14 @@
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI;
namespace Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI;
[DependsOn(
typeof(AbpSettingManagementBlazorAntDesignModule),
typeof(AbpAspNetCoreComponentsServerAntDesignThemeModule)
)]
public class AbpSettingManagementBlazorWebAssemblyAntDesignModule : AbpModule
{
}

12
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI/Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI.csproj

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj" />
<ProjectReference Include="..\Volo.Abp.SettingManagement.Blazor.AntDesignUI\Volo.Abp.SettingManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

15
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI/AbpSettingManagementBlazorWebAssemblyAntDesignModule.cs

@ -0,0 +1,15 @@
using Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI;
namespace Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI;
[DependsOn(
typeof(AbpSettingManagementBlazorAntDesignModule),
typeof(AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule),
typeof(AbpSettingManagementHttpApiClientModule)
)]
public class AbpSettingManagementBlazorWebAssemblyAntDesignModule : AbpModule
{
}

17
modules/SettingManagement/Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI/Volo.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI.csproj

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.SettingManagement.HttpApi.Client" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj" />
<ProjectReference Include="..\Volo.Abp.SettingManagement.Blazor.AntDesignUI\Volo.Abp.SettingManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

57
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/AbpTenantManagementBlazorAntDesignModule.cs

@ -0,0 +1,57 @@
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing;
using Lsw.Abp.FeatureManagement.Blazor.AntDesignUI;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.ObjectExtending.Modularity;
using Volo.Abp.TenantManagement;
using Volo.Abp.Threading;
using Volo.Abp.UI.Navigation;
namespace Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpTenantManagementApplicationContractsModule),
typeof(AbpFeatureManagementBlazorAntDesignModule)
)]
public class AbpTenantManagementBlazorAntDesignModule : AbpModule
{
private static readonly OneTimeRunner OneTimeRunner = new();
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpTenantManagementBlazorAntDesignModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpTenantManagementBlazorAutoMapperProfile>(validate: true);
});
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new TenantManagementBlazorMenuContributor());
});
Configure<AbpRouterOptions>(options =>
{
options.AdditionalAssemblies.Add(typeof(AbpTenantManagementBlazorAntDesignModule).Assembly);
});
}
public override void PostConfigureServices(ServiceConfigurationContext context)
{
OneTimeRunner.Run(() =>
{
ModuleExtensionConfigurationHelper
.ApplyEntityConfigurationToUi(
TenantManagementModuleExtensionConsts.ModuleName,
TenantManagementModuleExtensionConsts.EntityNames.Tenant,
createFormTypes: new[] { typeof(TenantCreateDto) },
editFormTypes: new[] { typeof(TenantUpdateDto) }
);
});
}
}

13
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/AbpTenantManagementBlazorAutoMapperProfile.cs

@ -0,0 +1,13 @@
using AutoMapper;
using Volo.Abp.TenantManagement;
namespace Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
public class AbpTenantManagementBlazorAutoMapperProfile : Profile
{
public AbpTenantManagementBlazorAutoMapperProfile()
{
CreateMap<TenantDto, TenantUpdateDto>()
.MapExtraProperties();
}
}

16
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/Lsw.Abp.TenantManagement.Blazor.AntDesignUI.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="5.1.4" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FeatureManagement\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

66
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/Pages/TenantManagement.razor

@ -0,0 +1,66 @@
@page "/tenant-management/tenants"
@attribute [Authorize(TenantManagementPermissions.Tenants.Default)]
@using Microsoft.AspNetCore.Authorization
@using Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.Components
@using Microsoft.AspNetCore.Components.Forms
@using Volo.Abp.TenantManagement.Localization
@using Volo.Abp.AspNetCore.Components.Web
@using Volo.Abp.TenantManagement
@inject AbpBlazorMessageLocalizerHelper<AbpTenantManagementResource> LH
@inherits AbpCrudPageBase<ITenantAppService, TenantDto, Guid, GetTenantsInput, TenantCreateDto, TenantUpdateDto>
<AbpPageHeader Title="@L["Tenants"]" BreadcrumbItems="@BreadcrumbItems" Toolbar="@Toolbar"/>
<div class="page-content">
<AbpExtensibleDataGrid TItem="TenantDto"
Data="@Entities"
OnChange="@OnDataGridReadAsync"
TotalItems="@TotalCount"
PageSize="@PageSize"
CurrentPage="@CurrentPage"
Columns="@TenantManagementTableColumns">
</AbpExtensibleDataGrid>
</div>
@if (HasCreatePermission)
{
<Modal @ref="CreateModal" Title="@L["NewTenant"]" Visible="@CreateModalVisible" OnCancel="@CloseCreateModalAsync" OnOk="CreateEntityAsync">
<Form
Layout="@FormLayout.Vertical"
@ref="@CreateFormRef"
Model="@NewEntity">
<FormItem Label="@L["TenantName"]">
<Input @bind-Value="@context.Name"/>
</FormItem>
<FormItem Label="@L["DisplayName:AdminEmailAddress"]">
<Input @bind-Value="@context.AdminEmailAddress"/>
</FormItem>
<FormItem Label="@L["DisplayName:AdminPassword"]">
<InputPassword @bind-Value="@context.AdminPassword"/>
</FormItem>
</Form>
</Modal>
}
@if (HasUpdatePermission)
{
<Modal @ref="EditModal" Title="@L["Edit"]" Visible="@EditModalVisible" OnCancel="@CloseEditModalAsync" OnOk="UpdateEntityAsync">
<Form
Layout="@FormLayout.Vertical"
@ref="@EditFormRef"
Model="@EditingEntity">
<FormItem Label="@L["TenantName"]">
<Input @bind-Value="@context.Name"/>
</FormItem>
</Form>
</Modal>
}
@if (HasManageFeaturesPermission)
{
<FeatureManagementModal @ref="FeatureManagementModal"/>
}

137
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/Pages/TenantManagement.razor.cs

@ -0,0 +1,137 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using AntDesign;
using Lsw.Abp.AntDesignUI;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.PageToolbars;
using Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.Components;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.AspNetCore.Components.Web.Extensibility.EntityActions;
using Volo.Abp.AspNetCore.Components.Web.Extensibility.TableColumns;
using Volo.Abp.FeatureManagement;
using Volo.Abp.TenantManagement;
using Volo.Abp.TenantManagement.Localization;
namespace Lsw.Abp.TenantManagement.Blazor.AntDesignUI.Pages;
public partial class TenantManagement
{
protected const string FeatureProviderName = "T";
protected bool HasManageFeaturesPermission;
protected string ManageFeaturesPolicyName;
protected FeatureManagementModal FeatureManagementModal;
protected PageToolbar Toolbar { get; } = new();
protected List<TableColumn> TenantManagementTableColumns => TableColumns.Get<TenantManagement>();
public TenantManagement()
{
LocalizationResource = typeof(AbpTenantManagementResource);
ObjectMapperContext = typeof(AbpTenantManagementBlazorAntDesignModule);
CreatePolicyName = TenantManagementPermissions.Tenants.Create;
UpdatePolicyName = TenantManagementPermissions.Tenants.Update;
DeletePolicyName = TenantManagementPermissions.Tenants.Delete;
ManageFeaturesPolicyName = TenantManagementPermissions.Tenants.ManageFeatures;
}
protected override ValueTask SetBreadcrumbItemsAsync()
{
BreadcrumbItems = new List<AbpBreadcrumbItem>()
{
new(L["Menu:TenantManagement"]),
new(L["Tenants"])
};
return base.SetBreadcrumbItemsAsync();
}
protected override async Task SetPermissionsAsync()
{
await base.SetPermissionsAsync();
HasManageFeaturesPermission = await AuthorizationService.IsGrantedAsync(ManageFeaturesPolicyName);
}
protected override string GetDeleteConfirmationMessage(TenantDto entity)
{
return string.Format(L["TenantDeletionConfirmationMessage"], entity.Name);
}
protected override ValueTask SetToolbarItemsAsync()
{
Toolbar.AddButton(L["ManageHostFeatures"],
async () => await FeatureManagementModal.OpenAsync(FeatureProviderName),
IconType.Outline.Setting,
requiredPolicyName: FeatureManagementPermissions.ManageHostFeatures);
Toolbar.AddButton(L["NewTenant"],
OpenCreateModalAsync,
IconType.Outline.Plus,
requiredPolicyName: CreatePolicyName);
return base.SetToolbarItemsAsync();
}
protected override ValueTask SetEntityActionsAsync()
{
EntityActions
.Get<TenantManagement>()
.AddRange(new EntityAction[]
{
new EntityAction
{
Text = L["Edit"],
Visible = (data) => HasUpdatePermission,
Clicked = async (data) => { await OpenEditModalAsync(data.As<TenantDto>()); }
},
new EntityAction
{
Text = L["Features"],
Visible = (data) => HasManageFeaturesPermission,
Clicked = async (data) =>
{
var tenant = data.As<TenantDto>();
await FeatureManagementModal.OpenAsync(FeatureProviderName, tenant.Id.ToString());
}
},
new EntityAction
{
Text = L["Delete"],
Visible = (data) => HasDeletePermission,
Clicked = async (data) => await DeleteEntityAsync(data.As<TenantDto>()),
ConfirmationMessage = (data) => GetDeleteConfirmationMessage(data.As<TenantDto>())
}
});
return base.SetEntityActionsAsync();
}
protected override ValueTask SetTableColumnsAsync()
{
TenantManagementTableColumns
.AddRange(new TableColumn[]
{
new TableColumn
{
Title = L["TenantName"],
Data = nameof(TenantDto.Name),
},
new TableColumn
{
Title = L["Actions"],
Actions = EntityActions.Get<TenantManagement>()
},
});
// TenantManagementTableColumns.AddRange(GetExtensionTableColumns(
// TenantManagementModuleExtensionConsts.ModuleName,
// TenantManagementModuleExtensionConsts.EntityNames.Tenant));
return base.SetTableColumnsAsync();
}
}

38
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/TenantManagementBlazorMenuContributor.cs

@ -0,0 +1,38 @@
using System.Threading.Tasks;
using AntDesign;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.TenantManagement;
using Volo.Abp.TenantManagement.Localization;
using Volo.Abp.UI.Navigation;
namespace Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
public class TenantManagementBlazorMenuContributor : IMenuContributor
{
public virtual Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name != StandardMenus.Main)
{
return Task.CompletedTask;
}
var administrationMenu = context.Menu.GetAdministration();
var l = context.GetLocalizer<AbpTenantManagementResource>();
var tenantManagementMenuItem = new ApplicationMenuItem(
TenantManagementMenuNames.GroupName,
l["Menu:TenantManagement"],
icon: IconType.Outline.Team
);
administrationMenu.AddItem(tenantManagementMenuItem);
tenantManagementMenuItem.AddItem(new ApplicationMenuItem(
TenantManagementMenuNames.Tenants,
l["Tenants"],
url: "~/tenant-management/tenants"
).RequirePermissions(TenantManagementPermissions.Tenants.Default));
return Task.CompletedTask;
}
}

8
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/TenantManagementMenuNames.cs

@ -0,0 +1,8 @@
namespace Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
public class TenantManagementMenuNames
{
public const string GroupName = "TenantManagement";
public const string Tenants = GroupName + ".Tenants";
}

7
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.AntDesignUI/_Imports.razor

@ -0,0 +1,7 @@
@using Microsoft.AspNetCore.Components.Web
@using Volo.Abp.AspNetCore.Components.Web
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components
@using Lsw.Abp.FeatureManagement.Blazor.AntDesignUI.Components
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout

14
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI/AbpTenantManagementBlazorServerAntDesignModule.cs

@ -0,0 +1,14 @@
using Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
using Volo.Abp.Modularity;
namespace Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI;
[DependsOn(
typeof(AbpTenantManagementBlazorAntDesignModule),
typeof(AbpFeatureManagementBlazorWebServerAntDesignModule)
)]
public class AbpTenantManagementBlazorServerAntDesignModule : AbpModule
{
}

12
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI/Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI.csproj

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\FeatureManagement\Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI.csproj" />
<ProjectReference Include="..\Lsw.Abp.TenantManagement.Blazor.AntDesignUI\Lsw.Abp.TenantManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

17
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI/AbpTenantManagementBlazorWebAssemblyAntDesignModule.cs

@ -0,0 +1,17 @@
using Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement;
namespace Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI;
[DependsOn(
typeof(AbpTenantManagementBlazorAntDesignModule),
typeof(AbpFeatureManagementBlazorWebAssemblyAntDesignModule),
typeof(AbpTenantManagementHttpApiClientModule)
)]
public class AbpTenantManagementBlazorWebAssemblyAntDesignModule : AbpModule
{
}

16
modules/TenantManagement/Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI/Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FeatureManagement\Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI.csproj" />
<ProjectReference Include="..\Lsw.Abp.TenantManagement.Blazor.AntDesignUI\Lsw.Abp.TenantManagement.Blazor.AntDesignUI.csproj" />
</ItemGroup>
</Project>

1
samples/BookStore/.gitattributes

@ -0,0 +1 @@
**/wwwroot/libs/** linguist-vendored

262
samples/BookStore/.gitignore

@ -0,0 +1,262 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# BookStore
src/BookStore.Web/Logs/*
src/BookStore.Web.Host/Logs/*
src/BookStore.IdentityServer/Logs/*
src/BookStore.HttpApi.Host/Logs/*
src/BookStore.HttpApi.Host/Logs/*
src/BookStore.DbMigrator/Logs/*
src/BookStore.Blazor.Server/Logs/*
src/BookStore.Blazor.Server.Tiered/Logs/*

5
samples/BookStore/.prettierrc

@ -0,0 +1,5 @@
{
"singleQuote": true,
"useTabs": false,
"tabWidth": 4
}

51
samples/BookStore/BookStore.BlazorServer/BookStore.BlazorServer.csproj

@ -0,0 +1,51 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>BookStore-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\modules\IdentityManagement\Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI\Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI.csproj" />
<ProjectReference Include="..\..\..\modules\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj" />
<ProjectReference Include="..\..\..\modules\SettingManagement\Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI\Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI.csproj" />
<ProjectReference Include="..\..\..\modules\TenantManagement\Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI\Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI.csproj" />
<ProjectReference Include="..\src\BookStore.Application\BookStore.Application.csproj" />
<ProjectReference Include="..\src\BookStore.HttpApi\BookStore.HttpApi.csproj" />
<ProjectReference Include="..\src\BookStore.EntityFrameworkCore\BookStore.EntityFrameworkCore.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="5.1.4" />
<PackageReference Include="Volo.Abp.Autofac" Version="5.1.4" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="5.1.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="5.1.4" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="5.1.4" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="5.1.4" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<None Update="Pages\**\*.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Pages\**\*.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

240
samples/BookStore/BookStore.BlazorServer/BookStoreBlazorModule.cs

@ -0,0 +1,240 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using BookStore.Blazor.Menus;
using BookStore.EntityFrameworkCore;
using BookStore.Localization;
using BookStore.MultiTenancy;
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing;
using Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI;
using Volo.Abp.SettingManagement.Blazor.Server.AntDesignUI;
using Volo.Abp.Swashbuckle;
using Volo.Abp.UI.Navigation;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.VirtualFileSystem;
namespace BookStore.Blazor;
[DependsOn(
typeof(BookStoreApplicationModule),
typeof(BookStoreEntityFrameworkCoreModule),
typeof(BookStoreHttpApiModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAutofacModule),
typeof(AbpSwashbuckleModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAccountWebIdentityServerModule),
typeof(AbpIdentityBlazorServerAntDesignModule),
typeof(AbpTenantManagementBlazorServerAntDesignModule),
typeof(AbpSettingManagementBlazorAntDesignModule)
)]
public class BookStoreBlazorModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(BookStoreResource),
typeof(BookStoreDomainModule).Assembly,
typeof(BookStoreDomainSharedModule).Assembly,
typeof(BookStoreApplicationModule).Assembly,
typeof(BookStoreApplicationContractsModule).Assembly,
typeof(BookStoreBlazorModule).Assembly
);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureUrls(configuration);
ConfigureBundles();
ConfigureAuthentication(context, configuration);
ConfigureAutoMapper();
ConfigureLocalizationServices();
ConfigureSwaggerServices(context.Services);
ConfigureAutoApiControllers();
ConfigureRouter(context);
ConfigureMenu(context);
}
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"].Split(','));
});
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
// MVC UI
options.StyleBundles.Configure(
BasicThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
//BLAZOR UI
options.StyleBundles.Configure(
BlazorAntDesignThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/blazor-global-styles.css");
//You can remove the following line if you don't use Blazor CSS isolation for components
bundle.AddFiles("/BookStore.BlazorServer.styles.css");
}
);
});
}
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication()
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "BookStore";
});
}
private void ConfigureLocalizationServices()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية"));
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in"));
options.Languages.Add(new LanguageInfo("is", "is", "Icelandic", "is"));
options.Languages.Add(new LanguageInfo("it", "it", "Italiano", "it"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ro-RO", "ro-RO", "Română"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de"));
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
});
}
private void ConfigureSwaggerServices(IServiceCollection services)
{
services.AddAbpSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookStore API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
}
);
}
private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new BookStoreMenuContributor());
});
}
private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(BookStoreBlazorModule).Assembly;
});
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(BookStoreApplicationModule).Assembly);
});
}
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreBlazorModule>();
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var env = context.GetEnvironment();
var app = context.GetApplicationBuilder();
app.UseAbpRequestLocalization();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseIdentityServer();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "BookStore API");
});
app.UseConfiguredEndpoints();
}
}

10
samples/BookStore/BookStore.BlazorServer/BookStoreBrandingProvider.cs

@ -0,0 +1,10 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Ui.Branding;
namespace BookStore.Blazor;
[Dependency(ReplaceServices = true)]
public class BookStoreBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "BookStore";
}

12
samples/BookStore/BookStore.BlazorServer/BookStoreComponentBase.cs

@ -0,0 +1,12 @@
using BookStore.Localization;
using Volo.Abp.AspNetCore.Components;
namespace BookStore.Blazor;
public abstract class BookStoreComponentBase : AbpComponentBase
{
protected BookStoreComponentBase()
{
LocalizationResource = typeof(BookStoreResource);
}
}

52
samples/BookStore/BookStore.BlazorServer/Menus/BookStoreMenuContributor.cs

@ -0,0 +1,52 @@
using System.Threading.Tasks;
using AntDesign;
using BookStore.Localization;
using BookStore.MultiTenancy;
using Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
using Volo.Abp.SettingManagement.Blazor.AntDesignUI;
using Volo.Abp.UI.Navigation;
namespace BookStore.Blazor.Menus;
public class BookStoreMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
}
private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var administration = context.Menu.GetAdministration();
var l = context.GetLocalizer<BookStoreResource>();
context.Menu.Items.Insert(
0,
new ApplicationMenuItem(
BookStoreMenus.Home,
l["Menu:Home"],
"/",
icon: IconType.Outline.Home,
order: 0
)
);
if (MultiTenancyConsts.IsEnabled)
{
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1);
}
else
{
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
}
administration.SetSubItemOrder(IdentityMenuNames.GroupName, 2);
administration.SetSubItemOrder(SettingManagementMenus.GroupName, 3);
return Task.CompletedTask;
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save