文件列表只显示文件名;app.js 加版本参数防移动端旧缓存(.bin 问题疑为旧 JS 未更新)

This commit is contained in:
2026-08-31 20:11:11 +08:00
parent a88fa48700
commit 9ef1d807b4
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -110,6 +110,7 @@
<div class="toast hidden" id="toast"></div>
<script src="/js/app.js"></script>
<!-- 发版时更新 v 参数,避免移动端浏览器缓存旧 JS -->
<script src="/js/app.js?v=20260831b"></script>
</body>
</html>
+1 -1
View File
@@ -394,7 +394,7 @@ async function loadFiles() {
return;
}
el.innerHTML = files.map(f => {
return '<div class="file-row"><span class="file-name">' + esc(f.filename) + '</span>' +
return '<div class="file-row"><span class="file-name">' + esc(f.filename.split('/').pop() || f.filename) + '</span>' +
'<span class="file-size">' + fmtSize(f.size) + '</span>' +
'<button class="file-act" onclick="ui.downloadFile(\'' + esc(f.filename) + '\')">下载</button>' +
'<button class="file-act del" onclick="ui.deleteFile(\'' + esc(f.filename).replace(/'/g, '%27') + '\')">删</button></div>';