Skip to content

Commit 836fc5b

Browse files
committed
As we are updating the Site.Config I am bumping the version number.
Added support for saving the new site.config values.
1 parent e425720 commit 836fc5b

File tree

8 files changed

+23
-4
lines changed

8 files changed

+23
-4
lines changed

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pool:
1010

1111
variables:
1212
buildConfiguration: 'Release'
13-
version: 2.40
13+
version: 2.41
1414

1515
steps:
1616
- task: UseDotNet@2

source/DasBlog.Services/ConfigFile/Interfaces/ISiteConfig.cs

+2
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ public interface ISiteConfig
346346

347347
string SecurityStyleSources { get; set; }
348348

349+
string DefaultSources { get; set; }
350+
349351
bool CookieConsentEnabled { get; set; }
350352

351353
bool EnableDoubleDecode { get; set; }

source/DasBlog.Services/ConfigFile/SiteConfig.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,9 @@ public SiteConfig() { }
215215
public string SecurityScriptSources { get; set; }
216216

217217
public string SecurityStyleSources { get; set; }
218-
public bool EnableDoubleDecode { get; set; }
218+
219+
public string DefaultSources { get; set; }
220+
221+
public bool EnableDoubleDecode { get; set; }
219222
}
220223
}

source/DasBlog.Services/DasBlog.Services.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<Version>2.40.0</Version>
5+
<Version>3.0.0</Version>
66
</PropertyGroup>
77
<ItemGroup>
88
<ProjectReference Include="..\DasBlog.Web.Core\DasBlog.Core.csproj" />

source/DasBlog.Tests/UnitTests/SiteConfigTest.cs

+1
Original file line numberDiff line numberDiff line change
@@ -166,5 +166,6 @@ public class SiteConfigTest : ISiteConfig
166166

167167
public string SecurityStyleSources { get; set; }
168168
public bool EnableDoubleDecode { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
169+
public string DefaultSources { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
169170
}
170171
}

source/DasBlog.Web.UI/DasBlog.Web.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<AddRazorSupportForMvc>true</AddRazorSupportForMvc>
1515
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
1616
<UserSecretsId>d3583964-0aca-4de4-9521-c74cdf42f990</UserSecretsId>
17-
<Version>2.40.0</Version>
17+
<Version>2.41.0</Version>
1818
</PropertyGroup>
1919
<ItemGroup>
2020
<PackageReference Include="AutoMapper" Version="9.0.0" />

source/DasBlog.Web.UI/Models/AdminViewModels/SiteViewModel.cs

+5
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,11 @@ public class SiteViewModel
286286
[Description("")]
287287
public bool EnableDoubleDecode { get; set; }
288288

289+
[DisplayName("Default Sources (seperated by semi colon")]
290+
[Description("")]
291+
[StringLength(50, MinimumLength = 1, ErrorMessage = "{0} should be between 1 to 50 characters")]
292+
public string DefaultSources { get; set; }
293+
289294
public bool EntryTitleAsLink { get; set; }
290295
public bool ObfuscateEmail { get; set; }
291296
public bool SendReferralsByEmail { get; set; }

source/DasBlog.Web.UI/Views/Admin/Settings.cshtml

+8
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,14 @@
560560

561561
</div>
562562

563+
<div class="dbc-form-group row">
564+
565+
@Html.LabelFor(m => @Model.SiteConfig.DefaultSources, null, new { @class = "dbc-col-form-label col-3" })
566+
@Html.TextBoxFor(m => @Model.SiteConfig.DefaultSources, null, new { @class = "form-control col-9" })
567+
@Html.ValidationMessageFor(m => m.SiteConfig.DefaultSources, null, new { @class = "text-danger" })
568+
569+
</div>
570+
563571
<hr />
564572

565573
<div class="form-group">

0 commit comments

Comments
 (0)