ソースを参照

Initial commit: Himp TaskScheduling Hangfire project

master
DESKTOP-58BB7H3\ZJH 1ヶ月前
コミット
e7b3dd643f
100個のファイルの変更3422行の追加0行の削除
  1. +1
    -0
      Acme.BookStore/.gitattributes
  2. +265
    -0
      Acme.BookStore/.gitignore
  3. +5
    -0
      Acme.BookStore/.prettierrc
  4. +172
    -0
      Acme.BookStore/Acme.BookStore.sln
  5. +23
    -0
      Acme.BookStore/Acme.BookStore.sln.DotSettings
  6. +5
    -0
      Acme.BookStore/NuGet.Config
  7. +72
    -0
      Acme.BookStore/README.md
  8. +19
    -0
      Acme.BookStore/common.props
  9. +25
    -0
      Acme.BookStore/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj
  10. +28
    -0
      Acme.BookStore/src/Acme.BookStore.Application.Contracts/BookStoreApplicationContractsModule.cs
  11. +28
    -0
      Acme.BookStore/src/Acme.BookStore.Application.Contracts/BookStoreDtoExtensions.cs
  12. +20
    -0
      Acme.BookStore/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissionDefinitionProvider.cs
  13. +9
    -0
      Acme.BookStore/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissions.cs
  14. +25
    -0
      Acme.BookStore/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj
  15. +17
    -0
      Acme.BookStore/src/Acme.BookStore.Application/BookStoreAppService.cs
  16. +13
    -0
      Acme.BookStore/src/Acme.BookStore.Application/BookStoreApplicationAutoMapperProfile.cs
  17. +31
    -0
      Acme.BookStore/src/Acme.BookStore.Application/BookStoreApplicationModule.cs
  18. +2
    -0
      Acme.BookStore/src/Acme.BookStore.Application/Properties/AssemblyInfo.cs
  19. +63
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/Acme.BookStore.AuthServer.csproj
  20. +220
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/BookStoreAuthServerModule.cs
  21. +10
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/BookStoreBrandingProvider.cs
  22. +114
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/Pages/Index.cshtml
  23. +35
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/Pages/Index.cshtml.cs
  24. +4
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/Pages/_ViewImports.cshtml
  25. +56
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/Program.cs
  26. +27
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/Properties/launchSettings.json
  27. +11
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/abp.resourcemapping.js
  28. +2
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/appsettings.Development.json
  29. +17
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/appsettings.json
  30. +2
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/appsettings.secrets.json
  31. +8
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/package.json
  32. +18
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/web.config
  33. +6
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/global-styles.css
  34. バイナリ
      Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/images/logo/leptonx/logo-dark-thumbnail.png
  35. バイナリ
      Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/images/logo/leptonx/logo-dark.png
  36. バイナリ
      Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/images/logo/leptonx/logo-light-thumbnail.png
  37. バイナリ
      Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/images/logo/leptonx/logo-light.png
  38. +325
    -0
      Acme.BookStore/src/Acme.BookStore.AuthServer/yarn.lock
  39. +37
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/Acme.BookStore.Blazor.Client.csproj
  40. +11
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreBlazorAutoMapperProfile.cs
  41. +99
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreBlazorClientModule.cs
  42. +10
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreBrandingProvider.cs
  43. +19
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreBundleContributor.cs
  44. +12
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreComponentBase.cs
  45. +83
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/Menus/BookStoreMenuContributor.cs
  46. +10
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/Menus/BookStoreMenus.cs
  47. +180
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/Pages/Index.razor
  48. +6
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/Pages/Index.razor.cs
  49. +1
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/Pages/Index.razor.css
  50. +22
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/Program.cs
  51. +11
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/Routes.razor
  52. +15
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/_Imports.razor
  53. +3
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/appsettings.Development.json
  54. +22
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/appsettings.json
  55. +2
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/appsettings.secrets.json
  56. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/favicon.ico
  57. +30
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/global.css
  58. +37
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/global.js
  59. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/icon-192.png
  60. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/icon-512.png
  61. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/images/logo/leptonx/logo-dark-thumbnail.png
  62. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/images/logo/leptonx/logo-dark.png
  63. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/images/logo/leptonx/logo-light-thumbnail.png
  64. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/images/logo/leptonx/logo-light.png
  65. +59
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/main.css
  66. +21
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/manifest.json
  67. +4
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/service-worker.js
  68. +48
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/service-worker.published.js
  69. +38
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Acme.BookStore.Blazor.WebApp.Client.csproj
  70. +11
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreBlazorAutoMapperProfile.cs
  71. +100
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreBlazorClientModule.cs
  72. +10
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreBrandingProvider.cs
  73. +19
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreBundleContributor.cs
  74. +12
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreComponentBase.cs
  75. +88
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Menus/BookStoreMenuContributor.cs
  76. +10
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Menus/BookStoreMenus.cs
  77. +176
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Pages/Index.razor
  78. +6
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Pages/Index.razor.cs
  79. +1
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Pages/Index.razor.css
  80. +22
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Program.cs
  81. +13
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Routes.razor
  82. +14
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/_Imports.razor
  83. +3
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/appsettings.Development.json
  84. +18
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/appsettings.json
  85. +2
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/appsettings.secrets.json
  86. +17
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/global.css
  87. +37
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/global.js
  88. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/icon-192.png
  89. バイナリ
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/icon-512.png
  90. +55
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/main.css
  91. +21
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/manifest.json
  92. +4
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/service-worker.js
  93. +48
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/service-worker.published.js
  94. +38
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/Acme.BookStore.Blazor.WebApp.Tiered.Client.csproj
  95. +11
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreBlazorAutoMapperProfile.cs
  96. +99
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreBlazorClientModule.cs
  97. +10
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreBrandingProvider.cs
  98. +19
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreBundleContributor.cs
  99. +12
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreComponentBase.cs
  100. +88
    -0
      Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/Menus/BookStoreMenuContributor.cs

+ 1
- 0
Acme.BookStore/.gitattributes ファイルの表示

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

+ 265
- 0
Acme.BookStore/.gitignore ファイルの表示

