Initial commit: gamer project

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
lizhilun
2026-03-12 11:23:10 +08:00
co-authored by Claude Opus 4.6
commit a0d7bfdc3d
26 changed files with 5410 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
let pickerYear = currentYear;
let pickerMonth = currentMonth;
function openMonthPicker() {
pickerYear = currentYear;
pickerMonth = currentMonth;
renderMonthPicker();
document.getElementById('monthPickerOverlay').classList.add('show');
}
function closeMonthPicker() {
document.getElementById('monthPickerOverlay').classList.remove('show');
}
function changePickerYear(delta) {
pickerYear += delta;
renderMonthPicker();
}
function renderMonthPicker() {
document.getElementById('pickerYearDisplay').textContent = pickerYear;
const grid = document.getElementById('pickerMonthGrid');
grid.innerHTML = '';
for (let m = 1; m <= 12; m++) {
const btn = document.createElement('button');
btn.textContent = m + '月';
if (m === pickerMonth) btn.classList.add('active');
btn.onclick = () => {
pickerMonth = m;
grid.querySelectorAll('button').forEach(b => b.classList.remove('active'));
btn.classList.add('active');
};
grid.appendChild(btn);
}
}
function confirmMonth() {
currentYear = pickerYear;
currentMonth = pickerMonth;
updateMonthDisplay();
closeMonthPicker();
loadStats();
}