mirror of
https://github.com/teest114514/chatlog_alpha.git
synced 2026-04-10 04:11:15 +08:00
fix: correctly display filename in db list by splitting on backslash
This commit is contained in:
@@ -527,7 +527,7 @@
|
||||
// Escape backslashes for JS string
|
||||
const escapedFile = file.replace(/\\/g, '\\\\');
|
||||
html += `<div class="db-item" onclick="openDBViewer('${group}', '${escapedFile}')">
|
||||
<span style="font-weight:bold;">📄 ${file.split(/[\/]/).pop()}</span>
|
||||
<span style="font-weight:bold;">📄 ${file.split(/[\\/]/).pop()}</span>
|
||||
<span class="text-gray text-sm" style="margin-left:auto;">${file}</span>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user