Browse Source

Merge branch 'dev' into maliming/ResolveTenantIdOrName

pull/5849/head
maliming 6 years ago
parent
commit
23f4610e7b
  1. 3
      .gitignore
  2. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hans.json
  3. 116
      abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json
  4. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json
  5. 4
      abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json
  6. 7
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json
  7. 3
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json
  8. 149
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json
  9. 30
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json
  10. 36
      abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json
  11. 50
      docs/en/Migration-Guides/Abp-4_0.md
  12. 48
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor
  13. 38
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor.cs
  14. 11
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor
  15. 4
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/MainLayout.razor
  16. 34
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/MainLayout.razor.cs
  17. 46
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/NavMenu.razor
  18. 14
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/NavMenu.razor.cs
  19. 10
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor
  20. 38
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor.cs
  21. 16
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/wwwroot/theme.js
  22. 35
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/wwwroot/abp_theming.js
  23. 2
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj
  24. 2
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpUtilsService.cs
  25. 11
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/CookieOptions.cs
  26. 32
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/CookieService.cs
  27. 2
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IAbpUtilsService.cs
  28. 12
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ICookieService.cs
  29. 116
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/wwwroot/abp.js
  30. 32
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js
  31. 20
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs
  32. 7
      framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs
  33. 20
      framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs
  34. 37
      framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor
  35. 29
      framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs
  36. 3
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs
  37. 5
      framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationCreationOptions.cs
  38. 4
      framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hans.json
  39. 13
      framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json
  40. 6
      framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hans.json
  41. 6
      framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/zh-Hans.json
  42. 6
      framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hans.json
  43. 2
      framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj
  44. 12
      framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs
  45. 2
      framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/MongoDbFixture.cs
  46. 90
      framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Transactions/Transaction_Tests.cs
  47. 7
      framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/zh-Hans.json
  48. 7
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json
  49. 9
      modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs
  50. 6
      modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml
  51. 56
      modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs
  52. 9
      modules/account/src/Volo.Abp.Account.Web/AccountModuleToolbarContributor.cs
  53. 2
      modules/account/src/Volo.Abp.Account.Web/Modules/Account/Components/Toolbar/UserLoginLink/Default.cshtml
  54. 2
      modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj
  55. 12
      modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs
  56. 2
      modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/MongoDbFixture.cs
  57. 2
      modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj
  58. 12
      modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/AbpBackgroundJobsMongoDbTestModule.cs
  59. 2
      modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/MongoDbFixture.cs
  60. 12
      modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/MongoDB/BlobStoringDatabaseMongoDbTestModule.cs
  61. 2
      modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/MongoDB/MongoDbFixture.cs
  62. 2
      modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj
  63. 110
      modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hans.json
  64. 2
      modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj
  65. 12
      modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo/Blogging/MongoDB/BloggingMongoDBTestModule.cs
  66. 2
      modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo/Blogging/MongoDB/MongoDbFixture.cs
  67. 2
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs
  68. 22
      modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json
  69. 12
      modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/CmsKitMongoDbTestModule.cs
  70. 2
      modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/MongoDbFixture.cs
  71. 2
      modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj
  72. 24
      modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json
  73. 11
      modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json
  74. 2
      modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj
  75. 12
      modules/docs/test/Volo.Docs.MongoDB.Tests/Volo/Docs/MongoDB/DocsMongoDBTestModule.cs
  76. 2
      modules/docs/test/Volo.Docs.MongoDB.Tests/Volo/Docs/MongoDB/MongoDbFixture.cs
  77. 2
      modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj
  78. 12
      modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo/Abp/FeatureManagement/MongoDB/AbpFeatureManagementMongoDbTestModule.cs
  79. 2
      modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo/Abp/FeatureManagement/MongoDB/MongoDbFixture.cs
  80. 5
      modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json
  81. 2
      modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj
  82. 12
      modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs
  83. 2
      modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/MongoDbFixture.cs
  84. 12
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs
  85. 2
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs
  86. 9
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourcePropertyConsts.cs
  87. 7
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs
  88. 20
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs
  89. 9
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs
  90. 11
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiResourceConsts.cs
  91. 9
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopePropertyConsts.cs
  92. 7
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientClaimConsts.cs
  93. 26
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs
  94. 4
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientCorsOriginConsts.cs
  95. 4
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientGrantTypeConsts.cs
  96. 12
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs
  97. 19
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesConsts.cs
  98. 6
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs
  99. 22
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs
  100. 8
      modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs

3
.gitignore

@ -305,3 +305,6 @@ modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/Logs/
/modules/client-simulation/demo/Volo.ClientSimulation.Demo/package-lock.json
abp-build-config.json
/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/Pages/Test/
# Identity Server temp signature file
tempkey.jwk

3
abp_io/AbpIoLocalization/AbpIoLocalization/Account/Localization/Resources/zh-Hans.json

@ -8,6 +8,7 @@
"FrameworkDocumentation": "框架文档",
"OfficialBlog": "官方博客",
"CommercialHomePage": "商业版首页",
"CommercialSupportWebSite": "商业版支持网站"
"CommercialSupportWebSite": "商业版支持网站",
"CommunityWebSite": "ABP社区网站"
}
}

116
abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/zh-Hans.json

@ -3,6 +3,12 @@
"texts": {
"Permission:Organizations": "组织",
"Permission:Manage": "管理组织",
"Permission:DiscountRequests": "折扣请求",
"Permission:DiscountManage": "管理折扣请求",
"Permission:Disable": "禁用",
"Permission:Enable": "启动",
"Permission:EnableSendEmail": "启用发送邮件",
"Permission:SendEmail": "发送邮件",
"Permission:NpmPackages": "NPM包",
"Permission:NugetPackages": "Nuget包",
"Permission:Maintenance": "维护",
@ -13,8 +19,13 @@
"Permission:Edit": "编辑",
"Permission:Delete": "删除",
"Permission:Create": "创建",
"Permission:Accounting": "账单",
"Permission:Accounting:Quotation": "报价",
"Permission:Accounting:Invoice": "发票",
"Menu:Organizations": "组织",
"Menu:Accounting": "账单",
"Menu:Packages": "包",
"Menu:DiscountRequests": "折扣请求",
"NpmPackageDeletionWarningMessage": "该NPM包将会被删除. 你确定吗?",
"NugetPackageDeletionWarningMessage": "该Nuget包将会被删除. 你确定吗?",
"ModuleDeletionWarningMessage": "该模块将会被删除. 你确定吗?",
@ -24,6 +35,7 @@
"NameFilter": "名称",
"CreationTime": "创建时间",
"IsPro": "是否为专业版",
"ShowOnModuleList": "展示模块列表",
"EfCoreConfigureMethodName": "配置方法法",
"IsProFilter": "是否为专业版",
"ApplicationType": "应用程序类型",
@ -53,6 +65,7 @@
"CreateANugetPackage": "创建Nuget包",
"AddNew": "新建",
"PackageAlreadyExist{0}": "\"{0}\"已经被添加.",
"ModuleAlreadyExist{0}": "\"{0}\" 模块已经添加.",
"ClearCache": "清除缓存",
"SuccessfullyCleared": "清除成功",
"Menu:NpmPackages": "NPM包",
@ -63,6 +76,7 @@
"Organizations": "组织",
"LongName": "完整名称",
"LicenseType": "授权类型",
"MissingLicenseTypeField": "许可证类型字段是必需的!",
"LicenseStartTime": "授权开始时间",
"LicenseEndTime": "授权结束时间",
"AllowedDeveloperCount": "允许的开发人员数量",
@ -74,14 +88,112 @@
"AddDeveloper": "添加开发者",
"Create": "创建",
"UserNotFound": "用户不存在",
"{0}WillBeRemovedFromMembers": "{0} 将从成员中删除",
"{0}WillBeRemovedFromDevelopers": "{0} 将从开发者中移除, 你确定吗?",
"{0}WillBeRemovedFromOwners": "{0} 将从所有者中移除, 你确定吗?",
"Computers": "计算机",
"UniqueComputerId": "计算机唯一ID",
"LastSeenDate": "上次查看日期",
"{0}Computer{1}WillBeRemovedFromRecords": "计算机 {0} ({1}) 将从记录中删除",
"OrganizationDeletionWarningMessage": "组织将被删除",
"DeletingLastOwnerWarningMessage": "一个组织必须至少有一个所有者!因此你不能删除此所有者",
"This{0}AlreadyExistInThisOrganization": "该组织中已经存在此 {0}",
"AreYouSureYouWantToDeleteAllComputers": "您确定要删除所有计算机吗?",
"DeleteAll": "删除所有"
"DeleteAll": "删除所有",
"DoYouWantToCreateNewUser": "你想要创建一个新用户吗",
"MasterModules": "主模块",
"OrganizationName": "组织名称",
"CreationDate": "创建时间",
"LicenseStartDate": "许可开始时间",
"LicenseEndDate": "许可结束时间",
"OrganizationNamePlaceholder": "组织名称...",
"TotalQuestionCountPlaceholder": "问题总数...",
"RemainingQuestionCountPlaceholder": "剩下的问题数...",
"LicenseTypePlaceholder": "许可类型...",
"CreationDatePlaceholder": "创建时间...",
"LicenseStartDatePlaceholder": "许可开始时间...",
"LicenseEndDatePlaceholder": "许可结束时间...",
"UsernameOrEmail": "用户名或邮箱",
"UsernameOrEmailPlaceholder": "用户名或邮箱...",
"Member": "成员",
"PurchaseOrderNo": "订单编号",
"QuotationDate": "报价日期",
"CompanyName": "公司名称",
"CompanyAddress": "公司地址",
"Price": "价格",
"DiscountText": "折扣文字",
"DiscountQuantity": "折扣数量",
"DiscountPrice": "折扣价格",
"Quotation": "报价单",
"ExtraText": "额外文字",
"ExtraAmount": "额外金额",
"DownloadQuotation": "下载报价单",
"Invoice": "发票",
"TaxNumber": "税号",
"InvoiceNumber": "发票数字",
"InvoiceDate": "发票日期",
"InvoiceNote": "发票说明",
"Quantity": "数量",
"AddProduct": "添加产品",
"AddProductWarning": "你需要添加产品",
"TotalPrice": "总价",
"Generate": "生成",
"MissingQuantityField": "数量字段为必填项!",
"MissingPriceField": "价格字段为必填项!",
"CodeUsageStatus": "状态",
"Country": "国家",
"DeveloperCount": "开发者数量",
"RequestCode": "请求码",
"WebSite": "网站",
"GithubUsername": "Github用户名",
"PhoneNumber": "手机号",
"ProjectDescription": "产品描述",
"Referrer": "推荐人",
"DiscountRequests": "折扣请求",
"Copylink": "拷贝链接",
"Disable": "禁用",
"Enable": "启用",
"EnableSendEmail": "启用发送邮件",
"SendEmail": "发送邮件",
"SuccessfullyDisabled": "禁用成功",
"SuccessfullyEnabled": "启用成功",
"EmailSent": "邮件发送",
"SuccessfullySent": "发送成功",
"SuccessfullyDeleted": "删除成功",
"DiscountRequestDeletionWarningMessage": "折扣成功将被删除",
"BusinessType": "商业类型",
"TotalQuestionCount": "问题总数",
"RemainingQuestionCount": "剩余问题数",
"TotalQuestionMustBeGreaterWarningMessage": "TotalQuestionCount必须大于RemainingQuestionCount!",
"QuestionCountsMustBeGreaterThanZero": "TotalQuestionCount和RemainingQuestionCount必须为0或大于0",
"UnlimitedQuestionCount": "无限的问题计数",
"Notes": "笔记",
"Menu:Community": "社区",
"Menu:Articles": "文章",
"Wait": "等待",
"Approve": "批准",
"Reject": "拒绝",
"Details": "详情",
"Url": "Url",
"Title": "标题",
"ContentSource": "内容源",
"Status": "状态",
"ReadArticle": "阅读文章",
"ArticleHasBeenWaiting": "文章还在等待",
"ArticleHasBeenApproved": "文章已被批准",
"ArticleHasBeenRejected": "文章已被拒绝",
"Permission:Community": "社区",
"Permission:CommunityArticle": "文字",
"Link": "链接",
"Enum:ContentSource:0": "Github",
"Enum:ContentSource:1": "外部",
"Enum:Status:0": "等待中",
"Enum:Status:1": "已拒绝",
"Enum:Status:2": "已批准",
"Summary": "概要",
"AuthorName": "作者名称",
"CoverImage": "封面图片",
"RemoveCacheConfirmationMessage": "你确定要删除\"{0}\" 文章缓存?",
"SuccessfullyRemoved": "清除成功",
"RemoveCache": "删除缓存"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/en.json

@ -27,6 +27,7 @@
"Blog": "Blog",
"Commercial": "Commercial",
"MyAccount": "My account",
"SeeDocuments": "See Documents"
"SeeDocuments": "See Documents",
"Samples": "Samples"
}
}

