Compare commits

..

2 Commits

Author SHA1 Message Date
b5b9f7db06 fdasfae 2026-03-03 17:10:39 +08:00
8660bbc348 Add .claude/settings.local.json and instance/database.db to .gitignore 2026-03-03 16:17:40 +08:00
4 changed files with 35 additions and 4 deletions

View File

@@ -23,7 +23,11 @@
"Bash(cd \"D:/360MoveData/Users/HEIHAHA/Documents/WeChat Files/wxid_k0iaj5miuryq22/FileStorage/File/2026-02/超级大网站2月23号\" && py -3 -c \"\nimport os, glob\ntemplates = glob.glob\\('templates/*.html'\\)\ncount = 0\nfor f in templates:\n with open\\(f, 'r', encoding='utf-8'\\) as fh:\n content = fh.read\\(\\)\n if '联考平台' in content:\n new_content = content.replace\\('联考平台', '智联青云'\\)\n with open\\(f, 'w', encoding='utf-8'\\) as fh:\n fh.write\\(new_content\\)\n count += 1\n print\\(f' replaced in {f}'\\)\nprint\\(f'Done: {count} files updated'\\)\n\" 2>&1)",
"Bash(git stash:*)",
"Bash(git pull:*)",
"Bash(iconv:*)"
"Bash(iconv:*)",
"Bash(git add:*)",
"Bash(git push)",
"Bash(git commit:*)",
"Bash(git push:*)"
]
}
}

3
.gitignore vendored
View File

@@ -7,4 +7,5 @@ venv/
dist/
build/
node_modules/
model/
model/
.claude/settings.local.json

Binary file not shown.

View File

@@ -196,6 +196,26 @@
<!-- 通知面板脚本 -->
<script>
(function(){
let lastNotifCount = -1;
const notifSound = new Audio('data:audio/wav;base64,UklGRl9vT19teleQBAAAAAABAAEARKwAAIhYAQACABAAZGF0YU' + 'tvT19t');
// 创建通知提示音(简短的叮咚声)
function playNotifSound() {
try {
const ctx = new (window.AudioContext || window.webkitAudioContext)();
const osc = ctx.createOscillator();
const gain = ctx.createGain();
osc.connect(gain);
gain.connect(ctx.destination);
osc.frequency.setValueAtTime(880, ctx.currentTime);
osc.frequency.setValueAtTime(1100, ctx.currentTime + 0.1);
gain.gain.setValueAtTime(0.3, ctx.currentTime);
gain.gain.exponentialRampToValueAtTime(0.01, ctx.currentTime + 0.3);
osc.start(ctx.currentTime);
osc.stop(ctx.currentTime + 0.3);
} catch(e) {}
}
function toggleNotifPanel() {
const panel = document.getElementById('notifPanel');
panel.classList.toggle('hidden');
@@ -217,9 +237,14 @@
if (d.count > 0) {
badge.textContent = d.count > 99 ? '99+' : d.count;
badge.classList.remove('hidden');
// 有新通知时播放声音
if (lastNotifCount >= 0 && d.count > lastNotifCount) {
playNotifSound();
}
} else {
badge.classList.add('hidden');
}
lastNotifCount = d.count;
}).catch(()=>{});
}
updateNotifBadge();
@@ -274,11 +299,12 @@
}
function markRead(nid, el) {
fetch(`/api/notifications/${nid}/read`, {method:'POST'});
fetch(`/api/notifications/${nid}/read`, {method:'POST'}).then(()=>{
updateNotifBadge();
});
el.classList.remove('bg-blue-50/50');
const dot = el.querySelector('.bg-blue-500');
if (dot) dot.remove();
updateNotifBadge();
}
window.markRead = markRead;