mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-29 04:06:54 -05:00
Make /rank command output horizontally scrollable (#11586)
This commit is contained in:
parent
b0dc94f196
commit
2b02955fdc
|
|
@ -675,9 +675,9 @@ export const commands: Chat.ChatCommands = {
|
||||||
if (!target) target = user.name;
|
if (!target) target = user.name;
|
||||||
|
|
||||||
const values = await Ladders.visualizeAll(target);
|
const values = await Ladders.visualizeAll(target);
|
||||||
let buffer = `<div class="ladder"><table>`;
|
let buffer = `<div class="ladder">`;
|
||||||
buffer += Utils.html`<tr><td colspan="8">User: <strong>${target}</strong></td></tr>`;
|
buffer += Utils.html`<div>User: <strong>${target}</strong></div>`;
|
||||||
|
buffer += `<div style="overflow-x: auto;"><table>`;
|
||||||
const ratings = values.join(``);
|
const ratings = values.join(``);
|
||||||
if (!ratings) {
|
if (!ratings) {
|
||||||
buffer += `<tr><td colspan="8"><em>${this.tr`This user has not played any ladder games yet.`}</em></td></tr>`;
|
buffer += `<tr><td colspan="8"><em>${this.tr`This user has not played any ladder games yet.`}</em></td></tr>`;
|
||||||
|
|
@ -685,8 +685,7 @@ export const commands: Chat.ChatCommands = {
|
||||||
buffer += `<tr><th>${this.tr`Format`}</th><th><abbr title="Elo rating">Elo</abbr></th><th>${this.tr`W`}</th><th>${this.tr`L`}</th><th>${this.tr`Total`}</th>`;
|
buffer += `<tr><th>${this.tr`Format`}</th><th><abbr title="Elo rating">Elo</abbr></th><th>${this.tr`W`}</th><th>${this.tr`L`}</th><th>${this.tr`Total`}</th>`;
|
||||||
buffer += ratings;
|
buffer += ratings;
|
||||||
}
|
}
|
||||||
buffer += `</table></div>`;
|
buffer += `</table></div></div>`;
|
||||||
|
|
||||||
this.sendReply(`|raw|${buffer}`);
|
this.sendReply(`|raw|${buffer}`);
|
||||||
},
|
},
|
||||||
rankhelp: [
|
rankhelp: [
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user