4
abp_io/AbpIoLocalization/AbpIoLocalization/Base/Localization/Resources/zh-Hans.json

@ -26,6 +26,8 @@
"ContributionGuide": "贡献指南",
"Blog": "博客",
"Commercial": "商业版",
"SeeDocuments": "查看文档"
"MyAccount": "我的账户",
"SeeDocuments": "查看文档",
"Samples": "示例"
}
}

7
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/zh-Hans.json

@ -6,6 +6,8 @@
"Volo.AbpIo.Commercial:010003": "你不是该组织的所有者!",
"OrganizationNotFoundMessage": "找不到任何组织!",
"DeveloperCount": "开发者数量",
"QuestionCount": "剩余 / 问题总数",
"Unlimited": "无限制",
"Owners": "所有者",
"AddMember": "添加成员",
"AddOwner": "添加所有者",
@ -25,6 +27,9 @@
"Volo.AbpIo.Commercial:010004": "不能找到指定的用户! 用户必须已经注册.",
"MyOrganizations": "我的组织",
"ApiKey": "API key",
"UserNameNotFound": "没有用户名为{0}的用户"
"UserNameNotFound": "没有用户名为{0}的用户",
"SuccessfullyAddedToNewsletter": "感谢你订阅我们的新闻通讯!",
"MyProfile": "我的资料",
"EmailNotValid": "请输入有效的电子邮件地址"
}
}

3
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json

@ -84,6 +84,7 @@
"Edit": "Edit",
"ProfileImageChange": "Change the profile image",
"BlogItemErrorMessage": "Could not get the latest blog post details from ABP.",
"PlannedReleaseDate": "Planned release date"
"PlannedReleaseDate": "Planned release date",
"CommunityArticleRequestErrorMessage": "Could not get the latest article request from Github."
}
}

149
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json

@ -1,64 +1,89 @@
{
"culture": "zh-Hans",
"texts": {
"Permission:CommunityArticle": "社区文章",
"Permission:Edit": "修改",
"Waiting": "等待中",
"Approved": "已批准",
"Rejected": "已拒绝",
"Wait": "等待",
"Approve": "批准",
"Reject": "拒绝",
"ReadArticle": "阅读文章",
"Status": "状态",
"ContentSource": "内容来源",
"Details": "详情",
"Url": "url",
"Title": "标题",
"CreationTime": "创建时间",
"Save": "保存",
"SameUrlAlreadyExist": "url已存在,如果你想要添加这篇文章,你需要更改url!",
"UrlIsNotValid": "Url无效.",
"UrlNotFound" : "Url未找到.",
"UrlContentNotFound": "Url内容未找到.",
"Summary": "摘要",
"MostRead": "阅读最多",
"Latest": "最新",
"ContributeAbpCommunity": "为ABP社区做贡献",
"SubmitYourArticle": "提交你的文章",
"ContributionGuide": "贡献指南",
"BugReport": "Bug报告",
"SeeAllArticles": "查看所有的文章",
"WelcomeToABPCommunity!": "欢迎来到ABP社区!",
"MyProfile": "我的资料",
"MyOrganizations": "我的组织",
"EmailNotValid": "请输入有效的电子邮箱地址.",
"FeatureRequest": "功能请求",
"CreateArticleTitleInfo": "文章标题显示在文章列表中.",
"CreateArticleUrlInfo": "文章的原始GitHub/外部URL.",
"CreateArticleSummaryInfo": "文章的简短摘要将显示在文章列表中.",
"CreateArticleCoverInfo": "为了创建有效的文章,请添加封面图. 仅支持16:9的图片!",
"ThisExtensionIsNotAllowed": "不允许此扩展名.",
"TheFileIsTooLarge": "文件过大.",
"GoToTheArticle": "转到文章",
"Contribute": "贡献",
"OverallProgress": "总体流程",
"Done": "完成",
"Open": "打开",
"Closed": "关闭",
"LatestQuestionOnThe": "有关的最新问题",
"Stackoverflow": "Stackoverflow",
"Votes": "票数",
"Answer": "回答",
"Views": "观看次数",
"Answered": "已回答",
"WaitingForYourAnswer": "等待你的回答",
"Asked": "提问",
"AllQuestions": "所有的问题",
"NextVersion": "下一个版本",
"MilestoneErrorMessage": "无法从Github获取当前的里程碑详细信息.",
"QuestionItemErrorMessage": "无法从Stackoverflow获取最新的问题详细信息.",
"Oops": "哎呀!"
}
"culture": "zh-Hans",
"texts": {
"Permission:CommunityArticle": "社区文章",
"Permission:Edit": "修改",
"Waiting": "等待中",
"Approved": "已批准",
"Rejected": "已拒绝",
"Wait": "等待",
"Approve": "批准",
"Reject": "拒绝",
"ReadArticle": "阅读文章",
"Status": "状态",
"ContentSource": "内容来源",
"Details": "详情",
"Url": "url",
"Title": "标题",
"CreationTime": "创建时间",
"Save": "保存",
"SameUrlAlreadyExist": "url已存在,如果你想要添加这篇文章,你需要更改url!",
"UrlIsNotValid": "Url无效.",
"UrlNotFound": "Url未找到.",
"UrlContentNotFound": "Url内容未找到.",
"Summary": "摘要",
"MostRead": "阅读最多",
"Latest": "最新",
"ContributeAbpCommunity": "为ABP社区做贡献",
"SubmitYourArticle": "提交你的文章",
"ContributionGuide": "贡献指南",
"BugReport": "Bug报告",
"SeeAllArticles": "查看所有的文章",
"WelcomeToABPCommunity!": "欢迎来到ABP社区!",
"MyProfile": "我的资料",
"MyOrganizations": "我的组织",
"EmailNotValid": "请输入有效的电子邮箱地址.",
"FeatureRequest": "功能请求",
"CreateArticleTitleInfo": "文章标题显示在文章列表中.",
"CreateArticleUrlInfo": "文章的原始GitHub/外部URL.",
"CreateArticleSummaryInfo": "文章的简短摘要将显示在文章列表中.",
"CreateArticleCoverInfo": "为了创建有效的文章,请添加封面图. 仅支持16:9的图片!",
"ThisExtensionIsNotAllowed": "不允许此扩展名.",
"TheFileIsTooLarge": "文件过大.",
"GoToTheArticle": "转到文章",
"Contribute": "贡献",
"OverallProgress": "总体流程",
"Done": "完成",
"Open": "打开",
"Closed": "关闭",
"LatestQuestionOnThe": "有关的最新问题",
"Stackoverflow": "Stackoverflow",
"Votes": "票数",
"Answer": "回答",
"Views": "观看次数",
"Answered": "已回答",
"WaitingForYourAnswer": "等待你的回答",
"Asked": "提问",
"AllQuestions": "所有的问题",
"NextVersion": "下一个版本",
"MilestoneErrorMessage": "无法从Github获取当前的里程碑详细信息.",
"QuestionItemErrorMessage": "无法从Stackoverflow获取最新的问题详细信息.",
"Oops": "哎呀!",
"CreateArticleSuccessMessage": "文章提交成功. 网站管理员审核通过后将被发布.",
"ChooseCoverImage": "选项一张封面图片",
"CoverImage": "封面图片",
"ShareYourExperiencesWithTheABPFramework": "分享你的ABP Framework经验!",
"Optional": "可选的",
"UpdateUserWebSiteInfo": "示例: https://johndoe.com",
"UpdateUserTwitterInfo": "示例: johndoe",
"UpdateUserGithubInfo": "示例: johndoe",
"UpdateUserLinkedinInfo": "示例: https://www.linkedin.com/...",
"UpdateUserCompanyInfo": "示例v: Volosoft",
"UpdateUserJobTitleInfo": "示例: Software Developer",
"UserName": "用户名",
"Company": "公司",
"PersonalWebsite": "个人网站",
"RegistrationDate": "注册时间",
"Social": "社交",
"Biography": "传记",
"HasNoPublishedArticlesYet": "尚未发表文章",
"Author": "作者",
"LatestGithubAnnouncements": "最新的Github公告",
"SeeAllAnnouncements": "查看所有公告",
"LatestBlogPost": "最新博客文章",
"Edit": "修改",
"ProfileImageChange": "更改资料图片",
"BlogItemErrorMessage": "无法从ABP获取最新的博客文章详细信息.",
"PlannedReleaseDate": "计划发布日期"
}
}

30
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json