@@ -0,0 +1,265 @@
## 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/Acme.BookStore.Web/Logs/*
src/Acme.BookStore.Web/Logs/*
src/Acme.BookStore.AuthServer/Logs/*
src/Acme.BookStore.HttpApi.Host/Logs/*
src/Acme.BookStore.HttpApi.HostWithIds/Logs/*
src/Acme.BookStore.DbMigrator/Logs/*
src/Acme.BookStore.Blazor.Server/Logs/*
src/Acme.BookStore.Blazor.Server.Tiered/Logs/*

# Use abp install-libs to restore.
**/wwwroot/libs/*

+ 5
- 0
Acme.BookStore/.prettierrc ファイルの表示

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

+ 172
- 0
Acme.BookStore/Acme.BookStore.sln ファイルの表示

@@ -0,0 +1,172 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain", "src\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application", "src\Acme.BookStore.Application\Acme.BookStore.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.EntityFrameworkCore", "src\Acme.BookStore.EntityFrameworkCore\Acme.BookStore.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application.Tests", "test\Acme.BookStore.Application.Tests\Acme.BookStore.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain.Shared", "src\Acme.BookStore.Domain.Shared\Acme.BookStore.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application.Contracts", "src\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi", "src\Acme.BookStore.HttpApi\Acme.BookStore.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi.Client", "src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Web", "src\Acme.BookStore.Web\Acme.BookStore.Web.csproj", "{6FE54035-9C11-4702-A5E2-D16F23101468}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.AuthServer", "src\Acme.BookStore.AuthServer\Acme.BookStore.AuthServer.csproj", "{073C361E-B8F4-49F5-93CC-72A3FF49C026}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi.Host", "src\Acme.BookStore.HttpApi.Host\Acme.BookStore.HttpApi.Host.csproj", "{E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.EntityFrameworkCore.Tests", "test\Acme.BookStore.EntityFrameworkCore.Tests\Acme.BookStore.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.TestBase", "test\Acme.BookStore.TestBase\Acme.BookStore.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain.Tests", "test\Acme.BookStore.Domain.Tests\Acme.BookStore.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi.Client.ConsoleTestApp", "test\Acme.BookStore.HttpApi.Client.ConsoleTestApp\Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.DbMigrator", "src\Acme.BookStore.DbMigrator\Acme.BookStore.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acme.BookStore.Blazor.Client", "src\Acme.BookStore.Blazor.Client\Acme.BookStore.Blazor.Client.csproj", "{188A64AD-A1A7-4F95-85D1-C935594611B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acme.BookStore.Blazor.WebApp", "src\Acme.BookStore.Blazor.WebApp\Acme.BookStore.Blazor.WebApp.csproj", "{14882ABF-1EEF-430C-8E72-812B3EE810C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acme.BookStore.Blazor.WebApp.Client", "src\Acme.BookStore.Blazor.WebApp.Client\Acme.BookStore.Blazor.WebApp.Client.csproj", "{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acme.BookStore.Blazor.WebApp.Tiered", "src\Acme.BookStore.Blazor.WebApp.Tiered\Acme.BookStore.Blazor.WebApp.Tiered.csproj", "{8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Acme.BookStore.Blazor.WebApp.Tiered.Client", "src\Acme.BookStore.Blazor.WebApp.Tiered.Client\Acme.BookStore.Blazor.WebApp.Tiered.Client.csproj", "{834C6A10-7562-427C-8771-B0588C35873D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
{6FE54035-9C11-4702-A5E2-D16F23101468}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6FE54035-9C11-4702-A5E2-D16F23101468}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6FE54035-9C11-4702-A5E2-D16F23101468}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6FE54035-9C11-4702-A5E2-D16F23101468}.Release|Any CPU.Build.0 = Release|Any CPU
{073C361E-B8F4-49F5-93CC-72A3FF49C026}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{073C361E-B8F4-49F5-93CC-72A3FF49C026}.Debug|Any CPU.Build.0 = Debug|Any CPU
{073C361E-B8F4-49F5-93CC-72A3FF49C026}.Release|Any CPU.ActiveCfg = Release|Any CPU
{073C361E-B8F4-49F5-93CC-72A3FF49C026}.Release|Any CPU.Build.0 = Release|Any CPU
{E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}.Release|Any CPU.Build.0 = Release|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
{188A64AD-A1A7-4F95-85D1-C935594611B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{188A64AD-A1A7-4F95-85D1-C935594611B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{188A64AD-A1A7-4F95-85D1-C935594611B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{188A64AD-A1A7-4F95-85D1-C935594611B7}.Release|Any CPU.Build.0 = Release|Any CPU
{14882ABF-1EEF-430C-8E72-812B3EE810C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14882ABF-1EEF-430C-8E72-812B3EE810C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14882ABF-1EEF-430C-8E72-812B3EE810C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14882ABF-1EEF-430C-8E72-812B3EE810C4}.Release|Any CPU.Build.0 = Release|Any CPU
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Release|Any CPU.Build.0 = Release|Any CPU
{8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A3E5E20-F162-4321-8AD5-23DD7B2B0E74}.Release|Any CPU.Build.0 = Release|Any CPU
{834C6A10-7562-427C-8771-B0588C35873D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{834C6A10-7562-427C-8771-B0588C35873D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{834C6A10-7562-427C-8771-B0588C35873D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{834C6A10-7562-427C-8771-B0588C35873D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{6FE54035-9C11-4702-A5E2-D16F23101468} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{073C361E-B8F4-49F5-93CC-72A3FF49C026} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{E6D5BF0E-DE92-4D82-A352-EF04B37CB11C} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{188A64AD-A1A7-4F95-85D1-C935594611B7} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{14882ABF-1EEF-430C-8E72-812B3EE810C4} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{8A3E5E20-F162-4321-8AD5-23DD7B2B0E74} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{834C6A10-7562-427C-8771-B0588C35873D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
EndGlobalSection
EndGlobal

+ 23
- 0
Acme.BookStore/Acme.BookStore.sln.DotSettings ファイルの表示

@@ -0,0 +1,23 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceDoWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceFixedStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceIfStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceLockStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceUsingStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_REDUNDANT/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Overrides/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
</wpf:ResourceDictionary>

+ 5
- 0
Acme.BookStore/NuGet.Config ファイルの表示

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
</packageSources>
</configuration>

+ 72
- 0
Acme.BookStore/README.md ファイルの表示

@@ -0,0 +1,72 @@
# Acme.BookStore

## About this solution

This is a layered startup solution based on [Domain Driven Design (DDD)](https://docs.abp.io/en/abp/latest/Domain-Driven-Design) practises. All the fundamental ABP modules are already installed.

### Pre-requirements

* [.NET 8.0+ SDK](https://dotnet.microsoft.com/download/dotnet)
* [Node v18 or 20](https://nodejs.org/en)
* [Redis](https://redis.io/)

### Configurations

The solution comes with a default configuration that works out of the box. However, you may consider to change the following configuration before running your solution:

* Check the `ConnectionStrings` in `appsettings.json` files under the `Acme.BookStore.AuthServer`, `Acme.BookStore.HttpApi.Host` and `Acme.BookStore.DbMigrator` projects and change it if you need.

### Before running the application

#### Generating a Signing Certificate

In the production environment, you need to use a production signing certificate. ABP Framework sets up signing and encryption certificates in your application and expects an `openiddict.pfx` file in your application.

This certificate is already generated by ABP CLI, so most of the time you don't need to generate it yourself. However, if you need to generate a certificate, you can use the following command:

```bash
dotnet dev-certs https -v -ep openiddict.pfx -p 7caa3a34-feaf-4613-95cb-ecbaf48ffc21
```

> `7caa3a34-feaf-4613-95cb-ecbaf48ffc21` is the password of the certificate, you can change it to any password you want.

It is recommended to use **two** RSA certificates, distinct from the certificate(s) used for HTTPS: one for encryption, one for signing.

For more information, please refer to: https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-certificate-recommended-for-production-ready-scenarios

> Also, see the [Configuring OpenIddict](https://docs.abp.io/en/abp/latest/Deployment/Configuring-OpenIddict#production-environment) documentation for more information.

#### Install Client-Side Libraries

Run the following command in the directory of your final application:

```bash
abp install-libs
```

> This command installs all NPM packages for MVC/Razor Pages and Blazor Server UIs and this command is already run by the ABP CLI, so most of the time you don't need to run this command manually.

#### Create the Database

Run `Acme.BookStore.DbMigrator` to create the initial database. This should be done in the first run. It is also needed if a new database migration is added to the solution later.

### Solution structure

This is a layered monolith application that consists of the following applications:

* `Acme.BookStore.DbMigrator`: A console application which applies the migrations and also seeds the initial data. It is useful on development as well as on production environment.
* `Acme.BookStore.AuthServer`: ASP.NET Core MVC / Razor Pages application that is integrated OAuth 2.0(`OpenIddict`) and account modules. It is used to authenticate users and issue tokens.
* `Acme.BookStore.HttpApi.Host`: ASP.NET Core API application that is used to expose the APIs to the clients.
* `Acme.BookStore.Web`: ASP.NET Core MVC / Razor Pages application that is the essential web application of the solution.

### Deploying the application

Deploying an ABP application is not different than deploying any .NET or ASP.NET Core application. However, there are some topics that you should care about when you are deploying your applications. You can check ABP's [Deployment documentation](https://docs.abp.io/en/abp/latest/Deployment/Index) before deploying your application.

### Additional resources

You can see the following resources to learn more about your solution and the ABP Framework:

* [Web Application Development Tutorial](https://docs.abp.io/en/abp/latest/Tutorials/Part-1)
* [Application Startup Template Structure](https://docs.abp.io/en/abp/latest/Startup-Templates/Application)
* [LeptonX Lite MVC UI](https://docs.abp.io/en/abp/latest/Themes/LeptonXLite/AspNetCore)

+ 19
- 0
Acme.BookStore/common.props ファイルの表示

@@ -0,0 +1,19 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<AbpProjectType>app</AbpProjectType>
</PropertyGroup>

<Target Name="NoWarnOnRazorViewImportedTypeConflicts" BeforeTargets="RazorCoreCompile">
<PropertyGroup>
<NoWarn>$(NoWarn);0436</NoWarn>
</PropertyGroup>
</Target>

<ItemGroup>
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*" />
</ItemGroup>

</Project>

+ 25
- 0
Acme.BookStore/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj ファイルの表示

@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Acme.BookStore</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain.Shared\Acme.BookStore.Domain.Shared.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.ObjectExtending" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="8.2.0" />
</ItemGroup>

</Project>

+ 28
- 0
Acme.BookStore/src/Acme.BookStore.Application.Contracts/BookStoreApplicationContractsModule.cs ファイルの表示

@@ -0,0 +1,28 @@
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;

namespace Acme.BookStore;

[DependsOn(
typeof(BookStoreDomainSharedModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpFeatureManagementApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpPermissionManagementApplicationContractsModule),
typeof(AbpSettingManagementApplicationContractsModule),
typeof(AbpTenantManagementApplicationContractsModule),
typeof(AbpObjectExtendingModule)
)]
public class BookStoreApplicationContractsModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
BookStoreDtoExtensions.Configure();
}
}

+ 28
- 0
Acme.BookStore/src/Acme.BookStore.Application.Contracts/BookStoreDtoExtensions.cs ファイルの表示

@@ -0,0 +1,28 @@
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;

namespace Acme.BookStore;

public static class BookStoreDtoExtensions
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();

public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can add extension properties to DTOs
* defined in the depended modules.
*
* Example:
*
* ObjectExtensionManager.Instance
* .AddOrUpdateProperty<IdentityRoleDto, string>("Title");
*
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Object-Extensions
*/
});
}
}

+ 20
- 0
Acme.BookStore/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissionDefinitionProvider.cs ファイルの表示

@@ -0,0 +1,20 @@
using Acme.BookStore.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;

namespace Acme.BookStore.Permissions;

public class BookStorePermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var myGroup = context.AddGroup(BookStorePermissions.GroupName);
//Define your own permissions here. Example:
//myGroup.AddPermission(BookStorePermissions.MyPermission1, L("Permission:MyPermission1"));
}

private static LocalizableString L(string name)
{
return LocalizableString.Create<BookStoreResource>(name);
}
}

+ 9
- 0
Acme.BookStore/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissions.cs ファイルの表示

@@ -0,0 +1,9 @@
namespace Acme.BookStore.Permissions;

public static class BookStorePermissions
{
public const string GroupName = "BookStore";

//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
}

+ 25
- 0
Acme.BookStore/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj ファイルの表示

@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">

<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Acme.BookStore</RootNamespace>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj" />
<ProjectReference Include="..\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Application" Version="8.2.0" />
</ItemGroup>

</Project>

+ 17
- 0
Acme.BookStore/src/Acme.BookStore.Application/BookStoreAppService.cs ファイルの表示

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
using Acme.BookStore.Localization;
using Volo.Abp.Application.Services;

namespace Acme.BookStore;

/* Inherit your application services from this class.
*/
public abstract class BookStoreAppService : ApplicationService
{
protected BookStoreAppService()
{
LocalizationResource = typeof(BookStoreResource);
}
}

+ 13
- 0
Acme.BookStore/src/Acme.BookStore.Application/BookStoreApplicationAutoMapperProfile.cs ファイルの表示

@@ -0,0 +1,13 @@
using AutoMapper;

namespace Acme.BookStore;

public class BookStoreApplicationAutoMapperProfile : Profile
{
public BookStoreApplicationAutoMapperProfile()
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
}
}

+ 31
- 0
Acme.BookStore/src/Acme.BookStore.Application/BookStoreApplicationModule.cs ファイルの表示

@@ -0,0 +1,31 @@
using Volo.Abp.Account;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;

namespace Acme.BookStore;

[DependsOn(
typeof(BookStoreDomainModule),
typeof(AbpAccountApplicationModule),
typeof(BookStoreApplicationContractsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpFeatureManagementApplicationModule),
typeof(AbpSettingManagementApplicationModule)
)]
public class BookStoreApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreApplicationModule>();
});
}
}

+ 2
- 0
Acme.BookStore/src/Acme.BookStore.Application/Properties/AssemblyInfo.cs ファイルの表示

@@ -0,0 +1,2 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("Acme.BookStore.Application.Tests")]

+ 63
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/Acme.BookStore.AuthServer.csproj ファイルの表示

@@ -0,0 +1,63 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Acme.BookStore</RootNamespace>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>Acme.BookStore-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup>

<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>

<ItemGroup Condition="Exists('./openiddict.pfx')">
<None Remove="openiddict.pfx" />
<EmbeddedResource Include="openiddict.pfx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="8.0.4" />
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="3.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="8.2.0" />
<PackageReference Include="Volo.Abp.DistributedLocking" Version="8.2.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Account.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="8.2.0" />
<ProjectReference Include="..\Acme.BookStore.EntityFrameworkCore\Acme.BookStore.EntityFrameworkCore.csproj" />
</ItemGroup>

</Project>

+ 220
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/BookStoreAuthServerModule.cs ファイルの表示

@@ -0,0 +1,220 @@
using System;
using System.IO;
using System.Linq;
using Localization.Resources.AbpUi;
using Medallion.Threading;
using Medallion.Threading.Redis;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Acme.BookStore.EntityFrameworkCore;
using Acme.BookStore.Localization;
using Acme.BookStore.MultiTenancy;
using StackExchange.Redis;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Mvc.UI;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Auditing;
using Volo.Abp.Autofac;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.Caching;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.DistributedLocking;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using Volo.Abp.Security.Claims;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.UI;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.Account.Localization;

namespace Acme.BookStore;

[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpAccountWebOpenIddictModule),
typeof(AbpAccountApplicationModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule),
typeof(BookStoreEntityFrameworkCoreModule),
typeof(AbpAspNetCoreSerilogModule)
)]
public class BookStoreAuthServerModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();

PreConfigure<OpenIddictBuilder>(builder =>
{
builder.AddValidation(options =>
{
options.AddAudiences("BookStore");
options.UseLocalServer();
options.UseAspNetCore();
});
});

if (!hostingEnvironment.IsDevelopment())
{
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options =>
{
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});

PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
{
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "7caa3a34-feaf-4613-95cb-ecbaf48ffc21");
});
}
}

public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();

Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<BookStoreResource>()
.AddBaseTypes(
typeof(AbpUiResource),
typeof(AccountResource)
);
});

Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles.Configure(
LeptonXLiteThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
});

Configure<AbpAuditingOptions>(options =>
{
//options.IsEnabledForGetRequests = true;
options.ApplicationName = "AuthServer";
});

if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}Acme.BookStore.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}Acme.BookStore.Domain"));
});
}

Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"]?.Split(',') ?? Array.Empty<string>());

options.Applications["Angular"].RootUrl = configuration["App:ClientUrl"];
options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
});

Configure<AbpBackgroundJobOptions>(options =>
{
options.IsJobExecutionEnabled = false;
});

Configure<AbpDistributedCacheOptions>(options =>
{
options.KeyPrefix = "BookStore:";
});

var dataProtectionBuilder = context.Services.AddDataProtection().SetApplicationName("BookStore");
if (!hostingEnvironment.IsDevelopment())
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]!);
dataProtectionBuilder.PersistKeysToStackExchangeRedis(redis, "BookStore-Protection-Keys");
}

