Skip to content

Commit

Permalink
Release 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
duguankui committed Oct 4, 2024
1 parent 204fdea commit 5483b4b
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 9 deletions.
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>2.0.0-rc.9</Version>
<Version>2.0.0</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<PackageIconUrl>https://dignite.com/assets/dignite_nupkg.png</PackageIconUrl>
<PackageProjectUrl>https://dignite.com/dignite-cms</PackageProjectUrl>
Expand Down
Binary file modified nupkg/0
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Dignite.Cms.Admin.Domains
{
public interface IDomainAdminAppService: IApplicationService
{
Task<DomainDto> FindByNameAsync(string domainName);
Task<bool> NameExistsAsync(string domainName);

Task<DomainDto> GetBoundAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@ public DomainAdminAppService(IDomainRepository domainRepository, DomainManager d
_dataFilter = dataFilter;
}

[AllowAnonymous]
public async Task<DomainDto> FindByNameAsync(string domainName)
{
using (_dataFilter.Disable<IMultiTenant>())
{
var domain = await _domainRepository.FindByNameAsync(domainName);

return ObjectMapper.Map<Domain, DomainDto>(domain);
}
}

public async Task<DomainDto> GetBoundAsync()
{
var boundDomain = await _domainRepository.FindByTenantIdAsync(CurrentTenant.Id.Value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ namespace Dignite.Cms.Admin.Domains;
[ExposeServices(typeof(IDomainAdminAppService), typeof(DomainAdminClientProxy))]
public partial class DomainAdminClientProxy : ClientProxyBase<IDomainAdminAppService>, IDomainAdminAppService
{
public virtual async Task<DomainDto> FindByNameAsync(string domainName)
{
return await RequestAsync<DomainDto>(nameof(FindByNameAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), domainName }
});
}

public virtual async Task<DomainDto> GetBoundAsync()
{
return await RequestAsync<DomainDto>(nameof(GetBoundAsync));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"uniqueName": "GetDefaultLanguageAsync",
"name": "GetDefaultLanguageAsync",
"httpMethod": "GET",
"url": "api/cms-Admin/site-settings/default-language",
"url": "api/cms-admin/site-settings/default-language",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
Expand All @@ -63,7 +63,7 @@
"uniqueName": "GetAllLanguagesAsync",
"name": "GetAllLanguagesAsync",
"httpMethod": "GET",
"url": "api/cms-Admin/site-settings/all-languages",
"url": "api/cms-admin/site-settings/all-languages",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
Expand All @@ -78,7 +78,7 @@
"uniqueName": "GetBrandAsync",
"name": "GetBrandAsync",
"httpMethod": "GET",
"url": "api/cms-Admin/site-settings/brand",
"url": "api/cms-admin/site-settings/brand",
"supportedVersions": [],
"parametersOnMethod": [],
"parameters": [],
Expand Down Expand Up @@ -2576,6 +2576,23 @@
"type": "Dignite.Cms.Admin.Domains.IDomainAdminAppService",
"name": "IDomainAdminAppService",
"methods": [
{
"name": "FindByNameAsync",
"parametersOnMethod": [
{
"name": "domainName",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"returnValue": {
"type": "Dignite.Cms.Admin.Domains.DomainDto",
"typeSimple": "Dignite.Cms.Admin.Domains.DomainDto"
}
},
{
"name": "NameExistsAsync",
"parametersOnMethod": [
Expand Down Expand Up @@ -2622,6 +2639,43 @@
}
],
"actions": {
"FindByNameAsyncByDomainName": {
"uniqueName": "FindByNameAsyncByDomainName",
"name": "FindByNameAsync",
"httpMethod": "GET",
"url": "api/cms-admin/domains/find-by-name",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "domainName",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
}
],
"parameters": [
{
"nameOnMethod": "domainName",
"name": "domainName",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
}
],
"returnValue": {
"type": "Dignite.Cms.Admin.Domains.DomainDto",
"typeSimple": "Dignite.Cms.Admin.Domains.DomainDto"
},
"allowAnonymous": null,
"implementFrom": "Dignite.Cms.Admin.Domains.IDomainAdminAppService"
},
"GetBoundAsync": {
"uniqueName": "GetBoundAsync",
"name": "GetBoundAsync",
Expand All @@ -2634,7 +2688,7 @@
"type": "Dignite.Cms.Admin.Domains.DomainDto",
"typeSimple": "Dignite.Cms.Admin.Domains.DomainDto"
},
"allowAnonymous": false,
"allowAnonymous": null,
"implementFrom": "Dignite.Cms.Admin.Domains.IDomainAdminAppService"
},
"NameExistsAsyncByDomainName": {
Expand Down Expand Up @@ -2671,7 +2725,7 @@
"type": "System.Boolean",
"typeSimple": "boolean"
},
"allowAnonymous": false,
"allowAnonymous": null,
"implementFrom": "Dignite.Cms.Admin.Domains.IDomainAdminAppService"
},
"UpdateAsyncByInput": {
Expand Down Expand Up @@ -2708,7 +2762,7 @@
"type": "Dignite.Cms.Admin.Domains.DomainDto",
"typeSimple": "Dignite.Cms.Admin.Domains.DomainDto"
},
"allowAnonymous": false,
"allowAnonymous": null,
"implementFrom": "Dignite.Cms.Admin.Domains.IDomainAdminAppService"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ public DomainAdminController(IDomainAdminAppService entryAppService)
_entryAppService = entryAppService;
}

[HttpGet]
[Route("find-by-name")]
public async Task<DomainDto> FindByNameAsync(string domainName)
{
return await _entryAppService.FindByNameAsync(domainName);
}

[HttpGet]
[Route("bound")]
public async Task<DomainDto> GetBoundAsync()
Expand Down
10 changes: 8 additions & 2 deletions src/Dignite.Cms.Public.Web/Views/Shared/Fields/TextEdit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,11 @@
@{
var configuration = new TextEditConfiguration(Model.Field.FormConfiguration);
}

@Model.Entry.GetField(Model.Field.Name)
@if (configuration.Mode == TextEditMode.MultipleLine)
{
<p style="white-space: pre-wrap;">@Model.Entry.GetField(Model.Field.Name)</p>
}
else
{
@Model.Entry.GetField(Model.Field.Name)
}

0 comments on commit 5483b4b

Please sign in to comment.