@ -93,6 +93,7 @@
"DynamicForms": "Dynamic Forms",
"BundlingMinification": "Bundling & Minification",
"BackgroundJobs": "Background Jobs",
"BackgroundJobsExplanation": "Define simple classes to execute jobs in background as queued. Use built-in job manager or integrate your own. <a href=\"{0}\">Hangfire</a> & <a href=\"{1}\">RabbitMQ</a> integrations are already available.",
"DDDInfrastructure": "DDD Infrastructure",
"DomainDrivenDesignInfrastructure": "Domain Driven Design Infrastructure",
"AutoRESTAPIs": "Auto REST APIs",
@ -102,6 +103,7 @@
"TestInfrastructure": "Test Infrastructure",
"AuditLoggingEntityHistories": "Audit Logging & Entity Histories",
"ObjectToObjectMapping": "Object to Object Mapping",
"ObjectToObjectMappingExplanation": "<a href=\"{0}\">Object to object mapping</a> abstraction with AutoMapper integration.",
"EmailSMSAbstractions": "Email & SMS Abstractions",
"EmailSMSAbstractionsWithTemplatingSupport": "Email & SMS Abstractions with Templating Support",
"Localization": "Localization",
@ -156,6 +158,32 @@
"UiFramework": "UI Framework",
"EmailAddress": "Email address",
"Mobile": "Mobile",
"ReactNative": "React Native"
"ReactNative": "React Native",
"Strong": "Strong",
"Complete": "Complete",
"BasedLayeringModel": "Based Layering Model",
"Microservice": "Microservice",
"Compatible": "Compatible",
"MeeTTheABPCommunityInfo": "Our mission is to create an environment where developers can help each other with articles, tutorials, case studies, etc. and meet like-minded people.",
"JoinTheABPCommunityInfo": "Get involved with a vibrant community and become a contributor to the ABP Framework!",
"AllArticles": "All Articles",
"SubmitYourArticle": "Submit Your Article",
"DynamicClientProxyDocument": "See the dynamic client proxy documentations for <a href=\"{0}\">JavaScript</a> & <a href=\"{1}\">C#</a>.",
"EmailSMSAbstractionsDocument": "See the <a href=\"{0}\">emailing</a> and <a href=\"{1}\">SMS sending</a> documents for more information.",
"CreateProjectWizard": "This wizard creates a new project from the startup template which is properly configured to jump start to your project.",
"TieredOption": "Creates a tiered solution where Web and Http API layers are physically separated. If not checked, creates a layered solution which is less complex and suitable for most scenarios.",
"SeparateIdentityServerOption": "Separates server side into two applications: First one is for the identity server and the second one is for your server side HTTP API.",
"UseslatestPreVersion": "Uses latest pre-release version",
"ReadTheDocumentation": "<span class=\"text-primary\">Read</span><span class=\"text-success\">The Documentation</span>",
"Documentation": "Documentation",
"GettingStartedTutorial": "Getting Started Tutorial",
"ApplicationDevelopmentTutorial": "Application Development Tutorial",
"TheStartupTemplate": "The Startup Template",
"InstallABPCLIInfo": "ABP CLI is the fastest way to start a new solution with the ABP framework. Install the ABP CLI using a command line window:",
"DifferentLevelOfNamespaces": "You can use different level of namespaces; e.g. BookStore, Acme.BookStore or Acme.Retail.BookStore.",
"ABPCLIExamplesInfo": "<strong>new</strong> command creates a <strong>layered MVC application</strong> with <strong>Entity Framework Core</strong> as the database provider. However, it has additional options. Examples:",
"SeeCliDocumentForMoreInformation": "See the <a href=\"{0}\">ABP CLI document</a> for more options or select the \"Direct Download\" tab above.",
"Optional": "Optional",
"LocalFrameworkRef": "Keep local project reference for the framework packages."
}
}

36
abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/zh-Hans.json

@ -89,10 +89,11 @@
"Features": "功能",
"ABPCLI": "ABP CLI",
"Modularity": "模块化",
"BootstrapTagHelpers": "Bootstrap Tag Helpers",
"BootstrapTagHelpers": "Bootstrap 标签助手",
"DynamicForms": "动态表单",
"BundlingMinification": "Bundling & Minification",
"BackgroundJobs": "后台作业",
"BackgroundJobsExplanation": "定义简单的类以在队列中在后台执行作业. 使用内置的作业管理器或集成你自己的作业管理器. <a href=\"{0}\">Hangfire</a> & <a href=\"{1}\">RabbitMQ</a>集成已经可用.",
"DDDInfrastructure": "DDD基础设施",
"DomainDrivenDesignInfrastructure": "Domain Driven Design基础设施",
"AutoRESTAPIs": "自动REST APIs",
@ -102,6 +103,7 @@
"TestInfrastructure": "测试基础设施",
"AuditLoggingEntityHistories": "审计日志和实体历史",
"ObjectToObjectMapping": "对象映射",
"ObjectToObjectMappingExplanation": "<a href=\"{0}\">对象到对象映射</a> 抽象AutoMapper集成.",
"EmailSMSAbstractions": "电子邮件和短信抽象",
"EmailSMSAbstractionsWithTemplatingSupport": "具有模板支持的电子邮件和短信抽象",
"Localization": "本土化",
@ -112,7 +114,7 @@
"DependencyInjection": "依赖注入",
"DependencyInjectionByConventions": "依据约定的依赖注入",
"ABPCLIExplanation": "ABP CLI(命令行界面)是用于对ABP解决方案执行常见操作的命令行工具.",
"ModularityExplanation": "ABP提供了一个完整的基础设施来构建你自己的应用程序模块,这些模块可能具有实体,服务,数据库集成,API,UI组件等.", //TODO: strong "your own application modules",-
"ModularityExplanation": "ABP提供了一个完整的基础设施来构建你自己的应用程序模块,这些模块可能具有实体,服务,数据库集成,API,UI组件等.",
"MultiTenancyExplanation": "ABP框架不仅支持开发多租户应用程序,而且使你的代码几乎无需知道多租户.",
"MultiTenancyExplanation2": "可以自动确定当前租户,将不同租户的数据相互隔离.",
"MultiTenancyExplanation3": "支持单一数据库,或每个租户单独数据库或者混合方式.",
@ -154,6 +156,34 @@
"SeeTheDocumentForMoreInformation": "查看<a href=\"{1}\">{0} 文档</a>获得更多信息",
"IndexPageHeroSection": "<span class=\"third-line shine2\"><strong>asp.net core的</strong></span><span class=\"first-line shine\"><strong>开源</strong></span><span class=\"second-line text-uppercase\">Web应用程序<br />框架 </span>",
"UiFramework": "UI框架",
"EmailAddress": "电子邮件地址"
"EmailAddress": "电子邮件地址",
"Mobile": "移动",
"ReactNative": "React Native",
"Strong": "强大的",
"Complete": "完整的",
"BasedLayeringModel": "基于分层模型",
"Microservice": "微服务",
"Compatible": "兼容",
"MeeTTheABPCommunityInfo": "我们的使命是创建一个环境使开发人员可以在文章,教程,案例研究等方面互相帮助并结识志趣相投的人.",
"JoinTheABPCommunityInfo": "参与充满活力的社区并成为ABP框架的贡献者",
"AllArticles": "所有的文章",
"SubmitYourArticle": "提交你的文章",
"DynamicClientProxyDocument": "参阅<a href=\"{0}\">JavaScript</a> & <a href=\"{1}\">C#</a>的动态客户端代理文档.",
"EmailSMSAbstractionsDocument": "参阅<a href=\"{0}\">emailing</a> 和 <a href=\"{1}\">SMS sending</a> 文档获得更多信息.",
"CreateProjectWizard": "此向导让你从启动模板创建一个新项目,该启动模板已正确配置为可以快速启动你的项目.",
"TieredOption": "创建一个分层解决方案,其中Web和Http API层在物理上是分离的. 如果没有选中则创建一个不那么复杂且适合大多数场景的分层解决方案.",
"SeparateIdentityServerOption": "将服务器端分离为两个应用程序:第一个应用程序用于身份服务器,第二个应用程序用于服务器端HTTP API.",
"UseslatestPreVersion": "使用最新的预发布版本",
"ReadTheDocumentation": "<span class=\"text-primary\">阅读</span><span class=\"text-success\">文档</span>",
"Documentation": "文档",
"GettingStartedTutorial": "入门教程",
"ApplicationDevelopmentTutorial": "应用程序开发教程",
"TheStartupTemplate": "启动模板",
"InstallABPCLIInfo": "ABP CLI是使用ABP框架启动新解决方案的最快方式. 使用命令行窗口安装ABP CLI:",
"DifferentLevelOfNamespaces": "你可以使用不同级别的名称空间. 例如 BookStore, Acme.BookStore 或 Acme.Retail.BookStore",
"ABPCLIExamplesInfo": "<strong>new</strong>命令创建一个 <strong>分层的MVC应用程序</strong> 使用 <strong>Entity Framework Core</strong> 做为数据库提供程序. 它还有其他选项. 示例:",
"SeeCliDocumentForMoreInformation": "参阅 <a href=\"{0}\">ABP CLI 文档</a> 获得更多选项或选择上方的 \"直接下载\" 标签.",
"Optional": "可选的",
"LocalFrameworkRef": "保留框架包的本地项目引用."
}
}

50
docs/en/Migration-Guides/Abp-4_0.md

