feat: 添加点击标签切换隐私状态功能,提升用户交互体验

This commit is contained in:
2025-09-10 13:01:56 +08:00
parent 2bf6c50c68
commit eb66a51051

View File

@ -78,7 +78,7 @@ export function CommentInput(
checked={isPrivate} checked={isPrivate}
onCheckedChange={checked => setIsPrivate(checked === true)} onCheckedChange={checked => setIsPrivate(checked === true)}
/> />
<Label>{t("private")}</Label> <Label onClick={() => setIsPrivate(prev => !prev)}>{t("private")}</Label>
</div> </div>
<button onClick={handleCommentSubmit} className="px-2 py-1 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors fade-in-up"> <button onClick={handleCommentSubmit} className="px-2 py-1 bg-blue-500 text-white rounded-md hover:bg-blue-600 transition-colors fade-in-up">
{isUpdate ? t("update") : t("submit")} {isUpdate ? t("update") : t("submit")}