Skip to content

Commit

Permalink
Battle log: Fix issues with replays
Browse files Browse the repository at this point in the history
- Adjust height to 500px
- Re-add missing recreate battle option
- Update embed replays script
  • Loading branch information
AgustinSRG committed Apr 27, 2024
1 parent 508a7c8 commit 4f487fd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/bot-modules/battle-log/server-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ exports.setup = function (App) {
htmlVars.log_files += '<tr>';
htmlVars.log_files += '<td>' + Text.escapeHTML(logs[i].file) + '</td>';
htmlVars.log_files += '<td style="text-align: center; white-space: nowrap;"><a href="/battlelog/' + Text.escapeHTML(logs[i].file) +
'" target="_blank" rel="noopener noreferrer"><button>View Log</button></a>&nbsp;|&nbsp;<a href="/battlelog/' + Text.escapeHTML((logs[i].file + "").split(".")[0]) +
'" target="_blank" rel="noopener noreferrer"><button>View Replay</button></a></td>';
'" target="_blank" rel="noopener noreferrer"><button>Log</button></a>&nbsp;|&nbsp;<a href="/battlelog/' + Text.escapeHTML((logs[i].file + "").split(".")[0]) +
'" target="_blank" rel="noopener noreferrer"><button>Replay</button></a>&nbsp;|&nbsp;<a href="' + Text.escapeHTML(logs[i].psim) +
'" target="_blank" rel="noopener noreferrer"><button>Recreate</button></a></td>';
htmlVars.log_files += '<td>' + Text.escapeHTML(logs[i].title) + '</td>';
htmlVars.log_files += '<td>' + Text.escapeHTML(logs[i].date) + '</td>';
htmlVars.log_files += '<td>' + Text.escapeHTML(logs[i].size) + ' KB</td>';
Expand Down
2 changes: 1 addition & 1 deletion static/log-to-replay.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ p {

.iframe-result-container iframe {
width: 100%;
height: 100%;
height: 500px;
border: none;
}

0 comments on commit 4f487fd

Please sign in to comment.