feat: 新增评论框提示文案自定义功能并优化侧边栏排序
- 新增评论框提示文案(placeholder)自定义功能,支持在后台设置 - 更新文档:重命名“点赞开关”为“功能开关”,调整侧边栏排序 - 优化前端组件,统一处理评论表单和回复编辑器的提示文案 - 修复CSS样式,确保操作按钮始终可见
This commit is contained in:
@@ -25,10 +25,15 @@ export const updateFeatureSettings = async (c: Context<{ Bindings: Bindings }>)
|
||||
typeof body.enableArticleLike === 'boolean'
|
||||
? body.enableArticleLike
|
||||
: undefined;
|
||||
const rawCommentPlaceholder =
|
||||
typeof body.commentPlaceholder === 'string' ? body.commentPlaceholder : undefined;
|
||||
const commentPlaceholder =
|
||||
rawCommentPlaceholder !== undefined ? rawCommentPlaceholder.trim() : undefined;
|
||||
|
||||
await saveFeatureSettings(c.env, {
|
||||
enableCommentLike,
|
||||
enableArticleLike
|
||||
enableArticleLike,
|
||||
commentPlaceholder
|
||||
});
|
||||
|
||||
return c.json({ message: '保存成功!' });
|
||||
|
||||
Reference in New Issue
Block a user