refactor: 移除 auth.js 并修复 error_logs.html 脚本路径

- 删除了不再使用的 `app/static/js/auth.js` 文件。
- 修正了 `app/templates/error_logs.html` 中 `error_logs.js` 的脚本引用路径,移除了 `url_for` 函数调用,直接使用静态路径。
This commit is contained in:
snaily
2025-04-13 01:08:42 +08:00
parent 0dd9dd5380
commit 439165bc6c
2 changed files with 1 additions and 19 deletions

View File

@@ -1,18 +0,0 @@
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('/static/service-worker.js')
.then(registration => {
console.log('ServiceWorker注册成功:', registration.scope);
})
.catch(error => {
console.log('ServiceWorker注册失败:', error);
});
});
}
document.addEventListener('DOMContentLoaded', () => {
const copyrightYear = document.querySelector('.copyright script');
if (copyrightYear) {
copyrightYear.textContent = new Date().getFullYear();
}
});

View File

@@ -233,7 +233,7 @@
{% endblock %}
{% block body_scripts %}
<script src="{{ url_for('static', path='/js/error_logs.js') }}"></script>
<script src="/static/js/error_logs.js') }}"></script>
<script>
// error_logs.html specific JS initialization (if any)
// e.g., initialize date pickers or other elements if needed