diff --git a/build.gradle b/build.gradle
index d31f0ae..332b3e8 100644
--- a/build.gradle
+++ b/build.gradle
@@ -41,5 +41,5 @@ build {
}
halo {
- version = "2.13.0"
+ version = "2.14.0"
}
diff --git a/packages/comment-widget/package.json b/packages/comment-widget/package.json
index 09ce2ce..70fa85d 100644
--- a/packages/comment-widget/package.json
+++ b/packages/comment-widget/package.json
@@ -34,7 +34,7 @@
},
"dependencies": {
"@emoji-mart/data": "^1.1.2",
- "@halo-dev/api-client": "^2.13.0",
+ "@halo-dev/api-client": "^2.14.0",
"@lit/context": "^1.1.0",
"dayjs": "^1.11.10",
"emoji-mart": "^5.5.2",
diff --git a/packages/comment-widget/src/comment-replies.ts b/packages/comment-widget/src/comment-replies.ts
index db8b81c..b975551 100644
--- a/packages/comment-widget/src/comment-replies.ts
+++ b/packages/comment-widget/src/comment-replies.ts
@@ -1,5 +1,5 @@
import { CommentVo, ReplyVo, ReplyVoList } from '@halo-dev/api-client';
-import { LitElement, css, html } from 'lit';
+import { css, html, LitElement } from 'lit';
import { property, state } from 'lit/decorators.js';
import { repeat } from 'lit/directives/repeat.js';
import { consume } from '@lit/context';
@@ -50,7 +50,7 @@ export class CommentReplies extends LitElement {
toastManager: ToastManager | undefined;
override render() {
- return html`
+ return html`
${this.replies.length
? html`
@@ -58,7 +58,7 @@ export class CommentReplies extends LitElement {
this.replies,
(item) => item.metadata.name,
(item) =>
- html`
`
: ''}
- ${this.loading ? html`` : ''}
+ ${this.loading ? html` ` : ''}
${this.hasNext && !this.loading
- ? html`
+ ? html`
`
: ''}
@@ -123,7 +123,7 @@ export class CommentReplies extends LitElement {
async fetchNext() {
this.page++;
- this.fetchReplies({ append: true });
+ await this.fetchReplies({ append: true });
}
override connectedCallback(): void {
diff --git a/packages/comment-widget/src/comment-widget.ts b/packages/comment-widget/src/comment-widget.ts
index 862930c..66ed188 100644
--- a/packages/comment-widget/src/comment-widget.ts
+++ b/packages/comment-widget/src/comment-widget.ts
@@ -1,4 +1,4 @@
-import { LitElement, css, html } from 'lit';
+import { css, html, LitElement } from 'lit';
import { property, state } from 'lit/decorators.js';
import { CommentVoList, User } from '@halo-dev/api-client';
import { repeat } from 'lit/directives/repeat.js';
@@ -44,13 +44,19 @@ export class CommentWidget extends LitElement {
@property({ type: String })
name = '';
+ @property({ type: Number, attribute: 'size' })
+ size: number = 20;
+
+ @provide({ context: replySizeContext })
+ @property({ type: Number, attribute: 'reply-size' })
+ replySize: number = 10;
+
@provide({ context: withRepliesContext })
@property({ type: Boolean, attribute: 'with-replies' })
withReplies = false;
- @provide({ context: replySizeContext })
- @property({ type: Number, attribute: 'reply-size' })
- replySize = 10;
+ @property({ type: Number, attribute: 'with-reply-size' })
+ withReplySize = 10;
@provide({ context: emojiDataUrlContext })
@property({ type: String, attribute: 'emoji-data-url' })
@@ -93,12 +99,12 @@ export class CommentWidget extends LitElement {
}
override render() {
- return html`