移除 评论加载方式 配置项

This commit is contained in:
j m 2024-12-25 20:18:11 +08:00
parent 6ce6e17faa
commit e07557becc
5 changed files with 27 additions and 92 deletions

View File

@ -1350,16 +1350,6 @@ spec:
label: 开启
- value: false
label: 关闭
- $formkit: radio
name: enable_comment_type
label: 评论加载方式
value: true
help: '在使用Halo评论组件时建议您关闭Pjax加载功能以获得最佳体验。同时Halo评论组件支持评论插件的新特性。而对于Web评论组件它支持Pjax加载但请注意部分新特性可能不被Web评论组件所支持。'
options:
- value: true
label: Halo评论组件
- value: false
label: Web评论组件
- $formkit: radio
name: effects_lantern_mode
id: effects_lantern_mode

View File

@ -49,27 +49,6 @@
</div>
<div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}">
<h3 class="comment-title">评论</h3>
<th:block th:unless="${theme.config.enhance.enable_comment_type}">
<th:block th:if="${theme.config.page_config.link_enable_comment == 'custom'}">
<comment-widget
group="content.halo.run"
kind="SinglePage"
version="v1alpha1"
th:name="${theme.config.page_config.link_comment_id}"
with-replies="false"
></comment-widget>
</th:block>
<th:block th:if="${theme.config.page_config.link_enable_comment != 'custom'}">
<comment-widget
group="plugin.halo.run"
kind="Plugin"
version="v1alpha1"
th:name="${pluginName}"
with-replies="false"
></comment-widget>
</th:block>
</th:block>
<th:block th:if="${theme.config.enhance.enable_comment_type}">
<th:block th:if="${theme.config.page_config.link_enable_comment == 'custom'}">
<halo:comment
group="content.halo.run"
@ -84,7 +63,6 @@
th:attr="name=${pluginName}"
/>
</th:block>
</th:block>
</div>
</th:block>
</th:block>

View File

@ -98,21 +98,10 @@
<div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}">
<h3 class="comment-title">评论</h3>
<th:block th:unless="${theme.config.enhance.enable_comment_type}">
<comment-widget
group="content.halo.run"
th:kind="${type}"
version="v1alpha1"
th:name="${post.metadata.name}"
with-replies="false"
></comment-widget>
</th:block>
<th:block th:if="${theme.config.enhance.enable_comment_type}">
<halo:comment
group="content.halo.run"
th:kind="${type}"
th:attr="name=${post.metadata.name}"
/>
</th:block>
</div>
</th:block>

View File

@ -57,22 +57,11 @@
</div>
</div>
<div class="journal-comment comment-wrapper-z-index" th:if="${enableComment}">
<th:block th:unless="${theme.config.enhance.enable_comment_type}">
<comment-widget
group="moment.halo.run"
kind="Moment"
version="v1alpha1"
th:name="${moment.metadata.name}"
with-replies="false"
></comment-widget>
</th:block>
<th:block th:if="${theme.config.enhance.enable_comment_type}">
<halo:comment
group="moment.halo.run"
kind="Moment"
th:attr="name=${moment.metadata.name}"
/>
</th:block>
</div>
</div>

View File

@ -68,22 +68,11 @@
</div>
</div>
<div class="journal-comment comment-wrapper-z-index" th:if="${enableComment}">
<th:block th:unless="${theme.config.enhance.enable_comment_type}">
<comment-widget
group="moment.halo.run"
kind="Moment"
version="v1alpha1"
th:name="${moment.metadata.name}"
with-replies="false"
></comment-widget>
</th:block>
<th:block th:if="${theme.config.enhance.enable_comment_type}">
<halo:comment
group="moment.halo.run"
kind="Moment"
th:attr="name=${moment.metadata.name}"
/>
</th:block>
</div>
</div>
<th:block th:replace="~{main/pagination :: pagination (${moments}, '/moments')}"/>