fix(comments): show name/email/url fields in reply form
This commit is contained in:
parent
ec2f3e313e
commit
880c53d2a4
@ -38,53 +38,50 @@ pub fn CommentForm(post_id: i32, parent_id: Option<i64>) -> Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div { class: "space-y-3",
|
div { class: "space-y-3",
|
||||||
if !is_reply {
|
div { class: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
||||||
div { class: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
div {
|
||||||
div {
|
label { class: "block text-sm font-medium text-paper-secondary mb-1",
|
||||||
label { class: "block text-sm font-medium text-paper-secondary mb-1",
|
"昵称 *"
|
||||||
"昵称 *"
|
|
||||||
}
|
|
||||||
input {
|
|
||||||
class: INPUT_CLASS,
|
|
||||||
r#type: "text",
|
|
||||||
placeholder: "你的昵称",
|
|
||||||
value: "{author_name}",
|
|
||||||
disabled: submitting(),
|
|
||||||
oninput: move |e| author_name.set(e.value()),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
div {
|
input {
|
||||||
label { class: "block text-sm font-medium text-paper-secondary mb-1",
|
class: INPUT_CLASS,
|
||||||
"邮箱 *"
|
r#type: "text",
|
||||||
}
|
placeholder: "你的昵称",
|
||||||
input {
|
value: "{author_name}",
|
||||||
class: INPUT_CLASS,
|
disabled: submitting(),
|
||||||
r#type: "email",
|
oninput: move |e| author_name.set(e.value()),
|
||||||
placeholder: "your@email.com",
|
|
||||||
value: "{author_email}",
|
|
||||||
disabled: submitting(),
|
|
||||||
oninput: move |e| author_email.set(e.value()),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
div {
|
div {
|
||||||
label { class: "block text-sm font-medium text-paper-secondary mb-1",
|
label { class: "block text-sm font-medium text-paper-secondary mb-1",
|
||||||
"网站"
|
"邮箱 *"
|
||||||
}
|
}
|
||||||
input {
|
input {
|
||||||
class: INPUT_CLASS,
|
class: INPUT_CLASS,
|
||||||
r#type: "url",
|
r#type: "email",
|
||||||
placeholder: "https://example.com(可选)",
|
placeholder: "your@email.com",
|
||||||
value: "{author_url}",
|
value: "{author_email}",
|
||||||
disabled: submitting(),
|
disabled: submitting(),
|
||||||
oninput: move |e| author_url.set(e.value()),
|
oninput: move |e| author_email.set(e.value()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
div {
|
||||||
|
label { class: "block text-sm font-medium text-paper-secondary mb-1",
|
||||||
|
"网站"
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
class: INPUT_CLASS,
|
||||||
|
r#type: "url",
|
||||||
|
placeholder: "https://example.com(可选)",
|
||||||
|
value: "{author_url}",
|
||||||
|
disabled: submitting(),
|
||||||
|
oninput: move |e| author_url.set(e.value()),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
class: "{INPUT_CLASS} min-h-[100px] resize-y",
|
class: "{INPUT_CLASS} min-h-[100px] resize-y",
|
||||||
placeholder: "写下你的评论…",
|
|
||||||
value: "{content_md}",
|
value: "{content_md}",
|
||||||
disabled: submitting(),
|
disabled: submitting(),
|
||||||
oninput: move |e| content_md.set(e.value()),
|
oninput: move |e| content_md.set(e.value()),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user