Skip to content

Commit

Permalink
remove DisharmonyWords settings
Browse files Browse the repository at this point in the history
  • Loading branch information
EdiWang committed Oct 7, 2023
1 parent 0b5bed9 commit 5934219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
6 changes: 0 additions & 6 deletions src/Moonglade.Configuration/ContentSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ public class ContentSettings : IBlogSettings
[Range(0, 65536)]
public int CloseCommentAfterDays { get; set; }

[DataType(DataType.MultilineText)]
[Display(Name = "Blocked words")]
[MaxLength(2048)]
public string DisharmonyWords { get; set; } = string.Empty;

[Display(Name = "Enable word filter")]
public bool EnableWordFilter { get; set; }

Expand Down Expand Up @@ -84,7 +79,6 @@ public class ContentSettings : IBlogSettings
EnableWordFilter = false,
PostListPageSize = 10,
HotTagAmount = 10,
DisharmonyWords = "fuck|shit",
CalloutSectionHtmlPitch = string.Empty
};
}
Expand Down
16 changes: 3 additions & 13 deletions src/Moonglade.Web/Pages/Settings/Content.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
</div>
<div class="col">
<label asp-for="@settings.EnableWordFilter" class="form-check-label"></label>
<div class="form-text">Please follow <a href="https://github.com/EdiWang/Moonglade.ContentSecurity" target="_blank">instruction</a> to setup content security function</div>
</div>
<div class="col-md-5 text-end">
<div class="form-check form-switch form-control-lg">
Expand All @@ -163,6 +164,7 @@
</div>
<div class="col">
<label asp-for="@settings.WordFilterMode" class="me-4"></label>
<div class="form-text">@SharedLocalizer["Blocked words will be masked as * in content."]</div>
</div>
<div class="col-md-5 text-end">
<div class="form-check form-check-inline">
Expand All @@ -175,18 +177,6 @@
</div>
</div>
</div>

<div class="mb-2">
<div class="form-floating">
<textarea asp-for="@settings.DisharmonyWords"
placeholder="@Html.DisplayNameFor(m => settings.DisharmonyWords)"
class="form-control form-control-sm h-200px"
spellcheck="false"></textarea>
<label class="form-label" asp-for="@settings.DisharmonyWords"></label>
</div>

<small class="form-text text-muted">@SharedLocalizer["Blocked words will be masked as *** in comment content."]</small>
</div>
</div>

<div class="comment-settings-3rd">
Expand Down Expand Up @@ -276,7 +266,7 @@
</div>
</div>
</div>

<div class="settings-entry2 row align-items-center py-3 px-2 rounded-3 shadow-sm border bg-white mb-2">
<div class="col-auto">
<i class="bi-alarm settings-entry-icon"></i>
Expand Down

0 comments on commit 5934219

Please sign in to comment.