context.Services.AddSingleton<IDistributedLockProvider>(sp =>
{
var connection = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]!);
return new RedisDistributedSynchronizationProvider(connection.GetDatabase());
});

context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]?
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray() ?? Array.Empty<string>()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});

context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}

public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();

if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}

app.UseAbpRequestLocalization();

if (!env.IsDevelopment())
{
app.UseErrorPage();
}

app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseAbpOpenIddictValidation();

if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}

app.UseUnitOfWork();
app.UseDynamicClaims();
app.UseAuthorization();

app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
}

+ 10
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/BookStoreBrandingProvider.cs ファイルの表示

@@ -0,0 +1,10 @@
using Volo.Abp.Ui.Branding;
using Volo.Abp.DependencyInjection;

namespace Acme.BookStore;

[Dependency(ReplaceServices = true)]
public class BookStoreBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "BookStore";
}

+ 114
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/Pages/Index.cshtml ファイルの表示

@@ -0,0 +1,114 @@
@page
@using Microsoft.AspNetCore.Http.Extensions
@using Microsoft.AspNetCore.Mvc.Localization
@using Acme.BookStore.Pages
@using Acme.BookStore.Localization
@using Volo.Abp.Users
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@using Volo.Abp.Ui.Branding
@model IndexModel
@inject IHtmlLocalizer<BookStoreResource> L
@inject ICurrentUser CurrentUser
@inject IBrandingProvider BrandingProvider
@inject ITheme Theme

@{
Layout = Theme.GetEmptyLayout();
}

@section styles {
<style>
body {
background-color: white;
}
</style>
}

<div class="d-flex align-items-center" style="min-height: 100vh;">
<div class="container">
<abp-row>
<div class="col mx-auto account-column">
<div class="account-brand p-4 text-center mb-1">
@if (!BrandingProvider.LogoUrl.IsNullOrEmpty())
{
<a class="navbar-brand" href="~/" alt="@BrandingProvider.AppName"></a>
}
else
{
<h1>@BrandingProvider.AppName</h1>
}
</div>

<abp-card>
<abp-card-body>
<div class="container">
<abp-row>
<abp-column size="_6">
<div class="mr-auto p-2 float-start">
<div class="">
@if (CurrentUser.IsAuthenticated)
{
<div class="">
<a abp-button="Outline_Primary" asp-controller="Manage" asp-action="Index" asp-area="Account" class="me-2">@L["MyAccount"]</a>
<a abp-button="Primary" asp-controller="Logout" asp-action="Index" asp-area="Account" asp-route-returnUrl="/" >@L["Logout"]</a>
</div>
}
else
{
<a abp-button="Primary" asp-controller="Login" asp-action="Index" asp-area="Account">@L["Login"]</a>
}
</div>
</div>
</abp-column>

<abp-column size="_6">
<div class="ml-auto p-2 float-end">
<abp-dropdown>
<abp-dropdown-button text="@Model.CurrentLanguage" />
@if (@Model.Languages != null)
{
<abp-dropdown-menu>
@foreach (var language in Model.Languages)
{
var languageUrl = Url.Content($"~/Abp/Languages/Switch?culture={language.CultureName}&uiCulture={language.UiCultureName}&returnUrl={System.Net.WebUtility.UrlEncode(Request.GetEncodedPathAndQuery())}");
<abp-dropdown-item href="@languageUrl">@language.DisplayName</abp-dropdown-item>
}
</abp-dropdown-menu>
}
</abp-dropdown>
</div>
</abp-column>
</abp-row>

@if (Model.Applications != null)
{
<hr class="m-2" />

<abp-row class="mt-3">
@foreach (var application in Model.Applications)
{
<abp-column size-md="@Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Grid.ColumnSize._4" class="mb-2">
<abp-card>
<abp-card-body>
@if (!application.LogoUri.IsNullOrEmpty())
{
<div class="mx-auto">
<img src="@application.LogoUri" style="height:64px" class="mb-3"/>
</div>
}

<h4>@application.DisplayName</h4>
<a href="@application.ClientUri" class="text-muted stretched-link">@application.ClientUri</a>
</abp-card-body>
</abp-card>
</abp-column>
}
</abp-row>
}
</div>
</abp-card-body>
</abp-card>
</div>
</abp-row>
</div>
</div>

+ 35
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/Pages/Index.cshtml.cs ファイルの表示

@@ -0,0 +1,35 @@
using System.Collections.Generic;
using System.Globalization;
using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.Abp.Localization;
using Volo.Abp.OpenIddict.Applications;

namespace Acme.BookStore.Pages;

public class IndexModel : AbpPageModel
{
public List<OpenIddictApplication>? Applications { get; protected set; }

public IReadOnlyList<LanguageInfo>? Languages { get; protected set; }

public string? CurrentLanguage { get; protected set; }

protected IOpenIddictApplicationRepository OpenIdApplicationRepository { get; }

protected ILanguageProvider LanguageProvider { get; }

public IndexModel(IOpenIddictApplicationRepository openIdApplicationRepository, ILanguageProvider languageProvider)
{
OpenIdApplicationRepository = openIdApplicationRepository;
LanguageProvider = languageProvider;
}

public async Task OnGetAsync()
{
Applications = await OpenIdApplicationRepository.GetListAsync();

Languages = await LanguageProvider.GetLanguagesAsync();
CurrentLanguage = CultureInfo.CurrentCulture.DisplayName;
}
}

+ 4
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/Pages/_ViewImports.cshtml ファイルの表示

@@ -0,0 +1,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

+ 56
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/Program.cs ファイルの表示

@@ -0,0 +1,56 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;

namespace Acme.BookStore;

