feat(widget): 添加评论图片灯箱预览功能

- 新增 ImagePreview 组件用于全屏查看评论中的图片
- 在功能设置中添加图片灯箱模式开关选项
- 扩展媒体元素样式限制,支持视频和 iframe 的尺寸控制
- 更新前后端 API 以支持 enableImageLightbox 配置项
- 优化设置页面布局,使用卡片式分组展示功能项
This commit is contained in:
anghunk
2026-02-06 17:22:46 +08:00
parent 1becce7092
commit c59af44e2a
9 changed files with 281 additions and 20 deletions

View File

@@ -25,6 +25,10 @@ export const updateFeatureSettings = async (c: Context<{ Bindings: Bindings }>)
typeof body.enableArticleLike === 'boolean'
? body.enableArticleLike
: undefined;
const enableImageLightbox =
typeof body.enableImageLightbox === 'boolean'
? body.enableImageLightbox
: undefined;
const rawCommentPlaceholder =
typeof body.commentPlaceholder === 'string' ? body.commentPlaceholder : undefined;
const commentPlaceholder =
@@ -37,6 +41,7 @@ export const updateFeatureSettings = async (c: Context<{ Bindings: Bindings }>)
await saveFeatureSettings(c.env, {
enableCommentLike,
enableArticleLike,
enableImageLightbox,
commentPlaceholder,
visibleDomains
});