This commit is contained in:
2026-03-03 17:10:39 +08:00
parent 8660bbc348
commit b5b9f7db06
4 changed files with 33 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(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 stash:*)",
"Bash(git pull:*)", "Bash(git pull:*)",
"Bash(iconv:*)" "Bash(iconv:*)",
"Bash(git add:*)",
"Bash(git push)",
"Bash(git commit:*)",
"Bash(git push:*)"
] ]
} }
} }

1
.gitignore vendored
View File

@@ -9,4 +9,3 @@ build/
node_modules/ node_modules/
model/ model/
.claude/settings.local.json .claude/settings.local.json
instance/database.db

Binary file not shown.

View File

@@ -196,6 +196,26 @@
<!-- 通知面板脚本 --> <!-- 通知面板脚本 -->
<script> <script>
(function(){ (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() { function toggleNotifPanel() {
const panel = document.getElementById('notifPanel'); const panel = document.getElementById('notifPanel');
panel.classList.toggle('hidden'); panel.classList.toggle('hidden');
@@ -217,9 +237,14 @@
if (d.count > 0) { if (d.count > 0) {
badge.textContent = d.count > 99 ? '99+' : d.count; badge.textContent = d.count > 99 ? '99+' : d.count;
badge.classList.remove('hidden'); badge.classList.remove('hidden');
// 有新通知时播放声音
if (lastNotifCount >= 0 && d.count > lastNotifCount) {
playNotifSound();
}
} else { } else {
badge.classList.add('hidden'); badge.classList.add('hidden');
} }
lastNotifCount = d.count;
}).catch(()=>{}); }).catch(()=>{});
} }
updateNotifBadge(); updateNotifBadge();
@@ -274,11 +299,12 @@
} }
function markRead(nid, el) { 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'); el.classList.remove('bg-blue-50/50');
const dot = el.querySelector('.bg-blue-500'); const dot = el.querySelector('.bg-blue-500');
if (dot) dot.remove(); if (dot) dot.remove();
updateNotifBadge();
} }
window.markRead = markRead; window.markRead = markRead;