feat(comments): 匿名评论升级为「悄悄话」——只藏内容不藏身份;fix: PJAX 瞬断自动重试
- 悄悄话:头像/昵称/头衔/等级/IP归属照常显示,仅内容对非管理员请求剥空 (F12/网络面板拿不到原文),博主后台/登录态/邮件看全文 - 开关挪进底栏 .atk-bottom-left、表情/预览按钮右边,移动端不挤; 回复悄悄话勾不勾随自己(去掉自动勾选) - 前端识别:服务端剥空后 .atk-content 为空即悄悄话(空评论会被后端拒绝、 纯表情评论有 img 不误判),无需解析 API - 邮件页面标题书名号《》保留(按用户要求) - PJAX 偶发「连不上服务器」:GET /api/v2 网络错误或 5xx 静默重试 2 次 (700ms/1800ms 退避),POST 不重试,被 abort 的请求不续命
This commit is contained in:
1 parent
215929a67f
commit
4fa592c11c
7 files changed
+183
-60
No files matched your search
@@ -4202,37 +4202,62 @@ input[type=submit] {
|
||||
|
||||
/* Back to Top Button */
|
||||
/* 匿名评论开关:插在 textarea 与底栏之间的独立一行(右对齐),不挤底栏 */
|
||||
.atk-anon-toggle {
|
||||
display: flex;
|
||||
/* 悄悄话开关:底栏左侧(.atk-bottom-left)内、表情/预览按钮右边;
|
||||
短文案 + 小 checkbox,与图标按钮同一行,移动端窄屏也不挤不换行 */
|
||||
.atk-whisper-toggle {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 5px;
|
||||
padding: 0 10px 6px;
|
||||
gap: 4px;
|
||||
margin-left: 10px;
|
||||
font-size: 12px;
|
||||
color: #9b9b9b;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.atk-anon-toggle input {
|
||||
.atk-whisper-toggle input {
|
||||
margin: 0;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
cursor: pointer;
|
||||
accent-color: #373737;
|
||||
}
|
||||
.atk-anon-toggle:hover {
|
||||
.atk-whisper-toggle:hover {
|
||||
color: #555;
|
||||
}
|
||||
[data-theme="dark"] .atk-anon-toggle {
|
||||
[data-theme="dark"] .atk-whisper-toggle {
|
||||
color: #8a8f98;
|
||||
}
|
||||
[data-theme="dark"] .atk-anon-toggle:hover {
|
||||
[data-theme="dark"] .atk-whisper-toggle:hover {
|
||||
color: #c3c7cd;
|
||||
}
|
||||
[data-theme="dark"] .atk-anon-toggle input {
|
||||
[data-theme="dark"] .atk-whisper-toggle input {
|
||||
accent-color: #d1d5db;
|
||||
}
|
||||
@media (max-width: 480px) {
|
||||
.atk-whisper-toggle { margin-left: 8px; gap: 3px; }
|
||||
}
|
||||
|
||||
/* 悄悄话评论:服务端已把内容从公开接口剥空,这里只画观感占位(浅灰小圆角条) */
|
||||
.atk-whisper-note {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 7px 13px;
|
||||
margin: 2px 0 4px;
|
||||
border-radius: 9px;
|
||||
background: rgba(134, 142, 150, 0.09);
|
||||
color: #8a8e98;
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
[data-theme="dark"] .atk-whisper-note {
|
||||
background: rgba(255, 255, 255, 0.06);
|
||||
color: #8a8f98;
|
||||
}
|
||||
|
||||
/* 表情面板「最近使用」栏:面板顶部横向一行,移动端可横滑 */
|
||||
.atk-recent-emoticons {
|
||||
|
||||
Reference in new issue
Block a user