public class Program
{
public async static Task<int> Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()
#else
.MinimumLevel.Information()
#endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateLogger();

try
{
Log.Information("Starting Acme.BookStore.AuthServer.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog();
await builder.AddApplicationAsync<BookStoreAuthServerModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}

Log.Fatal(ex, "Acme.BookStore.AuthServer terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
}

+ 27
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/Properties/launchSettings.json ファイルの表示

@@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:44352",
"sslPort": 44352
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Acme.BookStore.AuthServer": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:44352",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

+ 11
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/abp.resourcemapping.js ファイルの表示

@@ -0,0 +1,11 @@
module.exports = {
aliases: {

},
clean: [

],
mappings: {

}
};

+ 2
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/appsettings.Development.json ファイルの表示

@@ -0,0 +1,2 @@
{
}

+ 17
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/appsettings.json ファイルの表示

@@ -0,0 +1,17 @@
{
"App": {
"SelfUrl": "https://localhost:44352",
"ClientUrl": "http://localhost:4200",
"CorsOrigins": "https://*.BookStore.com,http://localhost:4200,https://localhost:44322,https://localhost:44328",
"RedirectAllowedUrls": "http://localhost:4200,https://localhost:44360,https://localhost:44322,https://localhost:44364"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=BookStore;Trusted_Connection=True;TrustServerCertificate=True"
},
"Redis": {
"Configuration": "127.0.0.1"
},
"StringEncryption": {
"DefaultPassPhrase": "BK5uWTGqVIWUgdEK"
}
}

+ 2
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/appsettings.secrets.json ファイルの表示

@@ -0,0 +1,2 @@
{
}

+ 8
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/package.json ファイルの表示

@@ -0,0 +1,8 @@
{
"version": "1.0.0",
"name": "my-app-authserver",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~3.2.0"
}
}

+ 18
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/web.config ファイルの表示

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\Acme.BookStore.AuthServer.dll" stdoutLogEnabled="false" stdoutLogFile=".\Logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="x-powered-by" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

+ 6
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/global-styles.css ファイルの表示

@@ -0,0 +1,6 @@
/* Your Global Styles */

:root .lpx-brand-logo {
--lpx-logo: url('/images/logo/leptonx/logo-light.png');
--lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
}

バイナリ
Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/images/logo/leptonx/logo-dark-thumbnail.png ファイルの表示

変更前 変更後
幅: 417  |  高さ: 450  |  サイズ: 10KB

バイナリ
Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/images/logo/leptonx/logo-dark.png ファイルの表示

変更前 変更後
幅: 2198  |  高さ: 450  |  サイズ: 37KB

バイナリ
Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/images/logo/leptonx/logo-light-thumbnail.png ファイルの表示

変更前 変更後
幅: 417  |  高さ: 450  |  サイズ: 9.0KB

バイナリ
Acme.BookStore/src/Acme.BookStore.AuthServer/wwwroot/images/logo/leptonx/logo-light.png ファイルの表示

変更前 変更後
幅: 2198  |  高さ: 450  |  サイズ: 32KB

+ 325
- 0
Acme.BookStore/src/Acme.BookStore.AuthServer/yarn.lock ファイルの表示

@@ -0,0 +1,325 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~3.2.0":
version "3.2.0"
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-3.2.0.tgz#02b93be81bd71b7d0f451883841d02be8620134e"
integrity sha512-cHazis0typaNtMja5HfKf6+udZ3eHQO29RRjizB4VKSznmgsy0o/u6wlg6HSch4DP33N6yN7TOd6re77+xBM+Q==
dependencies:
"@abp/aspnetcore.mvc.ui.theme.shared" "~8.2.0"

"@abp/aspnetcore.mvc.ui.theme.shared@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-8.2.0.tgz#dc16714f032c04a2219b41abcedef73076db89c8"
integrity sha512-6iCo5+aSfhmAtKgBOLFNG7uKnOWv64RH8LwVPbMDVdjG+gKD96V+OunFLiG1p8Ta7Y+pip7PHWBKAqE3iC3Fag==
dependencies:
"@abp/aspnetcore.mvc.ui" "~8.2.0"
"@abp/bootstrap" "~8.2.0"
"@abp/bootstrap-datepicker" "~8.2.0"
"@abp/bootstrap-daterangepicker" "~8.2.0"
"@abp/datatables.net-bs5" "~8.2.0"
"@abp/font-awesome" "~8.2.0"
"@abp/jquery-form" "~8.2.0"
"@abp/jquery-validation-unobtrusive" "~8.2.0"
"@abp/lodash" "~8.2.0"
"@abp/luxon" "~8.2.0"
"@abp/malihu-custom-scrollbar-plugin" "~8.2.0"
"@abp/moment" "~8.2.0"
"@abp/select2" "~8.2.0"
"@abp/sweetalert2" "~8.2.0"
"@abp/timeago" "~8.2.0"
"@abp/toastr" "~8.2.0"

"@abp/aspnetcore.mvc.ui@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-8.2.0.tgz#c63db25bdebe45d81c0dc3722400ae518787f409"
integrity sha512-5Mu7TBDzXHBWqKMns2OVf2C5g1/038wz1XjsiaHANJ3b1iwHX1gt90nV5THK5yXRXxBjOUZnBE1TOj/jKAKEWQ==
dependencies:
ansi-colors "^4.1.1"

"@abp/bootstrap-datepicker@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-8.2.0.tgz#b4b82364e6e937b1661348b204b766834eb6d96c"
integrity sha512-n4vVjeS2OOuFWrYHMJx1wQp7iyMgM/cofnQdAJy3S2U4cm72DeSCfOQN0LcxdyTlYAE+zGWexmzMAmDTJk/dGg==
dependencies:
bootstrap-datepicker "^1.9.0"

"@abp/bootstrap-daterangepicker@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-8.2.0.tgz#997416b0ea29906883b3455b24d087974cc91b1e"
integrity sha512-+2Hahy66bgFi4t+2il6zfTunilg2ARyr52AOSkqH440xKcdIMEdLeCRHgWadJj6zKnWCmN4LXfvKWgMmWwhPbg==
dependencies:
bootstrap-daterangepicker "^3.1.0"

"@abp/bootstrap@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/bootstrap/-/bootstrap-8.2.0.tgz#39ffb0807cdd9820251c637ee06f39cd4b84e737"
integrity sha512-+sNl5KzVi4f1+IAf/+jBwOzUEoqDKuvyOp9YZHOrTVyVj8inDXFCIUqGxTetVcTuD0loxVnHWgdUHetsFJvkJA==
dependencies:
"@abp/core" "~8.2.0"
bootstrap "^5.1.3"

"@abp/core@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/core/-/core-8.2.0.tgz#8c5dad48d5f115ffe1d4b7bfa473de3a14a29331"
integrity sha512-SzohDqNpby11B/teq9Su1zng19j2X8ifGVdIF5RYXPb/SZwO4+wqOpJL62ycVupKoB/wBk8X89NK7qrSE19rtg==
dependencies:
"@abp/utils" "~8.2.0"

"@abp/datatables.net-bs5@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/datatables.net-bs5/-/datatables.net-bs5-8.2.0.tgz#a18af46aa96658d2996b0754aa3eae0dbef7e713"
integrity sha512-45icvFVaEoPqVXmrTbtHrLFU7Cb/QH/gFChcTTSET9l2rQWG1hM2F5t2GPu7Hct15tUmQKCco6rUM32m0uekFQ==
dependencies:
"@abp/datatables.net" "~8.2.0"
datatables.net-bs5 "^1.11.4"

"@abp/datatables.net@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/datatables.net/-/datatables.net-8.2.0.tgz#23a81e953e3d2c8a7b45c0b0a5b471997f66dde0"
integrity sha512-Uc+NPRaZdTl7rnFdPp3VtX/Fd0igRH3byaqKXAzX639a+aaI5mA2Utm0kMZFXYVoh7Hp8bYGP0W5pzdGWzk2Mg==
dependencies:
"@abp/jquery" "~8.2.0"
datatables.net "^1.11.4"

"@abp/font-awesome@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/font-awesome/-/font-awesome-8.2.0.tgz#a94e4e01c2a5df251c62ad602d8b7eb9b4ebc952"
integrity sha512-uTPdfLZWV1lJGia2FTaBCC84w1NpBiVEHWF8cpn2EURBXRcBJAn4PZOBOQVs+qgW4QyawfjuaR57hKmOyRodWw==
dependencies:
"@abp/core" "~8.2.0"
"@fortawesome/fontawesome-free" "^6.5.1"

"@abp/jquery-form@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/jquery-form/-/jquery-form-8.2.0.tgz#40397c9f6d2b73d52551bc0555da1d118cfc17c3"
integrity sha512-8pvNMTADbPzxsLGRFzePmMLa7ZZ1UWnvcVpP4aZMQ0lB356trbB5tH1Q/Kd7QeuqZS2LaejgVOG6NkZtk09sHQ==
dependencies:
"@abp/jquery" "~8.2.0"
jquery-form "^4.3.0"

"@abp/jquery-validation-unobtrusive@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-8.2.0.tgz#03eae705ca16eafb110d9c953c9813100afc5a67"
integrity sha512-JuuYQWnRghlm+i1gsMXpJafGDu3nUdKab3zZ3BTAR0TRnbHaqKzPudhW28nxPqyrLhlEFiWOxsIFAv2Zo3AYgQ==
dependencies:
"@abp/jquery-validation" "~8.2.0"
jquery-validation-unobtrusive "^3.2.12"

"@abp/jquery-validation@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/jquery-validation/-/jquery-validation-8.2.0.tgz#f351ffdb7494a4bd3fc46a5d53fb21c80a526da1"
integrity sha512-7NlsSARX1omJcTyDXsdK4RHy2Lr5bmIa/LiGniLbNSfsRQxupXVzt9pygRuq3j/4mPCbwf7qVUSld1rgznhyeg==
dependencies:
"@abp/jquery" "~8.2.0"
jquery-validation "^1.19.3"

"@abp/jquery@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/jquery/-/jquery-8.2.0.tgz#f76f604ceef48220857a2828ae5da33ac8efb063"
integrity sha512-ow/A7a8b5FVRolMlOKPVaJsizmm8VjOr+g3LG3/Sj6Zvebx+j4YLXlUEfCl8FmEj2jjh5Q3hsKQwp1HW/S+FXA==
dependencies:
"@abp/core" "~8.2.0"
jquery "~3.6.0"

"@abp/lodash@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/lodash/-/lodash-8.2.0.tgz#8f3c463023344a5f85d0bcf91a6b9d33d40d8a82"
integrity sha512-YqCT3idDmeMTUr0RjTtobpTXazkm3kSMdzmFsQvp31sC5eyXDb7/SQip0OP4c3/co2CYhH/vwX5mbAmzDazY3w==
dependencies:
"@abp/core" "~8.2.0"
lodash "^4.17.21"

"@abp/luxon@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/luxon/-/luxon-8.2.0.tgz#c8014556e51bcdc1b0484f799f85ead82221fbd2"
integrity sha512-n11g3IcqE3bpzL06hpYSceQksNz8fowRceu8lJvw2Vo6STNPlL0Kv5awf8qxUcX27XOkE8t8UTBzAERLXZzyCQ==
dependencies:
"@abp/core" "~8.2.0"
luxon "^2.3.0"

"@abp/malihu-custom-scrollbar-plugin@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-8.2.0.tgz#3fc39da63b0e57b4fe4f8fcf0f5c32751b9149b8"
integrity sha512-ALnvSVnzW1q2BVjkGOlgU/fp4VJME7PZWOD/DozAuh1aBKKR9ElR5T54Uf9HQrB53sRaPchHBl9usIOZ0WDqWQ==
dependencies:
"@abp/core" "~8.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"

"@abp/moment@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/moment/-/moment-8.2.0.tgz#88aaf862be9d3129c5252dd021f584d19ecc6a0e"
integrity sha512-pg5LKOXCOe9ncoYCSWzvmPBH2VSVi+6CtmWnfcI23ir07PmAk5zmfNvDdkkBFsALxi5Ypq1UWH45o+a6FteHpQ==
dependencies:
moment "^2.9.0"

"@abp/select2@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/select2/-/select2-8.2.0.tgz#629777458160443b7d976a9642bfcab86d3b1ad4"
integrity sha512-TQJLRrfEJsDnp7n0OHKMyNF0Um+O4b7AvRhiVz8opiuAIpaFXQRp02/UuMBX9h7SQUWNONXEqKmLvKdyEIhLAA==
dependencies:
"@abp/core" "~8.2.0"
select2 "^4.0.13"

"@abp/sweetalert2@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/sweetalert2/-/sweetalert2-8.2.0.tgz#ff197a523e5b6c40da10e82e4834210e2aad396b"
integrity sha512-3w/bsEdV5B1Y288wVJa3CrkYASDqwwpuzjCk9g8Foe0xlc7TNs/X9HAm/PeDpdt8glxnxnvnN/zKJOtnFNRgWg==
dependencies:
"@abp/core" "~8.2.0"
sweetalert2 "^11.3.6"

"@abp/timeago@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/timeago/-/timeago-8.2.0.tgz#9c9806361e44271d9ada0680ee37bb85a00b44e2"
integrity sha512-Vwo7Y6m/9CGBcjqLQ/S6lyP27Ilf8ThB7B5QYYlKA5yAL/VqrRaElYmJ8g9+MH7elMuGPvfCnjlPYcBfP2anuQ==
dependencies:
"@abp/jquery" "~8.2.0"
timeago "^1.6.7"

"@abp/toastr@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/toastr/-/toastr-8.2.0.tgz#0b3781ccece1a10696461893543ae244f87b26c3"
integrity sha512-v0nKkP1PLIH92aTHOg/D6TgH65omMgQ30Ujamx2DU4yiRX5Z/2ZJNyO5//9mvmCt8hGXrqVJZwRLVKI/t7UV8A==
dependencies:
"@abp/jquery" "~8.2.0"
toastr "^2.1.4"

"@abp/utils@~8.2.0":
version "8.2.0"
resolved "https://registry.npmmirror.com/@abp/utils/-/utils-8.2.0.tgz#7895fa98e0729cb6d2f65ac1660ddfc94bd979cd"
integrity sha512-47WX1bNId6KEm9Se4BJmd3dQXDscYB878RTABXnOmB018QSNQjJFwp8dR0E9I5ZaXRUcBetrpkHku6OyXr/gXw==
dependencies:
just-compare "^2.3.0"

"@fortawesome/fontawesome-free@^6.5.1":
version "6.6.0"
resolved "https://registry.npmmirror.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.6.0.tgz#0e984f0f2344ee513c185d87d77defac4c0c8224"
integrity sha512-60G28ke/sXdtS9KZCpZSHHkCbdsOGEhIUGlwq6yhY74UpTiToIh8np7A8yphhM4BWsvNFtIvLpi4co+h9Mr9Ow==

ansi-colors@^4.1.1:
version "4.1.3"
resolved "https://registry.npmmirror.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b"
integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==

bootstrap-datepicker@^1.9.0:
version "1.10.0"
resolved "https://registry.npmmirror.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.0.tgz#61612bbe8bf0a69a5bce32bbcdda93ebb6ccf24a"
integrity sha512-lWxtSYddAQOpbAO8UhYhHLcK6425eWoSjb5JDvZU3ePHEPF6A3eUr51WKaFy4PccU19JRxUG6wEU3KdhtKfvpg==
dependencies:
jquery ">=3.4.0 <4.0.0"

bootstrap-daterangepicker@^3.1.0:
version "3.1.0"
resolved "https://registry.npmmirror.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8"
integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g==
dependencies:
jquery ">=1.10"
moment "^2.9.0"

bootstrap@^5.1.3:
version "5.3.3"
resolved "https://registry.npmmirror.com/bootstrap/-/bootstrap-5.3.3.tgz#de35e1a765c897ac940021900fcbb831602bac38"
integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==

datatables.net-bs5@^1.11.4:
version "1.13.11"
resolved "https://registry.npmmirror.com/datatables.net-bs5/-/datatables.net-bs5-1.13.11.tgz#c7c23aaf37e9fdd1274e172845ad29c9c9d78bb8"
integrity sha512-NQO15TjXo4xvZ0jReC4Uf86ezbQzPQPdaN2YncrCPhzQ6fx+2WD7DUq4ur0HbAcYHo94/M+MtD5Ch29To7Rj3Q==
dependencies:
datatables.net "1.13.11"
jquery "1.8 - 4"

datatables.net@1.13.11, datatables.net@^1.11.4:
version "1.13.11"
resolved "https://registry.npmmirror.com/datatables.net/-/datatables.net-1.13.11.tgz#e2a4c8b50553512f241ebfcbc078d74d551183b2"
integrity sha512-AE6RkMXziRaqzPcu/pl3SJXeRa6fmXQG/fVjuRESujvkzqDCYEeKTTpPMuVJSGYJpPi32WGSphVNNY1G4nSN/g==
dependencies:
jquery "1.8 - 4"

jquery-form@^4.3.0:
version "4.3.0"
resolved "https://registry.npmmirror.com/jquery-form/-/jquery-form-4.3.0.tgz#7d3961c314a1f2d15298f4af1d3943f54f4149c6"
integrity sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==
dependencies:
jquery ">=1.7.2"

jquery-mousewheel@>=3.0.6:
version "3.1.13"
resolved "https://registry.npmmirror.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5"
integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg==

jquery-validation-unobtrusive@^3.2.12:
version "3.2.12"
resolved "https://registry.npmmirror.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.2.12.tgz#1d52841f653e516525c251e494b042e664dad8af"
integrity sha512-kPixGhVcuat7vZXngGFfSIksy4VlzZcHyRgnBIZdsfVneCU+D5sITC8T8dD/9c9K/Q+qkMlgp7ufJHz93nKSuQ==
dependencies:
jquery "^3.5.1"
jquery-validation ">=1.16"

jquery-validation@>=1.16, jquery-validation@^1.19.3:
version "1.21.0"
resolved "https://registry.npmmirror.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93"
integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w==

"jquery@1.8 - 4", jquery@>=1.10, jquery@>=1.12.0, "jquery@>=1.5.0 <4.0", jquery@>=1.7.2, "jquery@>=3.4.0 <4.0.0", jquery@^3.5.1:
version "3.7.1"
resolved "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==

jquery@~3.6.0:
version "3.6.4"
resolved "https://registry.npmmirror.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f"
integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ==

just-compare@^2.3.0:
version "2.3.0"
resolved "https://registry.npmmirror.com/just-compare/-/just-compare-2.3.0.tgz#a2adcc1d1940536263275f5a1ef1298bcacfeda7"
integrity sha512-6shoR7HDT+fzfL3gBahx1jZG3hWLrhPAf+l7nCwahDdT9XDtosB9kIF0ZrzUp5QY8dJWfQVr5rnsPqsbvflDzg==

lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==

luxon@^2.3.0:
version "2.5.2"
resolved "https://registry.npmmirror.com/luxon/-/luxon-2.5.2.tgz#17ed497f0277e72d58a4756d6a9abee4681457b6"
integrity sha512-Yg7/RDp4nedqmLgyH0LwgGRvMEKVzKbUdkBYyCosbHgJ+kaOUx0qzSiSatVc3DFygnirTPYnMM2P5dg2uH1WvA==

malihu-custom-scrollbar-plugin@^3.1.5:
version "3.1.5"
resolved "https://registry.npmmirror.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef"
integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ==
dependencies:
jquery-mousewheel ">=3.0.6"

moment@^2.9.0:
version "2.30.1"
resolved "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==

select2@^4.0.13:
version "4.0.13"
resolved "https://registry.npmmirror.com/select2/-/select2-4.0.13.tgz#0dbe377df3f96167c4c1626033e924372d8ef44d"
integrity sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw==

sweetalert2@^11.3.6:
version "11.12.3"
resolved "https://registry.npmmirror.com/sweetalert2/-/sweetalert2-11.12.3.tgz#ce272d8c8d0754090a77465b89769d45430e6199"
integrity sha512-tgGJSgfSV/xK113JEvhjwqKAuBYLXsZf0z+tGlHKQNnsLMi4eSNuzn9tt5hUdvjOVTLSPDgo0Lc+tnjy9Uj7Og==

timeago@^1.6.7:
version "1.6.7"
resolved "https://registry.npmmirror.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5"
integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ==
dependencies:
jquery ">=1.5.0 <4.0"

toastr@^2.1.4:
version "2.1.4"
resolved "https://registry.npmmirror.com/toastr/-/toastr-2.1.4.tgz#8b43be64fb9d0c414871446f2db8e8ca4e95f181"
integrity sha512-LIy77F5n+sz4tefMmFOntcJ6HL0Fv3k1TDnNmFZ0bU/GcvIIfy6eG2v7zQmMiYgaalAiUv75ttFrPn5s0gyqlA==
dependencies:
jquery ">=1.12.0"

+ 37
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/Acme.BookStore.Blazor.Client.csproj ファイルの表示

@@ -0,0 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.5.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.5.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme" Version="3.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="8.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Blazor.WebAssembly" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Blazor.WebAssembly" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Blazor.WebAssembly" Version="8.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj" />
</ItemGroup>


</Project>

+ 11
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreBlazorAutoMapperProfile.cs ファイルの表示

@@ -0,0 +1,11 @@
using AutoMapper;

namespace Acme.BookStore.Blazor.Client;

public class BookStoreBlazorAutoMapperProfile : Profile
{
public BookStoreBlazorAutoMapperProfile()
{
//Define your AutoMapper configuration here for the Blazor project.
}
}

+ 99
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreBlazorClientModule.cs ファイルの表示

@@ -0,0 +1,99 @@
using System;
using System.Net.Http;
using Blazorise.Bootstrap5;
using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Acme.BookStore.Blazor.Client.Menus;
using OpenIddict.Abstractions;
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme;
using Volo.Abp.Autofac.WebAssembly;
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity.Blazor.WebAssembly;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.WebAssembly;
using Volo.Abp.TenantManagement.Blazor.WebAssembly;
using Volo.Abp.UI.Navigation;

namespace Acme.BookStore.Blazor.Client;

[DependsOn(
typeof(AbpAutofacWebAssemblyModule),
typeof(BookStoreHttpApiClientModule),
typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeModule),
typeof(AbpIdentityBlazorWebAssemblyModule),
typeof(AbpTenantManagementBlazorWebAssemblyModule),
typeof(AbpSettingManagementBlazorWebAssemblyModule)
)]
public class BookStoreBlazorClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>();
var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>();

