Compare commits
2 Commits
8258167f7f
...
b5b9f7db06
| Author | SHA1 | Date | |
|---|---|---|---|
| b5b9f7db06 | |||
| 8660bbc348 |
@@ -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:*)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -8,3 +8,4 @@ dist/
|
||||
build/
|
||||
node_modules/
|
||||
model/
|
||||
.claude/settings.local.json
|
||||
|
||||
Binary file not shown.
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user