🐛 修复周日期选择器无法点击问题
- 移除CSS :has()选择器(兼容性问题) - 改用JavaScript控制.selected类 - 添加点击事件处理器 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -204,9 +204,9 @@
|
|||||||
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--md-divider); display: flex; justify-content: flex-end; gap: 8px; }
|
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--md-divider); display: flex; justify-content: flex-end; gap: 8px; }
|
||||||
|
|
||||||
.weekday-selector { display: flex; flex-wrap: wrap; gap: 8px; }
|
.weekday-selector { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||||
.weekday-chip { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--md-divider); border-radius: 999px; cursor: pointer; transition: all 0.2s; font-size: 13px; }
|
.weekday-chip { display: flex; align-items: center; gap: 4px; padding: 6px 12px; border: 1px solid var(--md-divider); border-radius: 999px; cursor: pointer; transition: all 0.2s; font-size: 13px; user-select: none; }
|
||||||
.weekday-chip:has(input:checked) { background: var(--md-primary); border-color: var(--md-primary); color: white; }
|
.weekday-chip.selected { background: var(--md-primary); border-color: var(--md-primary); color: white; }
|
||||||
.weekday-chip input { display: none; }
|
.weekday-chip input { position: absolute; opacity: 0; pointer-events: none; }
|
||||||
|
|
||||||
.account-select-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--md-divider); border-radius: 4px; }
|
.account-select-list { max-height: 200px; overflow-y: auto; border: 1px solid var(--md-divider); border-radius: 4px; }
|
||||||
.account-select-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--md-divider); }
|
.account-select-item { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-bottom: 1px solid var(--md-divider); }
|
||||||
@@ -724,6 +724,15 @@
|
|||||||
checkAccountLimit();
|
checkAccountLimit();
|
||||||
setInterval(loadStats, 30000);
|
setInterval(loadStats, 30000);
|
||||||
setupImagePreviewEvents();
|
setupImagePreviewEvents();
|
||||||
|
// 周日期选择器点击事件
|
||||||
|
document.querySelectorAll('#weekdaySelector .weekday-chip').forEach(function(chip) {
|
||||||
|
chip.addEventListener('click', function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
var input = this.querySelector('input');
|
||||||
|
input.checked = !input.checked;
|
||||||
|
this.classList.toggle('selected', input.checked);
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function initTabs() {
|
function initTabs() {
|
||||||
@@ -1270,7 +1279,10 @@
|
|||||||
document.getElementById('scheduleBrowseType').value = scheduleData ? (scheduleData.browse_type || '应读') : '应读';
|
document.getElementById('scheduleBrowseType').value = scheduleData ? (scheduleData.browse_type || '应读') : '应读';
|
||||||
document.getElementById('scheduleScreenshot').checked = scheduleData ? (scheduleData.enable_screenshot !== 0) : true;
|
document.getElementById('scheduleScreenshot').checked = scheduleData ? (scheduleData.enable_screenshot !== 0) : true;
|
||||||
const weekdays = scheduleData ? (scheduleData.weekdays || '').split(',') : ['1','2','3','4','5'];
|
const weekdays = scheduleData ? (scheduleData.weekdays || '').split(',') : ['1','2','3','4','5'];
|
||||||
document.querySelectorAll('#weekdaySelector input').forEach(function(input) { input.checked = weekdays.includes(input.value); });
|
document.querySelectorAll('#weekdaySelector input').forEach(function(input) {
|
||||||
|
input.checked = weekdays.includes(input.value);
|
||||||
|
input.parentElement.classList.toggle('selected', input.checked);
|
||||||
|
});
|
||||||
const selectedAccountIds = scheduleData ? (scheduleData.account_ids || []) : [];
|
const selectedAccountIds = scheduleData ? (scheduleData.account_ids || []) : [];
|
||||||
let accountListHtml = '';
|
let accountListHtml = '';
|
||||||
Object.values(accounts).forEach(function(acc) {
|
Object.values(accounts).forEach(function(acc) {
|
||||||
|
|||||||
Reference in New Issue
Block a user