ConfigureAuthentication(builder);
ConfigureHttpClient(context, environment);
ConfigureBlazorise(context);
ConfigureRouter(context);
ConfigureMenu(context);
ConfigureAutoMapper(context);
}

private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(BookStoreBlazorClientModule).Assembly;
});
}

private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new BookStoreMenuContributor(context.Services.GetConfiguration()));
});
}

private void ConfigureBlazorise(ServiceConfigurationContext context)
{
context.Services
.AddBootstrap5Providers()
.AddFontAwesomeIcons();
}

private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
{
builder.Services.AddOidcAuthentication(options =>
{
builder.Configuration.Bind("AuthServer", options.ProviderOptions);
options.UserOptions.NameClaim = OpenIddictConstants.Claims.Name;
options.UserOptions.RoleClaim = OpenIddictConstants.Claims.Role;

options.ProviderOptions.DefaultScopes.Add("BookStore");
options.ProviderOptions.DefaultScopes.Add("roles");
options.ProviderOptions.DefaultScopes.Add("email");
options.ProviderOptions.DefaultScopes.Add("phone");
});
}

private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
{
context.Services.AddTransient(sp => new HttpClient
{
BaseAddress = new Uri(environment.BaseAddress)
});
}

private void ConfigureAutoMapper(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreBlazorClientModule>();
});
}
}

+ 10
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreBrandingProvider.cs ファイルの表示

@@ -0,0 +1,10 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Ui.Branding;

namespace Acme.BookStore.Blazor.Client;

[Dependency(ReplaceServices = true)]
public class BookStoreBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "BookStore";
}

+ 19
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreBundleContributor.cs ファイルの表示

@@ -0,0 +1,19 @@
using Volo.Abp.Bundling;

namespace Acme.BookStore.Blazor.Client;

/* Add your global styles/scripts here.
* See https://docs.abp.io/en/abp/latest/UI/Blazor/Global-Scripts-Styles to learn how to use it
*/
public class BookStoreBundleContributor : IBundleContributor
{
public void AddScripts(BundleContext context)
{

}

public void AddStyles(BundleContext context)
{
context.Add("main.css", true);
}
}

+ 12
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/BookStoreComponentBase.cs ファイルの表示

@@ -0,0 +1,12 @@
using Acme.BookStore.Localization;
using Volo.Abp.AspNetCore.Components;

namespace Acme.BookStore.Blazor.Client;

public abstract class BookStoreComponentBase : AbpComponentBase
{
protected BookStoreComponentBase()
{
LocalizationResource = typeof(BookStoreResource);
}
}

+ 83
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/Menus/BookStoreMenuContributor.cs ファイルの表示

@@ -0,0 +1,83 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Acme.BookStore.Localization;
using Acme.BookStore.MultiTenancy;
using Volo.Abp.Account.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Identity.Blazor;
using Volo.Abp.SettingManagement.Blazor.Menus;
using Volo.Abp.TenantManagement.Blazor.Navigation;
using Volo.Abp.UI.Navigation;

namespace Acme.BookStore.Blazor.Client.Menus;

public class BookStoreMenuContributor : IMenuContributor
{
private readonly IConfiguration _configuration;

public BookStoreMenuContributor(IConfiguration configuration)
{
_configuration = configuration;
}

public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
else if (context.Menu.Name == StandardMenus.User)
{
await ConfigureUserMenuAsync(context);
}
}

private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var l = context.GetLocalizer<BookStoreResource>();

context.Menu.Items.Insert(
0,
new ApplicationMenuItem(
BookStoreMenus.Home,
l["Menu:Home"],
"/",
icon: "fas fa-home"
)
);

var administration = context.Menu.GetAdministration();

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;
}

private Task ConfigureUserMenuAsync(MenuConfigurationContext context)
{
var accountStringLocalizer = context.GetLocalizer<AccountResource>();

var authServerUrl = _configuration["AuthServer:Authority"] ?? "";

context.Menu.AddItem(new ApplicationMenuItem(
"Account.Manage",
accountStringLocalizer["MyAccount"],
$"{authServerUrl.EnsureEndsWith('/')}Account/Manage",
icon: "fa fa-cog",
order: 1000,
target: "_blank").RequireAuthenticated());

return Task.CompletedTask;
}
}

+ 10
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/Menus/BookStoreMenus.cs ファイルの表示

@@ -0,0 +1,10 @@
namespace Acme.BookStore.Blazor.Client.Menus;

public class BookStoreMenus
{
private const string Prefix = "BookStore";
public const string Home = Prefix + ".Home";

//Add your menu items here...

}

+ 180
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/Pages/Index.razor ファイルの表示

@@ -0,0 +1,180 @@
@page "/"
@using Volo.Abp.MultiTenancy
@inherits BookStoreComponentBase
@inject AuthenticationStateProvider AuthenticationStateProvider

<div class="container">
<div class="p-5 text-center">
<Badge Color="Color.Success" class="mb-4">
<h5 class="m-1"> <i class="fas fa-rocket"></i> Congratulations, <strong>BookStore</strong> is successfully running!</h5>
</Badge>

<h1>Welcome to the Application</h1>

<p class="lead px-lg-5 mx-lg-5">@L["LongWelcomeMessage"]</p>

@if ( !CurrentUser.IsAuthenticated )
{
<a class="btn btn-primary" href="/authentication/login">
<i class="fa fa-sign-in-alt"></i> @L["Login"]
</a>
}
</div>

<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-auto text-center">
<img src="https://abp.io/assets/png/mastering-abp-framework.webp" style="max-width: 400px;" class="w-100 mb-5 my-md-3">
</div>
<div class="col-md d-flex align-items-center">
<div class="pe-0 pe-md-4">
<small class="text-uppercase text-muted">THE OFFICIAL GUIDE</small>
<h2 class="mb-4">Mastering ABP Framework</h2>
<p class="mb-4">Written by the creator of the ABP Framework, this book will help you gain a complete understanding of the framework and modern web application development techniques.</p>
<div class="mb-4">
<a href="https://www.amazon.com/gp/product/B097Z2DM8Q/ref=dbs_a_def_rwt_hsch_vapi_tkin_p1_i0" class="btn btn-success mb-1">
Buy on Amazon US
</a>
<a href="https://www.packtpub.com/product/mastering-abp-framework/9781801079242" class="btn btn-primary mb-1">
Buy on PACKT
</a>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="my-3 text-center">
<h3>Let's improve your application!</h3>
<p>Here are some links to help you get started:</p>
</div>