@ -0,0 +1,50 @@
# ABP Framework 3.3 to 4.0 Migration Guide
## Identity Server Changes
ABP Framework upgrades the [IdentityServer4](https://www.nuget.org/packages/IdentityServer4) library from 3.x to 4.x with the ABP Framework version 4.0. IdentityServer 4.x has a lot of changes, some of them are **breaking changes in the data structure**.
### Database Changes
**So, if you are upgrading from 3.x, then there are some change should be done in your database.**
#### ApiScope
As the **most important breaking change**, Identity Server 4.x places the `ApiScope` as an independent aggregate root. Previously it was a part of the to `ApiResource` aggregate. This requires manual operation. See the *Database Migration* section.
Also, added `Enabled(string)` and `Description(bool,true)` properties.
#### Client
* Added `RequireRequestObject (bool)` and `AllowedIdentityTokenSigningAlgorithms (string)` properties.
* Changed default value of `RequireConsent` from `true` to `false`.
* Changed default value of `RequirePkce` from `false` to `true`.
#### DeviceFlowCodes
* Added `SessionId (string)` and `Description (string)` properties.
#### PersistedGrant
* Added `SessionId (string)` and `ShowInDiscoveryDocument (bool, default: true)` properties
#### ApiResource
* Added `AllowedAccessTokenSigningAlgorithms (string)` and `Description (string)` and `ConsumedTime (DateTime?)` properties
## Migrating the Database
> Attention: **Please backup your database** before the migration!
If you are using **Entity Framework Core**, you need to add a new database migration, using the `Add-Migration` command, and apply changes to the database. Please **review the migration** script to understand if it effects your existing data. Otherwise, you may **loose some of your configuration**.
If you haven't customize the `IdentityServerDataSeedContributor` and haven't customized the initial data inside the `IdentityServer*` tables;
1. Update `IdentityServerDataSeedContributor` class by comparing to [the latest code](https://github.com/abpframework/abp/blob/dev/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/IdentityServer/IdentityServerDataSeedContributor.cs). You probably only need to add the `CreateApiScopesAsync` method and the code related to it.
2. Then you can simply clear all the **table data** in these tables then execute the `DbMigrator` application again to fill it with the new configuration.
If you've customize your IdentityServer configuration in the database or in the seed data, you should understand the changes and upgrade your code/data accordingly.
### Related Resources
* https://leastprivilege.com/2020/06/19/announcing-identityserver4-v4-0/
* https://github.com/IdentityServer/IdentityServer4/issues/4592

48
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor

@ -0,0 +1,48 @@
@using Volo.Abp.UI.Navigation
@{
var elementId = MenuItem.ElementId ?? "MenuItem_" + MenuItem.Name.Replace(".", "_");
var cssClass = string.IsNullOrEmpty(MenuItem.CssClass) ? string.Empty : MenuItem.CssClass;
var disabled = MenuItem.IsDisabled ? "disabled" : string.Empty;
var url = string.IsNullOrEmpty(MenuItem.Url) ? "#" : MenuItem.Url;
}
@if (MenuItem.IsLeaf)
{
if (MenuItem.Url != null)
{
<li class="nav-item @cssClass @disabled" id="@elementId">
<a class="nav-link" href="@url">
@if (MenuItem.Icon != null)
{
if (MenuItem.Icon.StartsWith("fa"))
{
<i class="@MenuItem.Icon"></i>
}
}
@MenuItem.DisplayName
</a>
</li>
}
}
else
{
<li class="nav-item">
<div class="dropdown">
<a class="nav-link dropdown-toggle" @onclick="ToggleSubMenu" id="Menu_@(MenuItem.Name)" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@if (MenuItem.Icon != null)
{
if (MenuItem.Icon.StartsWith("fa"))
{
<i class="@MenuItem.Icon"></i>
}
}
@MenuItem.DisplayName
</a>
<div class="dropdown-menu border-0 shadow-sm @(IsSubMenuOpen ? "show" : "")" aria-labelledby="Menu_@(MenuItem.Name)">
@foreach (var childMenuItem in MenuItem.Items)
{
<SecondLevelNavMenuItem MenuItem="childMenuItem"/>
}
</div>
</div>
</li>
}

38
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor.cs

@ -0,0 +1,38 @@
using System;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Routing;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic
{
public partial class FirstLevelNavMenuItem : IDisposable
{
[Inject] private NavigationManager NavigationManager { get; set; }
[Parameter]
public ApplicationMenuItem MenuItem { get; set; }
public bool IsSubMenuOpen { get; set; }
protected override void OnInitialized()
{
NavigationManager.LocationChanged += OnLocationChanged;
}
private void ToggleSubMenu()
{
IsSubMenuOpen = !IsSubMenuOpen;
}
public void Dispose()
{
NavigationManager.LocationChanged -= OnLocationChanged;
}
private void OnLocationChanged(object sender, LocationChangedEventArgs e)
{
IsSubMenuOpen = false;
StateHasChanged();
}
}
}

11
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor

@ -1,13 +1,22 @@
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@using Volo.Abp.Users
@using Volo.Abp.MultiTenancy
@inject ICurrentUser CurrentUser
@inject ICurrentTenant CurrentTenant
@inject NavigationManager Navigation
@inject SignOutSessionStateManager SignOutManager
<AuthorizeView>
<Authorized>
<Dropdown>
<DropdownToggle Color="Color.None">
@CurrentUser.UserName
@if (CurrentTenant.Name != null)
{
<span><i>@CurrentTenant.Name</i>\@CurrentUser.UserName</span>
}
else
{
<span>@CurrentUser.UserName</span>
}
</DropdownToggle>
<DropdownMenu>
@if (Menu != null)

4
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/MainLayout.razor

@ -4,12 +4,12 @@
<nav class="navbar navbar-expand-md navbar-dark bg-dark shadow-sm flex-column flex-md-row mb-4" id="main-navbar" style="min-height: 4rem;">
<div class="container">
<a class="navbar-brand" href="/">@BrandingProvider.AppName</a>
<button class="navbar-toggler" type="button" data-toggle="collapse"
<button @onclick="ToggleCollapse" class="navbar-toggler" type="button" data-toggle="collapse"
data-target="#main-navbar-collapse" aria-controls="main-navbar-collapse"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="main-navbar-collapse">
<div class="collapse navbar-collapse @(IsCollapseShown ? "show" : "")" id="main-navbar-collapse">
<ul class="navbar-nav mx-auto">
<NavMenu />
</ul>

34
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/MainLayout.razor.cs

@ -0,0 +1,34 @@
using System;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Routing;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic
{
public partial class MainLayout : IDisposable
{
[Inject] private NavigationManager NavigationManager { get; set; }
private bool IsCollapseShown { get; set; }
protected override void OnInitialized()
{
NavigationManager.LocationChanged += OnLocationChanged;
}
private void ToggleCollapse()
{
IsCollapseShown = !IsCollapseShown;
}
public void Dispose()
{
NavigationManager.LocationChanged -= OnLocationChanged;
}
private void OnLocationChanged(object sender, LocationChangedEventArgs e)
{
IsCollapseShown = false;
StateHasChanged();
}
}
}

46
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/NavMenu.razor

@ -2,50 +2,6 @@
{
foreach (var menuItem in Menu.Items)
{
var elementId = menuItem.ElementId ?? "MenuItem_" + menuItem.Name.Replace(".", "_");
var cssClass = string.IsNullOrEmpty(menuItem.CssClass) ? string.Empty : menuItem.CssClass;
var disabled = menuItem.IsDisabled ? "disabled" : string.Empty;
var url = string.IsNullOrEmpty(menuItem.Url) ? "#" : menuItem.Url;
if (menuItem.IsLeaf)
{
if (menuItem.Url != null)
{
<li class="nav-item @cssClass @disabled" id="@elementId">
<a class="nav-link" href="@url">
@if (menuItem.Icon != null)
{
if (menuItem.Icon.StartsWith("fa"))
{
<i class="@menuItem.Icon"></i>
}
}
@menuItem.DisplayName
</a>
</li>
}
}
else
{
<li class="nav-item">
<div class="dropdown">
<a class="nav-link dropdown-toggle" href="#" id="Menu_@(menuItem.Name)" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@if (menuItem.Icon != null)
{
if (menuItem.Icon.StartsWith("fa"))
{
<i class="@menuItem.Icon"></i>
}
}
@menuItem.DisplayName
</a>
<div class="dropdown-menu border-0 shadow-sm" aria-labelledby="Menu_@(menuItem.Name)">
@foreach (var childMenuItem in menuItem.Items)
{
<NavMenuItem MenuItem="childMenuItem"/>
}
</div>
</div>
</li>
}
<FirstLevelNavMenuItem MenuItem="menuItem" />
}
}

14
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/NavMenu.razor.cs

@ -6,22 +6,14 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic
{
public partial class NavMenu
{
[Inject] protected IMenuManager MenuManager { get; set; }
[Inject]
protected IMenuManager MenuManager { get; set; }
protected ApplicationMenu Menu { get; set; }
private bool collapseNavMenu = true;
private string NavMenuCssClass => collapseNavMenu ? "collapse" : null;
protected override async Task OnInitializedAsync()
protected async override Task OnInitializedAsync()
{
Menu = await MenuManager.GetAsync(StandardMenus.Main);
}
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}
}

10
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/NavMenuItem.razor → framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor

@ -24,7 +24,7 @@
else
{
<div class="dropdown-submenu">
<a role="button" class="btn dropdown-toggle" data-toggle="dropdown"
<a role="button" @onclick="ToggleSubMenu" class="btn dropdown-toggle" data-toggle="dropdown"
aria-haspopup="true" aria-expanded="false">
<span class="lp-icon">
<i class="@(MenuItem.Icon ?? "")"></i>
@ -33,15 +33,13 @@ else
@MenuItem.DisplayName
</span>
</a>
<div class="dropdown-menu border-0 shadow-sm">
<div class="dropdown-menu border-0 shadow-sm @(IsSubMenuOpen ? "show" : "")">
@foreach (var childMenuItem in MenuItem.Items)
{
<NavMenuItem MenuItem="@childMenuItem"/>
<SecondLevelNavMenuItem MenuItem="@childMenuItem"/>
}
</div>
</div>
}
@code {
[Parameter]
public ApplicationMenuItem MenuItem { get; set; }
}
}

38
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/SecondLevelNavMenuItem.razor.cs

@ -0,0 +1,38 @@
using System;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Routing;
using Volo.Abp.UI.Navigation;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.Themes.Basic
{
public partial class SecondLevelNavMenuItem : IDisposable
{
[Inject] private NavigationManager NavigationManager { get; set; }
[Parameter]
public ApplicationMenuItem MenuItem { get; set; }
public bool IsSubMenuOpen { get; set; }
protected override void OnInitialized()
{
NavigationManager.LocationChanged += OnLocationChanged;
}
private void ToggleSubMenu()
{
IsSubMenuOpen = !IsSubMenuOpen;
}
public void Dispose()
{
NavigationManager.LocationChanged -= OnLocationChanged;
}
private void OnLocationChanged(object sender, LocationChangedEventArgs e)
{
IsSubMenuOpen = false;
StateHasChanged();
}
}
}

16
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/wwwroot/theme.js

@ -1,16 +0,0 @@
$(function () {
$('.dropdown-menu a.dropdown-toggle').on('click', function (e) {
if (!$(this).next().hasClass('show')) {
$(this).parents('.dropdown-menu').first().find('.show').removeClass("show");
}
var $subMenu = $(this).next(".dropdown-menu");
$subMenu.toggleClass('show');
$(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function (e) {
$('.dropdown-submenu .show').removeClass("show");
});
return false;
});
});

35
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/wwwroot/abp_theming.js

@ -1,35 +0,0 @@
var abp = abp || {};
(function () {
abp.utils = abp.utils || {};
abp.utils.addClassToTag = function (tagName, className) {
var tags = document.getElementsByTagName(tagName);
for (var i = 0; i < tags.length; i++) {
tags[i].classList.add(className);
}
};
abp.utils.removeClassFromTag = function (tagName, className) {
var tags = document.getElementsByTagName(tagName);
for (var i = 0; i < tags.length; i++) {
tags[i].classList.remove(className);
}
};
abp.utils.hasClassOnTag = function (tagName, className) {
var tags = document.getElementsByTagName(tagName);
if (tags.length) {
return tags[0].classList.contains(className);
}
return false;
};
abp.utils.replaceLinkHrefById = function (linkId, hrefValue) {
var link = document.getElementById(linkId);
if (link && link.href !== hrefValue) {
link.href = hrefValue;
}
};
})();

2
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" />

2
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/AbpUtilsService.cs → framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/AbpUtilsService.cs

@ -2,7 +2,7 @@
using Microsoft.JSInterop;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming
namespace Volo.Abp.AspNetCore.Components.WebAssembly
{
public class AbpUtilsService : IAbpUtilsService, ITransientDependency
{

11
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/CookieOptions.cs

@ -0,0 +1,11 @@
using System;
namespace Volo.Abp.AspNetCore.Components.WebAssembly
{
public class CookieOptions
{
public DateTimeOffset? ExpireDate { get; set; }
public string Path { get; set; }
public bool Secure { get; set; }
}
}

32
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/CookieService.cs

@ -0,0 +1,32 @@
using System.Threading.Tasks;
using Microsoft.JSInterop;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Components.WebAssembly
{
[Dependency(ReplaceServices = true)]
public class CookieService : ICookieService, ITransientDependency
{
public IJSRuntime JsRuntime { get; }
public CookieService(IJSRuntime jsRuntime)
{
JsRuntime = jsRuntime;
}
public async ValueTask SetAsync(string key, string value, CookieOptions options)
{
await JsRuntime.InvokeVoidAsync("abp.utils.setCookieValue", key, value, options?.ExpireDate?.ToString("r"), options?.Path, options?.Secure);
}
public async ValueTask<string> GetAsync(string key)
{
return await JsRuntime.InvokeAsync<string>("abp.utils.getCookieValue", key);
}
public async ValueTask DeleteAsync(string key, string path = null)
{
await JsRuntime.InvokeVoidAsync("abp.utils.deleteCookie", key);
}
}
}

2
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/IAbpUtilsService.cs → framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/IAbpUtilsService.cs

@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.Theming
namespace Volo.Abp.AspNetCore.Components.WebAssembly
{
public interface IAbpUtilsService
{

12
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ICookieService.cs

@ -0,0 +1,12 @@
using System;
using System.Threading.Tasks;
namespace Volo.Abp.AspNetCore.Components.WebAssembly
{
public interface ICookieService
{
public ValueTask SetAsync(string key, string value, CookieOptions options = null);
public ValueTask<string> GetAsync(string key);
public ValueTask DeleteAsync(string key, string path = null);
}
}

116
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/wwwroot/abp.js

@ -0,0 +1,116 @@
var abp = abp || {};
(function () {
abp.utils = abp.utils || {};
// COOKIES ///////////////////////////////////////////////////////
/**
* Sets a cookie value for given key.
* This is a simple implementation created to be used by ABP.
* Please use a complete cookie library if you need.
* @param {string} key
* @param {string} value
* @param {string} expireDate (optional). If not specified the cookie will expire at the end of session.
* @param {string} path (optional)
* @param {bool} secure (optional)
*/
abp.utils.setCookieValue = function (key, value, expireDate, path, secure) {
var cookieValue = encodeURIComponent(key) + '=';
if (value) {
cookieValue = cookieValue + encodeURIComponent(value);
}
if (expireDate) {
cookieValue = cookieValue + "; expires=" + expireDate;
}
if (path) {
cookieValue = cookieValue + "; path=" + path;
}
if (secure) {
cookieValue = cookieValue + "; secure";
}
document.cookie = cookieValue;
};
/**
* Gets a cookie with given key.
* This is a simple implementation created to be used by ABP.
* Please use a complete cookie library if you need.
* @param {string} key
* @returns {string} Cookie value or null
*/
abp.utils.getCookieValue = function (key) {
var equalities = document.cookie.split('; ');
for (var i = 0; i < equalities.length; i++) {
if (!equalities[i]) {
continue;
}
var splitted = equalities[i].split('=');
if (splitted.length != 2) {
continue;
}
if (decodeURIComponent(splitted[0]) === key) {
return decodeURIComponent(splitted[1] || '');
}
}
return null;
};
/**
* Deletes cookie for given key.
* This is a simple implementation created to be used by ABP.
* Please use a complete cookie library if you need.
* @param {string} key
* @param {string} path (optional)
*/
abp.utils.deleteCookie = function (key, path) {
var cookieValue = encodeURIComponent(key) + '=';
cookieValue = cookieValue + "; expires=" + (new Date(new Date().getTime() - 86400000)).toUTCString();
if (path) {
cookieValue = cookieValue + "; path=" + path;
}
document.cookie = cookieValue;
}
// DOM MANIPULATION
abp.utils.addClassToTag = function (tagName, className) {
var tags = document.getElementsByTagName(tagName);
for (var i = 0; i < tags.length; i++) {
tags[i].classList.add(className);
}
};
abp.utils.removeClassFromTag = function (tagName, className) {
var tags = document.getElementsByTagName(tagName);
for (var i = 0; i < tags.length; i++) {
tags[i].classList.remove(className);
}
};
abp.utils.hasClassOnTag = function (tagName, className) {
var tags = document.getElementsByTagName(tagName);
if (tags.length) {
return tags[0].classList.contains(className);
}
return false;
};
abp.utils.replaceLinkHrefById = function (linkId, hrefValue) {
var link = document.getElementById(linkId);
if (link && link.href !== hrefValue) {
link.href = hrefValue;
}
};
})();

32
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/datatables/datatables-extensions.js

@ -217,6 +217,7 @@
var renderRowActions = function (tableInstance, nRow, aData, iDisplayIndex, iDisplayIndexFull) {
var columns;
if (tableInstance.aoColumns) {
columns = tableInstance.aoColumns;
} else {
@ -270,6 +271,37 @@
}
});
//Delay for processing indicator
var defaultDelayForProcessingIndicator = 500;
var _existingDefaultFnPreDrawCallback = $.fn.dataTable.defaults.fnPreDrawCallback;
$.extend(true,
$.fn.dataTable.defaults,
{
fnPreDrawCallback: function (settings) {
if (_existingDefaultFnPreDrawCallback) {
_existingDefaultFnPreDrawCallback(settings);
}
var $tableWrapper = $(settings.nTableWrapper);
$tableWrapper.on('processing.dt',
function (e, settings, processing) {
if (processing) {
var $processing = $tableWrapper.find(".dataTables_processing");
$processing.hide();
var delay = settings.oInit.processingDelay === undefined
? defaultDelayForProcessingIndicator
: settings.oInit.processingDelay;
setTimeout(function () {
$processing.show();
}, delay);
}
});
}
});
})();
/************************************************************************

20
framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/AbpAspNetCoreIntegratedTestBase.cs

@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Server;
using Microsoft.AspNetCore.Routing;
using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
@ -11,7 +10,7 @@ using Microsoft.Extensions.Hosting;
namespace Volo.Abp.AspNetCore.TestBase
{
public abstract class AbpAspNetCoreIntegratedTestBase<TStartup> : AbpTestBaseWithServiceProvider
public abstract class AbpAspNetCoreIntegratedTestBase<TStartup> : AbpTestBaseWithServiceProvider, IDisposable
where TStartup : class
{
protected TestServer Server { get; }
@ -20,15 +19,17 @@ namespace Volo.Abp.AspNetCore.TestBase
protected override IServiceProvider ServiceProvider { get; }
private readonly IHost _host;
protected AbpAspNetCoreIntegratedTestBase()
{
var builder = CreateHostBuilder();
var host = builder.Build();
host.Start();
_host = builder.Build();
_host.Start();
Server = host.GetTestServer();
Client = host.GetTestClient();
Server = _host.GetTestServer();
Client = _host.GetTestClient();
ServiceProvider = Server.Services;
@ -49,7 +50,7 @@ namespace Volo.Abp.AspNetCore.TestBase
protected virtual void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{
}
#region GetUrl
@ -90,5 +91,10 @@ namespace Volo.Abp.AspNetCore.TestBase
}
#endregion
public void Dispose()
{
_host?.Dispose();
}
}
}

7
framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs

@ -184,6 +184,7 @@ namespace Volo.Abp.BlazoriseUI
protected TUpdateViewModel EditingEntity;
protected Modal CreateModal;
protected Modal EditModal;
protected List<BreadcrumbItem> BreadcrumbItems = new List<BreadcrumbItem>(2);
protected string CreatePolicyName { get; set; }
protected string UpdatePolicyName { get; set; }
@ -239,6 +240,7 @@ namespace Volo.Abp.BlazoriseUI
protected override async Task OnInitializedAsync()
{
await SetBreadcrumbItemsAsync();
await SetPermissionsAsync();
await GetEntitiesAsync();
}
@ -438,5 +440,10 @@ namespace Volo.Abp.BlazoriseUI
await AuthorizationService.CheckAsync(policyName);
}
protected virtual ValueTask SetBreadcrumbItemsAsync()
{
return ValueTask.CompletedTask;
}
}
}

20
framework/src/Volo.Abp.BlazoriseUI/BreadcrumbItem.cs

@ -0,0 +1,20 @@
using Blazorise;
namespace Volo.Abp.BlazoriseUI
{
public class BreadcrumbItem
{
public string Text { get; set; }
public object Icon { get; set; }
public string Url { get; set; }
public BreadcrumbItem(string text, string url = null, object icon = null)
{
Text = text;
Url = url;
Icon = icon;
}
}
}

37
framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor

@ -0,0 +1,37 @@
<Row Class="entry-row">
<Column ColumnSize="ColumnSize.IsAuto">
<h1 class="content-header-title">@Title</h1>
</Column>
@if (BreadcrumbItems.Any())
{
<Column ColumnSize="ColumnSize.IsAuto.OnWidescreen" Padding="Padding.Is0.FromLeft.OnWidescreen">
<Breadcrumb Mode="@(BreadcrumbShowCurrent ? BreadcrumbMode.Auto : BreadcrumbMode.None)">
@if (BreadcrumbShowHome)
{
<BreadcrumbItem>
<BreadcrumbLink To="/">
<Icon Name="IconName.Home" />
</BreadcrumbLink>
</BreadcrumbItem>
}
@foreach (var item in BreadcrumbItems)
{
<BreadcrumbItem>
<BreadcrumbLink To="@item.Url">
@if (item.Icon != null)
{
<Icon Name="@item.Icon" />
}
@item.Text
</BreadcrumbLink>
</BreadcrumbItem>
}
</Breadcrumb>
</Column>
}
<Column>
<Row Class="justify-content-end mx-n1">
@ChildContent
</Row>
</Column>
</Row>

29
framework/src/Volo.Abp.BlazoriseUI/Components/PageHeader.razor.cs

@ -0,0 +1,29 @@
using System.Collections.Generic;
using Blazorise;
using Microsoft.AspNetCore.Components;
namespace Volo.Abp.BlazoriseUI.Components
{
public partial class PageHeader : ComponentBase
{
[Parameter]
public string Title { get; set; }
[Parameter]
public bool BreadcrumbShowHome { get; set; } = true;
[Parameter]
public bool BreadcrumbShowCurrent { get; set; } = true;
[Parameter]
public RenderFragment ChildContent { get; set; }
[Parameter]
public List<BreadcrumbItem> BreadcrumbItems { get; set; }
public PageHeader()
{
BreadcrumbItems = new List<BreadcrumbItem>();
}
}
}

3
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/GetSourceCommand.cs

@ -2,14 +2,11 @@
using System.IO;
using System.Text;
using System.Threading.Tasks;
using ICSharpCode.SharpZipLib.Core;
using ICSharpCode.SharpZipLib.Zip;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Cli.Args;
using Volo.Abp.Cli.Commands.Services;
using Volo.Abp.Cli.ProjectBuilding;
using Volo.Abp.Cli.ProjectBuilding.Building;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.Cli.Commands

5
framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationCreationOptions.cs

@ -13,6 +13,9 @@ namespace Volo.Abp
[NotNull]
public PlugInSourceList PlugInSources { get; }
/// <summary>
/// The options in this property only take effect when IConfiguration not registered.
/// </summary>
[NotNull]
public AbpConfigurationBuilderOptions Configuration {get; }
@ -23,4 +26,4 @@ namespace Volo.Abp
Configuration = new AbpConfigurationBuilderOptions();
}
}
}
}

4
framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/zh-Hans.json

@ -18,6 +18,8 @@
"Description:Abp.Mailing.Smtp.Password": "凭据关联的用户名的密码.",
"Description:Abp.Mailing.Smtp.Domain": "验证凭据的域名或计算机名.",
"Description:Abp.Mailing.Smtp.EnableSsl": "指定 SmtpClient 是否使用安全套接字层 (SSL) 加密连接.",
"Description:Abp.Mailing.Smtp.UseDefaultCredentials": "控制默认凭据是否随请求一起发送."
"Description:Abp.Mailing.Smtp.UseDefaultCredentials": "控制默认凭据是否随请求一起发送.",
"TextTemplate:StandardEmailTemplates.Layout": "默认电子邮件模板",
"TextTemplate:StandardEmailTemplates.Message": "电子邮件的简单消息模板"
}
}

13
framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/zh-Hans.json

@ -4,8 +4,10 @@
"Languages": "语言",
"AreYouSure": "你确定吗?",
"Cancel": "取消",
"Clear": "清楚",
"Yes": "是",
"No": "否",
"Ok": "Ok",
"Close": "关闭",
"Save": "保存",
"SavingWithThreeDot": "保存中...",
@ -13,6 +15,8 @@
"Delete": "删除",
"Edit": "编辑",
"Refresh": "刷新",
"Language": "语言",
"LoadMore": "加载更多",
"ProcessingWithThreeDot": "处理中...",
"LoadingWithThreeDot": "加载中...",
"Welcome": "欢迎",
@ -31,6 +35,8 @@
"PagerInfoEmpty": "显示0个条目中的0到0",
"PagerInfoFiltered": "(从 _MAX_ 总条目中过滤掉)",
"NoDataAvailableInDatatable": "表中没有数据",
"Total": "总计",
"Selected": "已选",
"PagerShowMenuEntries": "显示 _MENU_ 条数据",
"DatatableActionDropdownDefaultText": "操作",
"ChangePassword": "修改密码",
@ -38,6 +44,9 @@
"AreYouSureYouWantToCancelEditingWarningMessage": "你有未保存的更改.",
"GoHomePage": "返回主页",
"GoBack": "返回",
"Search" : "搜索"
"Search": "搜索",
"ItemWillBeDeletedMessageWithFormat": "{0} 将被删除!",
"ItemWillBeDeletedMessage": "此项将被删除!",
"ManageYourAccount": "管理你的账户"
}
}
}

6
framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/zh-Hans.json

@ -0,0 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"hello": "你好"
}
}

6
framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/zh-Hans.json

@ -0,0 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"Volo.Abp.Http.DynamicProxying:10001": "业务异常: {0}"
}
}

6
framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/zh-Hans.json

@ -0,0 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"SeeYou": "再见"
}
}

2
framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj

@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
</ItemGroup>

12
framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/AbpMongoDbTestModule.cs

@ -21,9 +21,10 @@ namespace Volo.Abp.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
@ -35,11 +36,6 @@ namespace Volo.Abp.MongoDB
options.AddDefaultRepositories<ITestAppMongoDbContext>();
options.AddRepository<City, CityRepository>();
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.Abp.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

90
framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Transactions/Transaction_Tests.cs

@ -0,0 +1,90 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Shouldly;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.TestApp.Domain;
using Volo.Abp.TestApp.Testing;
using Volo.Abp.Uow;
using Xunit;
namespace Volo.Abp.MongoDB.Transactions
{
public class Transaction_Tests : TestAppTestBase<AbpMongoDbTestModule>
{
private readonly IBasicRepository<Person, Guid> _personRepository;
private readonly IUnitOfWorkManager _unitOfWorkManager;
public Transaction_Tests()
{
_personRepository = GetRequiredService<IBasicRepository<Person, Guid>>();
_unitOfWorkManager = GetRequiredService<IUnitOfWorkManager>();
}
[Fact]
public async Task Should_Rollback_Transaction_When_An_Exception_Is_Thrown()
{
var personId = Guid.NewGuid();
const string exceptionMessage = "thrown to rollback the transaction!";
try
{
await WithUnitOfWorkAsync(new AbpUnitOfWorkOptions { IsTransactional = true }, async () =>
{
await _personRepository.InsertAsync(new Person(personId, "Adam", 42));
throw new Exception(exceptionMessage);
});
}
catch (Exception e) when (e.Message == exceptionMessage)
{
}
var person = await _personRepository.FindAsync(personId);
person.ShouldBeNull();
}
[Fact]
public async Task Should_Rollback_Transaction_Manually()
{
var personId = Guid.NewGuid();
await WithUnitOfWorkAsync(new AbpUnitOfWorkOptions { IsTransactional = true }, async () =>
{
_unitOfWorkManager.Current.ShouldNotBeNull();
await _personRepository.InsertAsync(new Person(personId, "Adam", 42));
await _unitOfWorkManager.Current.RollbackAsync();
});
var person = await _personRepository.FindAsync(personId);
person.ShouldBeNull();
}
[Fact]
public async Task Should_Rollback_Transaction_Manually_With_Double_DbContext_Transaction()
{
var personId = Guid.NewGuid();
var bookId = Guid.NewGuid();
using (var scope = ServiceProvider.CreateScope())
{
var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>();
using (uowManager.Begin(new AbpUnitOfWorkOptions { IsTransactional = true }))
{
_unitOfWorkManager.Current.ShouldNotBeNull();
await _personRepository.InsertAsync(new Person(personId, "Adam", 42));
await _unitOfWorkManager.Current.SaveChangesAsync();
//Will automatically rollback since not called the Complete!
}
}
(await _personRepository.FindAsync(personId)).ShouldBeNull();
}
}
}

7
framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/zh-Hans.json

@ -0,0 +1,7 @@
{
"culture": "zh-Hans",
"texts": {
"HelloText": "你好 {0}",
"HowAreYou": "你好吗?"
}
}

7
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json

@ -44,6 +44,7 @@
"LoggedOutTitle": "注销",
"LoggedOutText": "你已成功注销并将马上返回.",
"ReturnToText": "点击此处返回到 {0}",
"OrLoginWith": "或登录",
"ForgotPassword": "忘记密码?",
"SendPasswordResetLink_Information": "密码重置链接将发送到您的电子邮件以重置密码. 如果您在几分钟内没有收到电子邮件,请重试.",
"PasswordResetMailSentMessage": "帐户恢复电子邮件已发送到您的电子邮件地址. 如果您在15分钟内未在收件箱中看到此电子邮件,请检查垃圾邮件,并标记为非垃圾邮件.",
@ -56,8 +57,6 @@
"ProfileTab:Password": "更改密码",
"ProfileTab:PersonalInfo": "个人信息",
"ReturnToApplication": "返回到应用程序",
"Volo.Account:InvalidEmailAddress": "找不到给定的电子邮件地址:{0}",
"Volo.Account:SelfRegistrationDisabled": "自我注册已禁用!",
"Volo.Account:InvalidEmailAddress": "找不到给定的电子邮件地址:{0}"
}
}
}

9
modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs

@ -76,9 +76,9 @@ namespace Volo.Abp.Account.Web.Pages.Account
EnableLocalLogin = await SettingProvider.IsTrueAsync(AccountSettingNames.EnableLocalLogin);
if (context?.ClientId != null)
if (context?.Client?.ClientId != null)
{
var client = await ClientStore.FindEnabledClientByIdAsync(context.ClientId);
var client = await ClientStore.FindEnabledClientByIdAsync(context?.Client?.ClientId);
if (client != null)
{
EnableLocalLogin = client.EnableLocalLogin;
@ -108,7 +108,10 @@ namespace Volo.Abp.Account.Web.Pages.Account
return Redirect("~/");
}
await Interaction.GrantConsentAsync(context, ConsentResponse.Denied);
await Interaction.GrantConsentAsync(context, new ConsentResponse()
{
Error = AuthorizationError.AccessDenied
});
return Redirect(ReturnUrl);
}

6
modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml

@ -96,8 +96,8 @@
}
<div>
<button name="UserDecision" value="yes" class="btn btn-primary" autofocus>Yes, Allow</button>
<button name="UserDecision" value="no" class="btn">No, Do Not Allow</button>
<button name="ConsentInput.UserDecision" value="yes" class="btn btn-primary" autofocus>Yes, Allow</button>
<button name="ConsentInput.UserDecision" value="no" class="btn">No, Do Not Allow</button>
@if (Model.ClientInfo.ClientUrl != null)
{
<a class="pull-right btn btn-secondary" target="_blank" href="@Model.ClientInfo.ClientUrl">
@ -110,4 +110,4 @@
</form>
</abp-card-body>
</abp-card>
</abp-card>

56
modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Consent.cshtml.cs

@ -6,6 +6,7 @@ using System.Threading.Tasks;
using IdentityServer4.Models;
using IdentityServer4.Services;
using IdentityServer4.Stores;
using IdentityServer4.Validation;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.Abp.UI;
@ -50,16 +51,16 @@ namespace Volo.Abp.Account.Web.Pages
throw new ApplicationException($"No consent request matching request: {ReturnUrl}");
}
var client = await _clientStore.FindEnabledClientByIdAsync(request.ClientId);
var client = await _clientStore.FindEnabledClientByIdAsync(request.Client.ClientId);
if (client == null)
{
throw new ApplicationException($"Invalid client id: {request.ClientId}");
throw new ApplicationException($"Invalid client id: {request.Client.ClientId}");
}
var resources = await _resourceStore.FindEnabledResourcesByScopeAsync(request.ScopesRequested);
var resources = await _resourceStore.FindEnabledResourcesByScopeAsync(request.ValidatedResources.RawScopeValues);
if (resources == null || (!resources.IdentityResources.Any() && !resources.ApiResources.Any()))
{
throw new ApplicationException($"No scopes matching: {request.ScopesRequested.Aggregate((x, y) => x + ", " + y)}");
throw new ApplicationException($"No scopes matching: {request.ValidatedResources.RawScopeValues.Aggregate((x, y) => x + ", " + y)}");
}
ClientInfo = new ClientInfoModel(client);
@ -67,14 +68,26 @@ namespace Volo.Abp.Account.Web.Pages
{
RememberConsent = true,
IdentityScopes = resources.IdentityResources.Select(x => CreateScopeViewModel(x, true)).ToList(),
ApiScopes = resources.ApiResources.SelectMany(x => x.Scopes).Select(x => CreateScopeViewModel(x, true)).ToList()
};
var apiScopes = new List<ScopeViewModel>();
foreach(var parsedScope in request.ValidatedResources.ParsedScopes)
{
var apiScope = request.ValidatedResources.Resources.FindApiScope(parsedScope.ParsedName);
if (apiScope != null)
{
var scopeVm = CreateScopeViewModel(parsedScope, apiScope, true);
apiScopes.Add(scopeVm);
}
}
if (resources.OfflineAccess)
{
ConsentInput.ApiScopes.Add(GetOfflineAccessScope(true));
apiScopes.Add(GetOfflineAccessScope(true));
}
ConsentInput.ApiScopes = apiScopes;
return Page();
}
@ -104,7 +117,10 @@ namespace Volo.Abp.Account.Web.Pages
if (ConsentInput.UserDecision == "no")
{
grantedConsent = ConsentResponse.Denied;
grantedConsent = new ConsentResponse
{
Error = AuthorizationError.AccessDenied
};
}
else
{
@ -113,7 +129,7 @@ namespace Volo.Abp.Account.Web.Pages
grantedConsent = new ConsentResponse
{
RememberConsent = ConsentInput.RememberConsent,
ScopesConsented = ConsentInput.GetAllowedScopeNames()
ScopesValuesConsented = ConsentInput.GetAllowedScopeNames()
};
}
else
@ -151,16 +167,22 @@ namespace Volo.Abp.Account.Web.Pages
};
}
protected virtual ConsentModel.ScopeViewModel CreateScopeViewModel(Scope scope, bool check)
protected virtual ConsentModel.ScopeViewModel CreateScopeViewModel(ParsedScopeValue parsedScopeValue, ApiScope apiScope, bool check)
{
return new ConsentModel.ScopeViewModel
var displayName = apiScope.DisplayName ?? apiScope.Name;
if (!string.IsNullOrWhiteSpace(parsedScopeValue.ParsedParameter))
{
displayName += ":" + parsedScopeValue.ParsedParameter;
}
return new ScopeViewModel
{
Name = scope.Name,
DisplayName = scope.DisplayName,
Description = scope.Description,
Emphasize = scope.Emphasize,
Required = scope.Required,
Checked = check || scope.Required
Name = parsedScopeValue.RawValue,
DisplayName = displayName,
Description = apiScope.Description,
Emphasize = apiScope.Emphasize,
Required = apiScope.Required,
Checked = check || apiScope.Required
};
}
@ -241,4 +263,4 @@ namespace Volo.Abp.Account.Web.Pages
}
}
}
}
}

9
modules/account/src/Volo.Abp.Account.Web/AccountModuleToolbarContributor.cs

@ -15,11 +15,10 @@ namespace Volo.Abp.Account.Web
return Task.CompletedTask;
}
//TODO: Currently disabled!
//if (!context.ServiceProvider.GetRequiredService<ICurrentUser>().IsAuthenticated)
//{
// context.Toolbar.Items.Add(new ToolbarItem(typeof(UserLoginLinkViewComponent)));
//}
if (!context.ServiceProvider.GetRequiredService<ICurrentUser>().IsAuthenticated)
{
context.Toolbar.Items.Add(new ToolbarItem(typeof(UserLoginLinkViewComponent)));
}
return Task.CompletedTask;
}

2
modules/account/src/Volo.Abp.Account.Web/Modules/Account/Components/Toolbar/UserLoginLink/Default.cshtml

@ -1,4 +1,4 @@
@using Localization.Resources.AbpUi
@using Microsoft.AspNetCore.Mvc.Localization
@inject IHtmlLocalizer<AbpUiResource> L
<a href="~/Account/Login">@L["Login"]</a>
<a class="nav-link" role="button" href="~/Account/Login">@L["Login"]</a>

2
modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
</ItemGroup>
</Project>

12
modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/AbpAuditLoggingMongoDbTestModule.cs

@ -13,19 +13,15 @@ namespace Volo.Abp.AuditLogging.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo/Abp/AuditLogging/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.Abp.AuditLogging.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

2
modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
</ItemGroup>
</Project>

12
modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/AbpBackgroundJobsMongoDbTestModule.cs

@ -13,19 +13,15 @@ namespace Volo.Abp.BackgroundJobs.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo/Abp/BackgroundJobs/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.Abp.BackgroundJobs.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

12
modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/MongoDB/BlobStoringDatabaseMongoDbTestModule.cs

@ -13,19 +13,15 @@ namespace Volo.Abp.BlobStoring.Database.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.Abp.BlobStoring.Database.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

2
modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj

@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
<ProjectReference Include="..\..\src\Volo.Abp.BlobStoring.Database.MongoDB\Volo.Abp.BlobStoring.Database.MongoDB.csproj" />
<ProjectReference Include="..\Volo.Abp.BlobStoring.Database.TestBase\Volo.Abp.BlobStoring.Database.TestBase.csproj" />
</ItemGroup>

110
modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/zh-Hans.json

@ -1,56 +1,58 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:Blogs": "博客",
"Menu:BlogManagement": "博客管理",
"Permission:Management": "管理",
"Permission:Edit": "编辑",
"Permission:Create": "创建",
"Permission:Delete": "删除",
"Permission:Blogging": "博客",
"Permission:Blogs": "博客",
"Permission:Posts": "帖子",
"Permission:Tags": "标签",
"Permission:Comments": "评论",
"Title": "标题",
"Delete": "删除",
"Reply": "回复",
"ReplyTo": "回复 {0}",
"ContinueReading": "继续阅读",
"DaysAgo": "{0}天前",
"YearsAgo": "{0}年前",
"MonthsAgo": "{0}月前",
"WeeksAgo": "{0}周前",
"MinutesAgo": "{0}分前",
"SecondsAgo": "{0}秒前",
"HoursAgo": "{0}小时前",
"Now": "刚刚",
"Content": "内容",
"SeeAll": "查看所有",
"PopularTags": "热门标签",
"WiewsWithCount": "{0}人查看",
"LastPosts": "最后的帖子",
"LeaveComment": "发布评论",
"TagsInThisArticle": "文章中的标签",
"Posts": "帖子",
"Edit": "编辑",
"BLOG": "博客",
"CommentDeletionWarningMessage": "评论将被删除.",
"PostDeletionWarningMessage": "帖子将被删除",
"BlogDeletionWarningMessage": "博客将被删除.",
"AreYouSure": "你确定吗?",
"CommentWithCount": "{0}个评论",
"Comment": "评论",
"ShareOnTwitter": "分享到Twitter",
"CoverImage": "封面图",
"CreateANewPost": "创建一个新帖子",
"CreateANewBlog": "创建一个新博客",
"WhatIsNew": "最新消息",
"Name": "名称",
"ShortName": "简称",
"CreationTime": "创建时间",
"Description": "描述",
"Blogs": "博客",
"Tags": "标签"
"culture": "zh-Hans",
"texts": {
"Menu:Blogs": "博客",
"Menu:BlogManagement": "博客管理",
"Permission:Management": "管理",
"Permission:Edit": "编辑",
"Permission:Create": "创建",
"Permission:Delete": "删除",
"Permission:Blogging": "博客",
"Permission:Blogs": "博客",
"Permission:Posts": "帖子",
"Permission:Tags": "标签",
"Permission:Comments": "评论",
"Title": "标题",
"Delete": "删除",
"Reply": "回复",
"ReplyTo": "回复 {0}",
"ContinueReading": "继续阅读",
"DaysAgo": "{0}天前",
"YearsAgo": "{0}年前",
"MonthsAgo": "{0}月前",
"WeeksAgo": "{0}周前",
"MinutesAgo": "{0}分前",
"SecondsAgo": "{0}秒前",
"HoursAgo": "{0}小时前",
"Now": "刚刚",
"Content": "内容",
"SeeAll": "查看所有",
"PopularTags": "热门标签",
"WiewsWithCount": "{0}人查看",
"LastPosts": "最后的帖子",
"LeaveComment": "发布评论",
"TagsInThisArticle": "文章中的标签",
"Posts": "帖子",
"Edit": "编辑",
"BLOG": "博客",
"CommentDeletionWarningMessage": "评论将被删除.",
"PostDeletionWarningMessage": "帖子将被删除",
"BlogDeletionWarningMessage": "博客将被删除.",
"AreYouSure": "你确定吗?",
"CommentWithCount": "{0}个评论",
"Comment": "评论",
"ShareOnTwitter": "分享到Twitter",
"CoverImage": "封面图",
"CreateANewPost": "创建一个新帖子",
"CreateANewBlog": "创建一个新博客",
"WhatIsNew": "最新消息",
"Name": "名称",
"ShortName": "简称",
"CreationTime": "创建时间",
"Description": "描述",
"Blogs": "博客",
"Tags": "标签",
"ShareOn": "分享",
"TitleLengthWarning": "保持标题大小不超过60个字符,实现SEO友好!"
}
}
}

2
modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj

@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
<ProjectReference Include="..\..\src\Volo.Blogging.MongoDB\Volo.Blogging.MongoDB.csproj" />
<ProjectReference Include="..\Volo.Blogging.TestBase\Volo.Blogging.TestBase.csproj" />
</ItemGroup>

12
modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo/Blogging/MongoDB/BloggingMongoDBTestModule.cs

@ -13,19 +13,15 @@ namespace Volo.Blogging.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo/Blogging/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.Blogging.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

2
modules/cms-kit/host/Volo.CmsKit.IdentityServer/IdentityServer/IdentityServerDataSeedContributor.cs

@ -142,7 +142,7 @@ namespace Volo.CmsKit.IdentityServer
string postLogoutRedirectUri = null,
IEnumerable<string> permissions = null)
{
var client = await _clientRepository.FindByCliendIdAsync(name);
var client = await _clientRepository.FindByClientIdAsync(name);
if (client == null)
{
client = await _clientRepository.InsertAsync(

22
modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/zh-Hans.json

@ -0,0 +1,22 @@
{
"culture": "zh-Hans",
"texts": {
"PickYourReaction": "选择你的回应",
"YourComment": "你的评论",
"YourReply": "你的回复",
"Comments": "评论",
"Send": "发送",
"Delete": "删除",
"Reply": "回复",
"Update": "更新",
"Edit": "修改",
"LoginToAddComment": "登录添加评论",
"LoginToReply": "登录进行回复",
"MessageDeletionConfirmationMessage": "这条评论将被完全删除",
"CommentAuthorizationExceptionMessage": "这些评论不允许公开显示",
"Undo": "撤消",
"RatingUndoMessage": "您的评分将被撤消",
"LoginToRate": "登录进行评分",
"Star": "星"
}
}

12
modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/CmsKitMongoDbTestModule.cs

@ -13,19 +13,15 @@ namespace Volo.CmsKit.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.CmsKit.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

2
modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj

@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
<ProjectReference Include="..\..\src\Volo.CmsKit.MongoDB\Volo.CmsKit.MongoDB.csproj" />
<ProjectReference Include="..\Volo.CmsKit.TestBase\Volo.CmsKit.TestBase.csproj" />
</ItemGroup>

24
modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/zh-Hans.json

@ -7,6 +7,7 @@
"Permission:Delete": "删除",
"Permission:Create": "创建",
"Permission:Documents": "文档",
"Menu:Documents": "文档",
"Menu:DocumentManagement": "文档",
"Menu:ProjectManagement": "项目",
"CreateANewProject": "创建新项目",
@ -30,8 +31,29 @@
"DisplayName:GitHubRootUrl": "GitHub根网址",
"DisplayName:GitHubAccessToken": "GitHub访问令牌",
"DisplayName:GitHubUserAgent": "GitHub用户代理",
"DisplayName:GithubVersionProviderSource": "GitHub版本提供源",
"DisplayName:VersionBranchPrefix": "版本分支前缀",
"DisplayName:All": "拉取所有",
"DisplayName:LanguageCode": "语言代码",
"DisplayName:Version": "版本"
"DisplayName:Version": "版本",
"Documents": "文档",
"RemoveFromCache": "从缓存中删除",
"Reindex": "重新索引",
"ReindexCompleted": "重新索引完成",
"RemovedFromCache": "已从缓存中删除",
"RemoveFromCacheConfirmation": "你确定要从缓存中删除该项吗?",
"ReIndexDocumentConfirmation": "你确定要为该项重新索引吗",
"DeleteFromDatabase": "从数据库中删除",
"Deleted": "删除",
"Search": "搜索",
"StartDate": "开始时间",
"EndDate": "结束时间",
"CreationTime": "创建时间",
"LastUpdateTime": "最后修改",
"LastSignificantUpdateTime": "上次重大更新",
"Version": "版本",
"LanguageCode": "语言代码",
"FileName": "文件名称",
"LastCachedTime": "缓存项"
}
}

11
modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/zh-Hans.json

@ -1,6 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"texts": {
"Documents": "文档",
"BackToWebsite": "返回主网站",
"Contributors": "贡献者",
@ -9,6 +9,14 @@
"Edit": "编辑",
"LastEditTime": "上次编辑",
"Delete": "删除",
"ClearCache": "清除缓存",
"ClearCacheConfirmationMessage": "你确定清除 \"{0}\" 项目所有的缓存吗",
"ReIndexAllProjects": "重新索引所有的项目",
"ReIndexProject": "重新索引项目",
"ReIndexProjectConfirmationMessage": "你确定重新索引 \"{0}\" 项目",
"SuccessfullyReIndexProject": "成功重新索引 \"{0}\" 项目",
"ReIndexAllProjectConfirmationMessage": "你确定重新索引所有的项目",
"SuccessfullyReIndexAllProject": "成功重新索引所有的项目",
"InThisDocument": "在本文中",
"GoToTop": "到顶部",
"Projects": "项目",
@ -20,6 +28,7 @@
"FilterTopics": "过滤主题",
"FullSearch": "搜索文档",
"Volo.Docs.Domain:010001": "Elastic search未启用.",
"MultipleVersionDocumentInfo": "本文档有多个版本. 选择最适合你的选项",
"New": "新文档",
"Upd": "更新",
"NewExplanation": "在最近两周内创建.",

2
modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj

@ -7,7 +7,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
</ItemGroup>
<ItemGroup>

12
modules/docs/test/Volo.Docs.MongoDB.Tests/Volo/Docs/MongoDB/DocsMongoDBTestModule.cs

@ -13,19 +13,15 @@ namespace Volo.Docs.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
modules/docs/test/Volo.Docs.MongoDB.Tests/Volo/Docs/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.Docs.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

2
modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj

@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
</ItemGroup>
</Project>

12
modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo/Abp/FeatureManagement/MongoDB/AbpFeatureManagementMongoDbTestModule.cs

@ -13,19 +13,15 @@ namespace Volo.Abp.FeatureManagement.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo/Abp/FeatureManagement/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.Abp.FeatureManagement.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

5
modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/zh-Hans.json

@ -69,6 +69,7 @@
"Volo.Abp.Identity:010006": "无法删除静态角色.",
"Volo.Abp.Identity:010007": "你不能修改你的双因素身份验证设置",
"Volo.Abp.Identity:010008": "不允许修改双因素身份验证设置.",
"Identity.OrganizationUnit.MaxUserMembershipCount": "组织单位最大允许的成员资格计数",
"Permission:IdentityManagement": "身份标识管理",
"Permission:RoleManagement": "角色管理",
"Permission:Create": "创建",
@ -93,6 +94,7 @@
"DisplayName:Abp.Identity.Lockout.LockoutDuration": "锁定时间(秒)",
"DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts": "最大失败访问尝试次数",
"DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail": "要求验证的电子邮箱",
"DisplayName:Abp.Identity.SignIn.EnablePhoneNumberConfirmation": "允许用户确认他们的电话号码",
"DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "要求验证的手机号码",
"DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled": "启用用户名更新",
"DisplayName:Abp.Identity.User.IsEmailUpdateEnabled": "启用电子邮箱更新",
@ -106,6 +108,7 @@
"Description:Abp.Identity.Lockout.LockoutDuration": "当锁定发生时用户被的锁定的时间(秒).",
"Description:Abp.Identity.Lockout.MaxFailedAccessAttempts": "如果启用锁定, 当用户被锁定前失败的访问尝试次数.",
"Description:Abp.Identity.SignIn.RequireConfirmedEmail": "登录时是否需要验证的电子邮箱.",
"Description:Abp.Identity.SignIn.EnablePhoneNumberConfirmation": "用户是否可以确认电话号码",
"Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "登录时是否需要验证的手机号码.",
"Description:Abp.Identity.User.IsUserNameUpdateEnabled": "是否允许用户更新用户名.",
"Description:Abp.Identity.User.IsEmailUpdateEnabled": "是否允许用户更新电子邮箱.",
@ -114,4 +117,4 @@
"DisplayName:Abp.Identity.UsersCanChange": "允许用户更改其因素身份验证.",
"Description:Abp.Identity.UsersCanChange": "允许用户更改其因素身份验证."
}
}
}

2
modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj

@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Mongo2Go" Version="2.2.12" />
<PackageReference Include="Mongo2Go" Version="2.2.14" />
</ItemGroup>
</Project>

12
modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/AbpIdentityMongoDbTestModule.cs

@ -15,19 +15,15 @@ namespace Volo.Abp.Identity.MongoDB
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var connectionString = MongoDbFixture.ConnectionString.EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N");
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
}
}
}

2
modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo/Abp/Identity/MongoDB/MongoDbFixture.cs

@ -10,7 +10,7 @@ namespace Volo.Abp.Identity.MongoDB
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start();
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}

12
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceConsts.cs

@ -2,8 +2,12 @@
{
public class ApiResourceConsts
{
public const int NameMaxLength = 200;
public const int DisplayNameMaxLength = 200;
public const int DescriptionMaxLength = 1000;
public static int NameMaxLength { get; set; } = 200;
public static int DisplayNameMaxLength { get; set; } = 200;
public static int DescriptionMaxLength { get; set; } = 1000;
public static int AllowedAccessTokenSigningAlgorithmsMaxLength { get; set; } = 100;
}
}
}

2
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceEto.cs

@ -17,4 +17,4 @@ namespace Volo.Abp.IdentityServer.ApiResources
public bool Enabled { get; set; }
}
}
}

9
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourcePropertyConsts.cs

@ -0,0 +1,9 @@
namespace Volo.Abp.IdentityServer.ApiResources
{
public class ApiResourcePropertyConsts
{
public static int KeyMaxLength { get; set; } = 250;
public static int ValueMaxLength { get; set; } = 2000;
}
}

7
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceScopeConsts.cs

@ -0,0 +1,7 @@
namespace Volo.Abp.IdentityServer.ApiResources
{
public class ApiResourceScopeConsts
{
public static int ScopeMaxLength { get; set; } = 200;
}
}

20
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiResourceSecretConsts.cs

@ -0,0 +1,20 @@
namespace Volo.Abp.IdentityServer.ApiResources
{
public class ApiResourceSecretConsts
{
/// <summary>
/// Default value: 250
/// </summary>
public static int TypeMaxLength { get; set; } = 250;
/// <summary>
/// Default value: 4000
/// </summary>
public static int ValueMaxLength { get; set; } = 4000;
/// <summary>
/// Default value: 1000
/// </summary>
public static int DescriptionMaxLength { get; set; } = 1000;
}
}

9
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiResources/ApiScopeConsts.cs

@ -1,9 +0,0 @@
namespace Volo.Abp.IdentityServer.ApiResources
{
public class ApiScopeConsts
{
public const int NameMaxLength = 200;
public const int DisplayNameMaxLength = 200;
public const int DescriptionMaxLength = 1000;
}
}

11
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiResourceConsts.cs

@ -0,0 +1,11 @@
namespace Volo.Abp.IdentityServer.ApiScopes
{
public class ApiScopeConsts
{
public static int NameMaxLength { get; set; } = 200;
public static int DisplayNameMaxLength { get; set; } = 200;
public static int DescriptionMaxLength { get; set; } = 1000;
}
}

9
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/ApiScopes/ApiScopePropertyConsts.cs

@ -0,0 +1,9 @@
namespace Volo.Abp.IdentityServer.ApiScopes
{
public class ApiScopePropertyConsts
{
public static int KeyMaxLength { get; set; } = 250;
public static int ValueMaxLength { get; set; } = 2000;
}
}

7
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientClaimConsts.cs

@ -2,7 +2,8 @@
{
public class ClientClaimConsts
{
public const int TypeMaxLength = 250;
public const int ValueMaxLength = 250;
public static int TypeMaxLength { get; set; } = 250;
public static int ValueMaxLength { get; set; } = 250;
}
}
}

26
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientConsts.cs

@ -2,26 +2,28 @@
{
public class ClientConsts
{
public const int ClientIdMaxLength = 200;
public static int ClientIdMaxLength { get; set; } = 200;
public const int ProtocolTypeMaxLength = 200;
public static int ProtocolTypeMaxLength { get; set; } = 200;
public const int ClientNameMaxLength = 200;
public static int ClientNameMaxLength { get; set; } = 200;
public const int ClientUriMaxLength = 2000;
public static int ClientUriMaxLength { get; set; } = 2000;
public const int LogoUriMaxLength = 2000;
public static int LogoUriMaxLength { get; set; } = 2000;
public const int DescriptionMaxLength = 1000;
public static int DescriptionMaxLength { get; set; } = 1000;
public const int FrontChannelLogoutUriMaxLength = 2000;
public static int FrontChannelLogoutUriMaxLength { get; set; } = 2000;
public const int BackChannelLogoutUriMaxLength = 2000;
public static int BackChannelLogoutUriMaxLength { get; set; } = 2000;
public const int ClientClaimsPrefixMaxLength = 200;
public static int ClientClaimsPrefixMaxLength { get; set; } = 200;
public const int PairWiseSubjectSaltMaxLength = 200;
public static int PairWiseSubjectSaltMaxLength { get; set; } = 200;
public const int UserCodeTypeMaxLength = 100;
public static int UserCodeTypeMaxLength { get; set; } = 100;
public static int AllowedIdentityTokenSigningAlgorithms { get; set; } = 100;
}
}
}

4
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientCorsOriginConsts.cs

@ -2,6 +2,6 @@
{
public class ClientCorsOriginConsts
{
public const int OriginMaxLength = 150;
public static int OriginMaxLength { get; set; } = 150;
}
}
}

4
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientGrantTypeConsts.cs

@ -2,6 +2,6 @@
{
public class ClientGrantTypeConsts
{
public const int GrantTypeMaxLength = 250;
public static int GrantTypeMaxLength { get; set; } = 250;
}
}
}

12
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/SecretConsts.cs → modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Clients/ClientSecretConsts.cs

@ -1,22 +1,20 @@
namespace Volo.Abp.IdentityServer
namespace Volo.Abp.IdentityServer.Clients
{
public class SecretConsts
public class ClientSecretConsts
{
/// <summary>
/// Default value: 250
/// </summary>
public static int TypeMaxLength { get; set; } = 250;
/// <summary>
/// Default value: 4000
/// </summary>
public static int ValueMaxLength { get; set; } = 4000;
public static int ValueMaxLengthValue { get; set; } = ValueMaxLength;
/// <summary>
/// Default value: 2000
/// </summary>
public static int DescriptionMaxLength { get; set; } = 2000;
}
}
}

19
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesConsts.cs

@ -0,0 +1,19 @@
namespace Volo.Abp.IdentityServer.Devices
{
public class DeviceFlowCodesConsts
{
public static int DeviceCodeMaxLength { get; set; } = 200;
public static int UserCodeMaxLength { get; set; } = 200;
public static int SubjectIdMaxLength { get; set; } = 200;
public static int SessionIdMaxLength { get; set; } = 100;
public static int DescriptionMaxLength { get; set; } = 200;
public static int ClientIdMaxLength { get; set; } = 200;
public static int DataMaxLength { get; set; } = 50000;
}
}

6
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Devices/DeviceFlowCodesEto.cs

@ -13,10 +13,14 @@ namespace Volo.Abp.IdentityServer.Devices
public string SubjectId { get; set; }
public string SessionId { get; set; }
public string ClientId { get; set; }
public string Description { get; set; }
public DateTime? Expiration { get; set; }
public string Data { get; set; }
}
}
}

22
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Grants/PersistedGrantConsts.cs

@ -6,30 +6,40 @@
/// Default value: 200
/// </summary>
public static int KeyMaxLength { get; set; } = 200;
/// <summary>
/// Default value: 50
/// </summary>
public static int TypeMaxLength { get; set; } = 50;
/// <summary>
/// Default value: 200
/// </summary>
public static int SubjectIdMaxLength { get; set; } = 200;
/// <summary>
/// Default value: 100
/// </summary>
public static int SessionIdMaxLength { get; set; } = 100;
/// <summary>
/// Default value: 200
/// </summary>
public static int ClientIdMaxLength { get; set; } = 200;
/// <summary>
/// Default value: 200
/// </summary>
public static int DescriptionMaxLength { get; set; } = 200;
/// <summary>
/// Default value: 50000
/// </summary>
public static int DataMaxLength { get; set; } = 50000;
/// <summary>
/// Default value: 50000
/// </summary>
public static int DataMaxLengthValue { get; set; } = 50000;
}
}
}

8
modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceConsts.cs

@ -6,15 +6,15 @@
/// Default value: 200
/// </summary>
public static int NameMaxLength { get; set; } = 200;
/// <summary>
/// Default value: 200
/// </summary>
public static int DisplayNameMaxLength { get; set; } = 200;
/// <summary>
/// Default value: 200
/// Default value: 1000
/// </summary>
public static int DescriptionMaxLength { get; set; } = 1000;
}
}
}

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

Loading…
Cancel
Save