diff --git a/settings.yaml b/settings.yaml index a298999..8dd55ce 100644 --- a/settings.yaml +++ b/settings.yaml @@ -1027,13 +1027,24 @@ spec: help: '友链页面最低部的补充说明信息,支持 HTML 格式。' - $formkit: radio name: link_enable_comment + id: link_enable_comment label: 友链页面-开启评论区 + help: '当链接插件版本>=1.4.0时,将内置评论区ID。为保留历史评论数据,可选择“开启并自定义评论区ID”选项。' value: true options: - value: true label: 开启 + - value: custom + label: 开启并自定义评论区ID - value: false label: 关闭 + - $formkit: singlePageSelect + name: link_comment_id + if: $get(link_enable_comment).value == 'custom' + label: 友链页面-评论区ID + validation: required + placeholder: '请选择一个页面作为友链页面的评论区ID' + help: '指定一个“自定义页面”用于友链页面的评论区ID,被指定的页面评论区将作为友链的评论区。' - $formkit: radio name: enable_tags_tag_color label: 标签页面-开启标签颜色 diff --git a/templates/links.html b/templates/links.html index ef9a08c..8be17cb 100644 --- a/templates/links.html +++ b/templates/links.html @@ -1,7 +1,7 @@ + th:with="baseEnableComment = ${theme.config.page_config.link_enable_comment == true || (!#strings.isEmpty(theme.config.page_config.link_comment_id) && theme.config.page_config.link_enable_comment == 'custom')}">
@@ -50,20 +50,40 @@

评论

- + + + + + + - + + + + + +
diff --git a/theme.yaml b/theme.yaml index 0479e45..cf2f51b 100644 --- a/theme.yaml +++ b/theme.yaml @@ -30,7 +30,7 @@ spec: settingName: theme-dream2-plus-setting configMapName: theme-dream2-plus-configMap # 版本号 - version: 0.0.0.15 + version: 0.0.0.17 # 最低支持的 Halo 版本 require: ">=2.15.0" # 许可