<div class="card mt-4 mb-5">
<div class="card-body">
<div class="row text-center justify-content-md-center">
<div class="col-lg-4">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-book text-secondary d-block my-3 fa-2x"></i> Learn the ABP Framework</h5>
<p>Explore the compherensive documentation to learn how to build a modern web application.</p>
<a href="https://docs.abp.io/en/abp/latest?ref=tmpl" target="_blank" class="btn btn-link px-1">See Documents <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-cubes text-secondary d-block my-3 fa-2x"></i> Samples</h5>
<p>See the example projects built with the ABP Framework.</p>
<a href="https://docs.abp.io/en/abp/latest/Samples/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">All samples <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-users text-secondary d-block my-3 fa-2x"></i> ABP Community</h5>
<p>Get involved with a vibrant community and become a contributor.</p>
<a href="https://community.abp.io/" target="_blank" class="btn btn-link px-1">Community <i class="fas fa-chevron-right"></i></a>
<a href="https://docs.abp.io/en/abp/latest/Contribution/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">Contribute <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
<div class="row text-center mt-lg-3 justify-content-md-center">
<div class="col-lg-4">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-pen-nib text-secondary d-block my-3 fa-2x"></i> ABP Blog</h5>
<p>Take a look at our recently published articles.</p>
<a href="https://blog.abp.io/abp?ref=tmpl" target="_blank" class="btn btn-link px-1">See Blog <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fab fa-github text-secondary d-block my-3 fa-2x"></i> Github</h5>
<p>Do you love the ABP Framework? Please <strong>give a star</strong> to support it!</p>

<a href="https://github.com/abpframework/abp/" target="_blank" class="btn btn-link px-1">See Open Source Framework <i class="fas fa-chevron-right"></i></a>

</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fab fa-stack-overflow text-secondary d-block my-3 fa-2x"></i> Stackoverflow</h5>
<p>See answers to previously asked questions or ask a new one.</p>
<a href="https://stackoverflow.com/questions/tagged/abp" target="_blank" class="btn btn-link px-1">Questions <i class="fas fa-chevron-right"></i></a>
<a href="https://stackoverflow.com/questions/ask" target="_blank" class="btn btn-link px-1">Ask a Question <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
</div>
</div>

<div class="mt-5 my-3 text-center">
<h3>Meet the ABP Commercial</h3>
<p>A Complete Web Application Platform Built on the ABP Framework</p>
</div>

<div class="card mt-4 mb-5">
<div class="card-body">
<p class="px-lg-5 mx-lg-5 py-3 text-center">
<a href="https://commercial.abp.io/" target="_blank">ABP Commercial</a> is a platform based on the open source ABP framework. It provides pre-built application modules,
rapid application development tooling, professional UI themes, premium support and more.
</p>

<div class="row text-center justify-content-md-center">
<div class="col-lg-2">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Startup Templates
<a href="https://commercial.abp.io/startup-templates?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Application Modules
<a href="https://commercial.abp.io/modules?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Developer<br />Tools
<a href="https://commercial.abp.io/tools?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> UI<br /> Themes
<a href="https://commercial.abp.io/themes?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Premium Support
<a href="https://support.abp.io/QA/Questions?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Additional Services
<a href="https://commercial.abp.io/additional-services?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
</div>
</div>
</div>
<div class="mb-5 text-center">
<p class="align-middle">
<a href="https://twitter.com/abpframework" target="_blank" class="mx-2"><i class="fab fa-twitter"></i><span class="text-secondary"> Abp Framework</span></a>
<a href="https://twitter.com/abpcommercial" target="_blank" class="mx-2"><i class="fab fa-twitter"></i><span class="text-secondary"> Abp Commercial</span></a>
<a href="https://github.com/abpframework/abp" target="_blank" class="mx-2"><i class="fab fa-github"></i><span class="text-secondary"> abpframework</span></a>
</p>
</div>
</div>

+ 6
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/Pages/Index.razor.cs ファイルの表示

@@ -0,0 +1,6 @@
namespace Acme.BookStore.Blazor.Client.Pages;

public partial class Index
{

}

+ 1
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/Pages/Index.razor.css ファイルの表示

@@ -0,0 +1 @@
/* Write here your styles for the Index page */

+ 22
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/Program.cs ファイルの表示

@@ -0,0 +1,22 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

namespace Acme.BookStore.Blazor.Client;

public class Program
{
public async static Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
var application = await builder.AddApplicationAsync<BookStoreBlazorClientModule>(options =>
{
options.UseAutofac();
});

var host = builder.Build();

await application.InitializeApplicationAsync(host.Services);

await host.RunAsync();
}
}

+ 11
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/Routes.razor ファイルの表示

@@ -0,0 +1,11 @@
@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite
@using Volo.Abp.AspNetCore.Components.WebAssembly.WebApp
<Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="WebAppAdditionalAssembliesHelper.GetAssemblies<BookStoreBlazorClientModule>()">
<Found Context="routeData">
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(MainLayout)">
<NotAuthorized>
<RedirectToLogin />
</NotAuthorized>
</AuthorizeRouteView>
</Found>
</Router>

+ 15
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/_Imports.razor ファイルの表示

@@ -0,0 +1,15 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.WebAssembly.Http
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.JSInterop
@using Volo.Abp.AspNetCore.Components.Web
@using Acme.BookStore.Blazor
@using Blazorise
@using Blazorise.DataGrid
@using Volo.Abp.BlazoriseUI
@using Volo.Abp.BlazoriseUI.Components

+ 3
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/appsettings.Development.json ファイルの表示

@@ -0,0 +1,3 @@
{

}

+ 22
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/appsettings.json ファイルの表示

@@ -0,0 +1,22 @@
{
"AuthServer": {
"Authority": "https://localhost:44369",
"ClientId": "BookStore_Blazor",
"ResponseType": "code"
},
"RemoteServices": {
"Default": {
"BaseUrl": "https://localhost:44369"
}
},
"AbpCli": {
"Bundle": {
"Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */
"Name": "global",
"IsBlazorWebApp": true,
"Parameters": {

}
}
}
}

+ 2
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/appsettings.secrets.json ファイルの表示

@@ -0,0 +1,2 @@
{
}

バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/favicon.ico ファイルの表示

変更前 変更後

+ 30
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/global.css
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 37
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/global.js
ファイル差分が大きすぎるため省略します
ファイルの表示


バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/icon-192.png ファイルの表示

変更前 変更後
幅: 192  |  高さ: 192  |  サイズ: 2.6KB

バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/icon-512.png ファイルの表示

変更前 変更後
幅: 512  |  高さ: 512  |  サイズ: 6.2KB

バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/images/logo/leptonx/logo-dark-thumbnail.png ファイルの表示

変更前 変更後
幅: 417  |  高さ: 450  |  サイズ: 10KB

バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/images/logo/leptonx/logo-dark.png ファイルの表示

変更前 変更後
幅: 2198  |  高さ: 450  |  サイズ: 37KB

バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/images/logo/leptonx/logo-light-thumbnail.png ファイルの表示

変更前 変更後
幅: 417  |  高さ: 450  |  サイズ: 9.0KB

バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/images/logo/leptonx/logo-light.png ファイルの表示

変更前 変更後
幅: 2198  |  高さ: 450  |  サイズ: 32KB

+ 59
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/main.css ファイルの表示

@@ -0,0 +1,59 @@
/* Global styles for the BookStore application */

:root .lpx-brand-logo {
--lpx-logo: url('/images/logo/leptonx/logo-light.png');
--lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
}

.spinner {
width: 40px;
height: 40px;
display: block;
position: fixed;
top: calc( 50% - ( 40px / 2) );
right: calc( 50% - ( 40px / 2) );
}

.double-bounce1, .double-bounce2 {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #333;
opacity: 0.6;
position: absolute;
top: 0;
left: 0;
-webkit-animation: sk-bounce 2.0s infinite ease-in-out;
animation: sk-bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}

@-webkit-keyframes sk-bounce {
0%, 100% {
-webkit-transform: scale(0.0)
}

50% {
-webkit-transform: scale(1.0)
}
}

@keyframes sk-bounce {
0%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
}

50% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
}

#ApplicationContainer > div:first-child:not(:only-child) {
display: none !important;
}

+ 21
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/manifest.json ファイルの表示

@@ -0,0 +1,21 @@
{
"name": "BookStore",
"short_name": "Acme.BookStore",
"start_url": "./",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#03173d",
"prefer_related_applications": false,
"icons": [
{
"src": "icon-512.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "icon-192.png",
"type": "image/png",
"sizes": "192x192"
}
]
}

+ 4
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/service-worker.js ファイルの表示

@@ -0,0 +1,4 @@
// In development, always fetch from the network and do not enable offline support.
// This is because caching would make development more difficult (changes would not
// be reflected on the first load after each change).
self.addEventListener('fetch', () => { });

+ 48
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.Client/wwwroot/service-worker.published.js ファイルの表示

@@ -0,0 +1,48 @@
// Caution! Be sure you understand the caveats before publishing an application with
// offline support. See https://aka.ms/blazor-offline-considerations

self.importScripts('./service-worker-assets.js');
self.addEventListener('install', event => event.waitUntil(onInstall(event)));
self.addEventListener('activate', event => event.waitUntil(onActivate(event)));
self.addEventListener('fetch', event => event.respondWith(onFetch(event)));

