Remove primary indicator dot from multi-month selection
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
3553ff6258
commit
95fea028d8
15
app.js
15
app.js
@ -1829,7 +1829,7 @@ async function renderSelectedMonths() {
|
||||
}
|
||||
|
||||
// Scroll to show the current navigation month
|
||||
const activeBtn = document.querySelector('.month-btn.primary') || document.querySelector('.month-btn.active');
|
||||
const activeBtn = document.querySelector('.month-btn.active');
|
||||
if (activeBtn) {
|
||||
activeBtn.scrollIntoView({ behavior: 'smooth', inline: 'center', block: 'nearest' });
|
||||
}
|
||||
@ -1940,24 +1940,13 @@ async function selectMonth(index) {
|
||||
function updateMonthNavigator() {
|
||||
// Update button active states
|
||||
const buttons = document.querySelectorAll('.month-btn');
|
||||
const isMultiSelect = selectedMonthIndices.size > 1;
|
||||
|
||||
buttons.forEach((btn, index) => {
|
||||
const isSelected = selectedMonthIndices.has(index);
|
||||
const isPrimary = index === currentMonthIndex;
|
||||
|
||||
if (isSelected) {
|
||||
if (selectedMonthIndices.has(index)) {
|
||||
btn.classList.add('active');
|
||||
} else {
|
||||
btn.classList.remove('active');
|
||||
}
|
||||
|
||||
// Primary class indicates current navigation position in multi-select
|
||||
if (isMultiSelect && isPrimary) {
|
||||
btn.classList.add('primary');
|
||||
} else {
|
||||
btn.classList.remove('primary');
|
||||
}
|
||||
});
|
||||
|
||||
// Update arrow disabled states
|
||||
|
||||
17
styles.css
17
styles.css
@ -95,23 +95,6 @@ body {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* Primary indicator for current navigation position in multi-select */
|
||||
.month-btn.active.primary {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.month-btn.active.primary::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: white;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.month-preview {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user