From f49f1f157efd3c1f0324bbf03ed6c8c7e07b3ed6 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Thu, 8 Aug 2024 18:56:37 +0800 Subject: [PATCH] fix: display captcha only when anonymous comments are allowed (#148) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复不允许匿名评论时,也显示验证码的问题。当前仅匿名评论需要验证码。 /kind bug Fixes #146 ```release-note 修复不允许匿名评论时,也显示验证码的问题。 ``` --- build.gradle | 2 +- packages/comment-widget/src/base-form.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index d6c7d09..2f2a1e0 100644 --- a/build.gradle +++ b/build.gradle @@ -41,6 +41,6 @@ build { } halo { - version = "2.15.0-rc.1" + version = "2.18.0" debug = true } diff --git a/packages/comment-widget/src/base-form.ts b/packages/comment-widget/src/base-form.ts index 95fe835..1245158 100644 --- a/packages/comment-widget/src/base-form.ts +++ b/packages/comment-widget/src/base-form.ts @@ -74,7 +74,7 @@ export class BaseForm extends LitElement { } get showCaptcha() { - return this.captchaEnabled && !this.currentUser; + return this.captchaEnabled && !this.currentUser && this.allowAnonymousComments; } async handleFetchCaptcha() {