const cacheNamePrefix = 'offline-cache-';
const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`;
const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ];
const offlineAssetsExclude = [ /^service-worker\.js$/ ];

async function onInstall(event) {
console.info('Service worker: Install');

// Fetch and cache all matching items from the assets manifest
const assetsRequests = self.assetsManifest.assets
.filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url)))
.filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url)))
.map(asset => new Request(asset.url, { integrity: asset.hash, cache: 'no-cache' }));
await caches.open(cacheName).then(cache => cache.addAll(assetsRequests));
}

async function onActivate(event) {
console.info('Service worker: Activate');

// Delete unused caches
const cacheKeys = await caches.keys();
await Promise.all(cacheKeys
.filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName)
.map(key => caches.delete(key)));
}

async function onFetch(event) {
let cachedResponse = null;
if (event.request.method === 'GET') {
// For all navigation requests, try to serve index.html from cache
// If you need some URLs to be server-rendered, edit the following check to exclude those URLs
const shouldServeIndexHtml = event.request.mode === 'navigate';

const request = shouldServeIndexHtml ? 'index.html' : event.request;
const cache = await caches.open(cacheName);
cachedResponse = await cache.match(request);
}

return cachedResponse || fetch(event.request);
}

+ 38
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Acme.BookStore.Blazor.WebApp.Client.csproj ファイルの表示

@@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
<RootNamespace>Acme.BookStore.Blazor.WebApp.Client</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.5.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.5.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme" Version="3.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="8.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Blazor.WebAssembly" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Blazor.WebAssembly" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Blazor.WebAssembly" Version="8.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj" />
</ItemGroup>


</Project>

+ 11
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreBlazorAutoMapperProfile.cs ファイルの表示

@@ -0,0 +1,11 @@
using AutoMapper;

namespace Acme.BookStore.Blazor.WebApp.Client;

public class BookStoreBlazorAutoMapperProfile : Profile
{
public BookStoreBlazorAutoMapperProfile()
{
//Define your AutoMapper configuration here for the Blazor project.
}
}

+ 100
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreBlazorClientModule.cs ファイルの表示

@@ -0,0 +1,100 @@
using System;
using System.Net.Http;
using Blazorise.Bootstrap5;
using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Acme.BookStore.Blazor.WebApp.Client.Menus;
using Volo.Abp.AspNetCore.Components.Web;
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme;
using Volo.Abp.Autofac.WebAssembly;
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity.Blazor.WebAssembly;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.WebAssembly;
using Volo.Abp.TenantManagement.Blazor.WebAssembly;
using Volo.Abp.UI.Navigation;

namespace Acme.BookStore.Blazor.WebApp.Client;

[DependsOn(
typeof(AbpAutofacWebAssemblyModule),
typeof(BookStoreHttpApiClientModule),
typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeModule),
typeof(AbpIdentityBlazorWebAssemblyModule),
typeof(AbpTenantManagementBlazorWebAssemblyModule),
typeof(AbpSettingManagementBlazorWebAssemblyModule)
)]
public class BookStoreBlazorClientModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAspNetCoreComponentsWebOptions>(options =>
{
options.IsBlazorWebApp = true;
});
}

public override void ConfigureServices(ServiceConfigurationContext context)
{
var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>();
var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>();

ConfigureAuthentication(builder);
ConfigureHttpClient(context, environment);
ConfigureBlazorise(context);
ConfigureRouter(context);
ConfigureMenu(context);
ConfigureAutoMapper(context);
}

private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(BookStoreBlazorClientModule).Assembly;
options.AdditionalAssemblies.Add(typeof(BookStoreBlazorClientModule).Assembly);
});
}

private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new BookStoreMenuContributor(context.Services.GetConfiguration()));
});
}

private void ConfigureBlazorise(ServiceConfigurationContext context)
{
context.Services
.AddBootstrap5Providers()
.AddFontAwesomeIcons();
}

private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
{
//TODO: Remove SignOutSessionStateManager in new version.
builder.Services.TryAddScoped<SignOutSessionStateManager>();
builder.Services.AddBlazorWebAppServices();
}

private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
{
context.Services.AddTransient(sp => new HttpClient
{
BaseAddress = new Uri(environment.BaseAddress)
});
}

private void ConfigureAutoMapper(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreBlazorClientModule>();
});
}
}

+ 10
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreBrandingProvider.cs ファイルの表示

@@ -0,0 +1,10 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Ui.Branding;

namespace Acme.BookStore.Blazor.WebApp.Client;

[Dependency(ReplaceServices = true)]
public class BookStoreBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "BookStore";
}

+ 19
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreBundleContributor.cs ファイルの表示

@@ -0,0 +1,19 @@
using Volo.Abp.Bundling;

namespace Acme.BookStore.Blazor.WebApp.Client;

/* Add your global styles/scripts here.
* See https://docs.abp.io/en/abp/latest/UI/Blazor/Global-Scripts-Styles to learn how to use it
*/
public class BookStoreBundleContributor : IBundleContributor
{
public void AddScripts(BundleContext context)
{

}

public void AddStyles(BundleContext context)
{
context.Add("main.css", true);
}
}

+ 12
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/BookStoreComponentBase.cs ファイルの表示

@@ -0,0 +1,12 @@
using Acme.BookStore.Localization;
using Volo.Abp.AspNetCore.Components;

namespace Acme.BookStore.Blazor.WebApp.Client;

public abstract class BookStoreComponentBase : AbpComponentBase
{
protected BookStoreComponentBase()
{
LocalizationResource = typeof(BookStoreResource);
}
}

+ 88
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Menus/BookStoreMenuContributor.cs ファイルの表示

@@ -0,0 +1,88 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Acme.BookStore.Localization;
using Acme.BookStore.MultiTenancy;
using Volo.Abp.Account.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Identity.Blazor;
using Volo.Abp.SettingManagement.Blazor.Menus;
using Volo.Abp.TenantManagement.Blazor.Navigation;
using Volo.Abp.UI.Navigation;

namespace Acme.BookStore.Blazor.WebApp.Client.Menus;

public class BookStoreMenuContributor : IMenuContributor
{
private readonly IConfiguration _configuration;

public BookStoreMenuContributor(IConfiguration configuration)
{
_configuration = configuration;
}

public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
else if (context.Menu.Name == StandardMenus.User)
{
await ConfigureUserMenuAsync(context);
}
}

private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var l = context.GetLocalizer<BookStoreResource>();

context.Menu.Items.Insert(
0,
new ApplicationMenuItem(
BookStoreMenus.Home,
l["Menu:Home"],
"/",
icon: "fas fa-home"
)
);

var administration = context.Menu.GetAdministration();

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;
}

private Task ConfigureUserMenuAsync(MenuConfigurationContext context)
{
if (!OperatingSystem.IsBrowser())
{
return Task.CompletedTask;
}

var authServerUrl = _configuration["AuthServer:Authority"] ?? "";
var accountStringLocalizer = context.GetLocalizer<AccountResource>();

context.Menu.AddItem(new ApplicationMenuItem(
"Account.Manage",
accountStringLocalizer["MyAccount"],
$"{authServerUrl.EnsureEndsWith('/')}Account/Manage",
icon: "fa fa-cog",
order: 1000,
target: "_blank")
.RequireAuthenticated());

return Task.CompletedTask;
}
}

+ 10
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Menus/BookStoreMenus.cs ファイルの表示

@@ -0,0 +1,10 @@
namespace Acme.BookStore.Blazor.WebApp.Client.Menus;

public class BookStoreMenus
{
private const string Prefix = "BookStore";
public const string Home = Prefix + ".Home";

//Add your menu items here...

}

+ 176
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Pages/Index.razor ファイルの表示

@@ -0,0 +1,176 @@
@page "/"
@inherits BookStoreComponentBase
@inject AuthenticationStateProvider AuthenticationStateProvider
<div class="container">
<div class="p-5 text-center">
<Badge Color="Color.Success" class="mb-4">
<h5 class="m-1"> <i class="fas fa-rocket"></i> Congratulations, <strong>BookStore</strong> is successfully running!</h5>
</Badge>

<h1>Welcome to the Application</h1>

<p class="lead px-lg-5 mx-lg-5">@L["LongWelcomeMessage"]</p>

@if (!CurrentUser.IsAuthenticated)
{
<a class="btn btn-primary" href="Account/Login"><i class="fa fa-sign-in"></i> @L["Login"]</a>
}
</div>

<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-auto text-center">
<img src="https://abp.io/assets/png/mastering-abp-framework.webp" style="max-width: 400px;" class="w-100 mb-5 my-md-3">
</div>
<div class="col-md d-flex align-items-center">
<div class="pe-0 pe-md-4">
<small class="text-uppercase text-muted">THE OFFICIAL GUIDE</small>
<h2 class="mb-4">Mastering ABP Framework</h2>
<p class="mb-4">Written by the creator of the ABP Framework, this book will help you gain a complete understanding of the framework and modern web application development techniques.</p>
<div class="mb-4">
<a href="https://www.amazon.com/gp/product/B097Z2DM8Q/ref=dbs_a_def_rwt_hsch_vapi_tkin_p1_i0" class="btn btn-success mb-1">
Buy on Amazon US
</a>
<a href="https://www.packtpub.com/product/mastering-abp-framework/9781801079242" class="btn btn-primary mb-1">
Buy on PACKT
</a>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="my-3 text-center">
<h3>Let's improve your application!</h3>
<p>Here are some links to help you get started:</p>
</div>

<div class="card mt-4 mb-5">
<div class="card-body">
<div class="row text-center justify-content-md-center">
<div class="col-lg-4">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-book text-secondary d-block my-3 fa-2x"></i> Learn the ABP Framework</h5>
<p>Explore the compherensive documentation to learn how to build a modern web application.</p>
<a href="https://docs.abp.io/en/abp/latest?ref=tmpl" target="_blank" class="btn btn-link px-1">See Documents <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-cubes text-secondary d-block my-3 fa-2x"></i> Samples</h5>
<p>See the example projects built with the ABP Framework.</p>
<a href="https://docs.abp.io/en/abp/latest/Samples/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">All samples <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-users text-secondary d-block my-3 fa-2x"></i> ABP Community</h5>
<p>Get involved with a vibrant community and become a contributor.</p>
<a href="https://community.abp.io/" target="_blank" class="btn btn-link px-1">Community <i class="fas fa-chevron-right"></i></a>
<a href="https://docs.abp.io/en/abp/latest/Contribution/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">Contribute <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
<div class="row text-center mt-lg-3 justify-content-md-center">
<div class="col-lg-4">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-pen-nib text-secondary d-block my-3 fa-2x"></i> ABP Blog</h5>
<p>Take a look at our recently published articles.</p>
<a href="https://blog.abp.io/abp?ref=tmpl" target="_blank" class="btn btn-link px-1">See Blog <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fab fa-github text-secondary d-block my-3 fa-2x"></i> Github</h5>
<p>Do you love the ABP Framework? Please <strong>give a star</strong> to support it!</p>

<a href="https://github.com/abpframework/abp/" target="_blank" class="btn btn-link px-1">See Open Source Framework <i class="fas fa-chevron-right"></i></a>

</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fab fa-stack-overflow text-secondary d-block my-3 fa-2x"></i> Stackoverflow</h5>
<p>See answers to previously asked questions or ask a new one.</p>
<a href="https://stackoverflow.com/questions/tagged/abp" target="_blank" class="btn btn-link px-1">Questions <i class="fas fa-chevron-right"></i></a>
<a href="https://stackoverflow.com/questions/ask" target="_blank" class="btn btn-link px-1">Ask a Question <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
</div>
</div>

<div class="mt-5 my-3 text-center">
<h3>Meet the ABP Commercial</h3>
<p>A Complete Web Application Platform Built on the ABP Framework</p>
</div>

<div class="card mt-4 mb-5">
<div class="card-body">
<p class="px-lg-5 mx-lg-5 py-3 text-center">
<a href="https://commercial.abp.io/" target="_blank">ABP Commercial</a> is a platform based on the open source ABP framework. It provides pre-built application modules,
rapid application development tooling, professional UI themes, premium support and more.
</p>

<div class="row text-center justify-content-md-center">
<div class="col-lg-2">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Startup Templates
<a href="https://commercial.abp.io/startup-templates?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Application Modules
<a href="https://commercial.abp.io/modules?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Developer<br />Tools
<a href="https://commercial.abp.io/tools?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> UI<br /> Themes
<a href="https://commercial.abp.io/themes?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Premium Support
<a href="https://support.abp.io/QA/Questions?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Additional Services
<a href="https://commercial.abp.io/additional-services?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
</div>
</div>
</div>
<div class="mb-5 text-center">
<p class="align-middle">
<a href="https://twitter.com/abpframework" target="_blank" class="mx-2"><i class="fab fa-twitter"></i><span class="text-secondary"> Abp Framework</span></a>
<a href="https://twitter.com/abpcommercial" target="_blank" class="mx-2"><i class="fab fa-twitter"></i><span class="text-secondary"> Abp Commercial</span></a>
<a href="https://github.com/abpframework/abp" target="_blank" class="mx-2"><i class="fab fa-github"></i><span class="text-secondary"> abpframework</span></a>
</p>
</div>
</div>

+ 6
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Pages/Index.razor.cs ファイルの表示

@@ -0,0 +1,6 @@
namespace Acme.BookStore.Blazor.WebApp.Client.Pages;

public partial class Index
{

}

+ 1
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Pages/Index.razor.css ファイルの表示

@@ -0,0 +1 @@
/* Write here your styles for the Index page */

+ 22
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Program.cs ファイルの表示

@@ -0,0 +1,22 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

namespace Acme.BookStore.Blazor.WebApp.Client;

public class Program
{
public async static Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
var application = await builder.AddApplicationAsync<BookStoreBlazorClientModule>(options =>
{
options.UseAutofac();
});

var host = builder.Build();

await application.InitializeApplicationAsync(host.Services);

await host.RunAsync();
}
}

+ 13
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/Routes.razor ファイルの表示

@@ -0,0 +1,13 @@
@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite
@using Volo.Abp.AspNetCore.Components.Web.Theming.Routing
@using Microsoft.Extensions.Options
@inject IOptions<AbpRouterOptions> RouterOptions
<Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="RouterOptions.Value.AdditionalAssemblies">
<Found Context="routeData">
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(MainLayout)">
<NotAuthorized>
<RedirectToLogin />
</NotAuthorized>
</AuthorizeRouteView>
</Found>
</Router>

+ 14
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/_Imports.razor ファイルの表示

@@ -0,0 +1,14 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.WebAssembly.Http
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.JSInterop
@using Volo.Abp.AspNetCore.Components.Web
@using Blazorise
@using Blazorise.DataGrid
@using Volo.Abp.BlazoriseUI
@using Volo.Abp.BlazoriseUI.Components

+ 3
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/appsettings.Development.json ファイルの表示

@@ -0,0 +1,3 @@
{

}

+ 18
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/appsettings.json ファイルの表示

@@ -0,0 +1,18 @@
{
"RemoteServices": {
"Default": {
"BaseUrl": "https://localhost:44349"
}
},
"AbpCli": {
"Bundle": {
"Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */
"Name": "global",
"IsBlazorWebApp": true,
"InteractiveAuto": true,
"Parameters": {

}
}
}
}

+ 2
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/appsettings.secrets.json ファイルの表示

@@ -0,0 +1,2 @@
{
}

+ 17
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/global.css
ファイル差分が大きすぎるため省略します
ファイルの表示


+ 37
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/global.js
ファイル差分が大きすぎるため省略します
ファイルの表示


バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/icon-192.png ファイルの表示

変更前 変更後
幅: 192  |  高さ: 192  |  サイズ: 2.6KB

バイナリ
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/icon-512.png ファイルの表示

変更前 変更後
幅: 512  |  高さ: 512  |  サイズ: 6.2KB

+ 55
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/main.css ファイルの表示

@@ -0,0 +1,55 @@
/* Global styles for the BookStore application */

:root .lpx-brand-logo {
--lpx-logo: url('/images/logo/leptonx/logo-light.png');
--lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
}

.spinner {
width: 40px;
height: 40px;
display: block;
position: fixed;
top: calc( 50% - ( 40px / 2) );
right: calc( 50% - ( 40px / 2) );
}

.double-bounce1, .double-bounce2 {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #333;
opacity: 0.6;
position: absolute;
top: 0;
left: 0;
-webkit-animation: sk-bounce 2.0s infinite ease-in-out;
animation: sk-bounce 2.0s infinite ease-in-out;
}

.double-bounce2 {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}

@-webkit-keyframes sk-bounce {
0%, 100% {
-webkit-transform: scale(0.0)
}

50% {
-webkit-transform: scale(1.0)
}
}

@keyframes sk-bounce {
0%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
}

50% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
}

+ 21
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/manifest.json ファイルの表示

@@ -0,0 +1,21 @@
{
"name": "BookStore",
"short_name": "Acme.BookStore",
"start_url": "./",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#03173d",
"prefer_related_applications": false,
"icons": [
{
"src": "icon-512.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "icon-192.png",
"type": "image/png",
"sizes": "192x192"
}
]
}

+ 4
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/service-worker.js ファイルの表示

@@ -0,0 +1,4 @@
// In development, always fetch from the network and do not enable offline support.
// This is because caching would make development more difficult (changes would not
// be reflected on the first load after each change).
self.addEventListener('fetch', () => { });

+ 48
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Client/wwwroot/service-worker.published.js ファイルの表示

@@ -0,0 +1,48 @@
// Caution! Be sure you understand the caveats before publishing an application with
// offline support. See https://aka.ms/blazor-offline-considerations

self.importScripts('./service-worker-assets.js');
self.addEventListener('install', event => event.waitUntil(onInstall(event)));
self.addEventListener('activate', event => event.waitUntil(onActivate(event)));
self.addEventListener('fetch', event => event.respondWith(onFetch(event)));

const cacheNamePrefix = 'offline-cache-';
const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`;
const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ];
const offlineAssetsExclude = [ /^service-worker\.js$/ ];

async function onInstall(event) {
console.info('Service worker: Install');

// Fetch and cache all matching items from the assets manifest
const assetsRequests = self.assetsManifest.assets
.filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url)))
.filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url)))
.map(asset => new Request(asset.url, { integrity: asset.hash, cache: 'no-cache' }));
await caches.open(cacheName).then(cache => cache.addAll(assetsRequests));
}

async function onActivate(event) {
console.info('Service worker: Activate');

// Delete unused caches
const cacheKeys = await caches.keys();
await Promise.all(cacheKeys
.filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName)
.map(key => caches.delete(key)));
}

async function onFetch(event) {
let cachedResponse = null;
if (event.request.method === 'GET') {
// For all navigation requests, try to serve index.html from cache
// If you need some URLs to be server-rendered, edit the following check to exclude those URLs
const shouldServeIndexHtml = event.request.mode === 'navigate';

const request = shouldServeIndexHtml ? 'index.html' : event.request;
const cache = await caches.open(cacheName);
cachedResponse = await cache.match(request);
}

return cachedResponse || fetch(event.request);
}

+ 38
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/Acme.BookStore.Blazor.WebApp.Tiered.Client.csproj ファイルの表示

@@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<Import Project="..\..\common.props" />

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
<RootNamespace>Acme.BookStore.Blazor.WebApp.Tiered.Client</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.5.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.5.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme" Version="3.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="8.2.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Blazor.WebAssembly" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Blazor.WebAssembly" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Blazor.WebAssembly" Version="8.2.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj" />
</ItemGroup>


</Project>

+ 11
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreBlazorAutoMapperProfile.cs ファイルの表示

@@ -0,0 +1,11 @@
using AutoMapper;

namespace Acme.BookStore.Blazor.WebApp.Tiered.Client;

public class BookStoreBlazorAutoMapperProfile : Profile
{
public BookStoreBlazorAutoMapperProfile()
{
//Define your AutoMapper configuration here for the Blazor project.
}
}

+ 99
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreBlazorClientModule.cs ファイルの表示

@@ -0,0 +1,99 @@
using System;
using System.Net.Http;
using Blazorise.Bootstrap5;
using Blazorise.Icons.FontAwesome;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Acme.BookStore.Blazor.WebApp.Tiered.Client.Menus;
using Volo.Abp.AspNetCore.Components.Web;
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
using Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme;
using Volo.Abp.Autofac.WebAssembly;
using Volo.Abp.AutoMapper;
using Volo.Abp.Identity.Blazor.WebAssembly;
using Volo.Abp.Modularity;
using Volo.Abp.SettingManagement.Blazor.WebAssembly;
using Volo.Abp.TenantManagement.Blazor.WebAssembly;
using Volo.Abp.UI.Navigation;

namespace Acme.BookStore.Blazor.WebApp.Tiered.Client;

[DependsOn(
typeof(AbpAutofacWebAssemblyModule),
typeof(BookStoreHttpApiClientModule),
typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeModule),
typeof(AbpIdentityBlazorWebAssemblyModule),
typeof(AbpTenantManagementBlazorWebAssemblyModule),
typeof(AbpSettingManagementBlazorWebAssemblyModule)
)]
public class BookStoreBlazorClientModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAspNetCoreComponentsWebOptions>(options =>
{
options.IsBlazorWebApp = true;
});
}

public override void ConfigureServices(ServiceConfigurationContext context)
{
var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>();
var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>();

ConfigureAuthentication(builder);
ConfigureHttpClient(context, environment);
ConfigureBlazorise(context);
ConfigureRouter(context);
ConfigureMenu(context);
ConfigureAutoMapper(context);
}

private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(BookStoreBlazorClientModule).Assembly;
});
}

private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new BookStoreMenuContributor(context.Services.GetConfiguration()));
});
}

private void ConfigureBlazorise(ServiceConfigurationContext context)
{
context.Services
.AddBootstrap5Providers()
.AddFontAwesomeIcons();
}

private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
{
//TODO: Remove SignOutSessionStateManager in new version.
builder.Services.TryAddScoped<SignOutSessionStateManager>();
builder.Services.AddBlazorWebAppTieredServices();
}

private static void ConfigureHttpClient(ServiceConfigurationContext context, IWebAssemblyHostEnvironment environment)
{
context.Services.AddTransient(sp => new HttpClient
{
BaseAddress = new Uri(environment.BaseAddress)
});
}

private void ConfigureAutoMapper(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreBlazorClientModule>();
});
}
}

+ 10
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreBrandingProvider.cs ファイルの表示

@@ -0,0 +1,10 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Ui.Branding;

namespace Acme.BookStore.Blazor.WebApp.Tiered.Client;

[Dependency(ReplaceServices = true)]
public class BookStoreBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "BookStore";
}

+ 19
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreBundleContributor.cs ファイルの表示

@@ -0,0 +1,19 @@
using Volo.Abp.Bundling;

namespace Acme.BookStore.Blazor.WebApp.Tiered.Client;

/* Add your global styles/scripts here.
* See https://docs.abp.io/en/abp/latest/UI/Blazor/Global-Scripts-Styles to learn how to use it
*/
public class BookStoreBundleContributor : IBundleContributor
{
public void AddScripts(BundleContext context)
{

}

public void AddStyles(BundleContext context)
{
context.Add("main.css", true);
}
}

+ 12
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/BookStoreComponentBase.cs ファイルの表示

@@ -0,0 +1,12 @@
using Acme.BookStore.Localization;
using Volo.Abp.AspNetCore.Components;

namespace Acme.BookStore.Blazor.WebApp.Tiered.Client;

public abstract class BookStoreComponentBase : AbpComponentBase
{
protected BookStoreComponentBase()
{
LocalizationResource = typeof(BookStoreResource);
}
}

+ 88
- 0
Acme.BookStore/src/Acme.BookStore.Blazor.WebApp.Tiered.Client/Menus/BookStoreMenuContributor.cs ファイルの表示

@@ -0,0 +1,88 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Acme.BookStore.Localization;
using Acme.BookStore.MultiTenancy;
using Volo.Abp.Account.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Identity.Blazor;
using Volo.Abp.SettingManagement.Blazor.Menus;
using Volo.Abp.TenantManagement.Blazor.Navigation;
using Volo.Abp.UI.Navigation;

namespace Acme.BookStore.Blazor.WebApp.Tiered.Client.Menus;

public class BookStoreMenuContributor : IMenuContributor
{
private readonly IConfiguration _configuration;

public BookStoreMenuContributor(IConfiguration configuration)
{
_configuration = configuration;
}

public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
else if (context.Menu.Name == StandardMenus.User)
{
await ConfigureUserMenuAsync(context);
}
}

private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var l = context.GetLocalizer<BookStoreResource>();

context.Menu.Items.Insert(
0,
new ApplicationMenuItem(
BookStoreMenus.Home,
l["Menu:Home"],
"/",
icon: "fas fa-home"
)
);

var administration = context.Menu.GetAdministration();

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;
}

private Task ConfigureUserMenuAsync(MenuConfigurationContext context)
{
if (!OperatingSystem.IsBrowser())
{
return Task.CompletedTask;
}

var authServerUrl = _configuration["AuthServer:Authority"] ?? "";
var accountStringLocalizer = context.GetLocalizer<AccountResource>();

context.Menu.AddItem(new ApplicationMenuItem(
"Account.Manage",
accountStringLocalizer["MyAccount"],
$"{authServerUrl.EnsureEndsWith('/')}Account/Manage",
icon: "fa fa-cog",
order: 1000,
target: "_blank")
.RequireAuthenticated());

return Task.CompletedTask;
}
}

変更されたファイルが多すぎるため、一部のファイルは表示されません

読み込み中…
キャンセル
保存