diff --git a/play.pokemonshowdown.com/src/panel-teambuilder.tsx b/play.pokemonshowdown.com/src/panel-teambuilder.tsx index 9d2a7a8a9..52dc3657f 100644 --- a/play.pokemonshowdown.com/src/panel-teambuilder.tsx +++ b/play.pokemonshowdown.com/src/panel-teambuilder.tsx @@ -10,9 +10,10 @@ import { PSPanelWrapper, PSRoomPanel } from "./panels"; import { PSTeambuilder, TeamBox } from "./panel-teamdropdown"; import { Dex, PSUtils, toID, type ID } from "./battle-dex"; import { Teams } from "./battle-teams"; +import { BattleLog } from "./battle-log"; class TeambuilderRoom extends PSRoom { - readonly DEFAULT_FORMAT = `gen${Dex.gen}` as ID; + readonly DEFAULT_FORMAT = Dex.modid; /** * - `""` - all @@ -453,13 +454,16 @@ class TeambuilderPanel extends PSRoomPanel { let filterFolder: string | null = null; let filterFormat: string | null = null; + let teamTerm = 'team'; if (room.curFolder) { if (room.curFolder.endsWith('/')) { filterFolder = room.curFolder.slice(0, -1); teams = teams.filter(team => !team || team.folder === filterFolder); + teamTerm = 'team in folder'; } else { filterFormat = room.curFolder; teams = teams.filter(team => !team || team.format === filterFormat); + if (filterFormat !== Dex.modid) teamTerm = BattleLog.formatName(filterFormat) + ' team'; } } @@ -488,8 +492,12 @@ class TeambuilderPanel extends PSRoomPanel {

All Teams ({teams.length})

)}

- {} - + {} + { ))}

- {} - + {} +

; diff --git a/play.pokemonshowdown.com/src/panel-teamdropdown.tsx b/play.pokemonshowdown.com/src/panel-teamdropdown.tsx index c2e5261b4..ffbd6f69a 100644 --- a/play.pokemonshowdown.com/src/panel-teamdropdown.tsx +++ b/play.pokemonshowdown.com/src/panel-teamdropdown.tsx @@ -308,7 +308,7 @@ export function TeamBox(props: { (empty {team.isBox ? 'box' : 'team'}) ); let format = team.format as string; - if (format.startsWith(`gen${Dex.gen}`)) format = format.slice(4); + if (format.startsWith(Dex.modid)) format = format.slice(4); format = (format ? `[${format}] ` : ``) + (team.folder ? `${team.folder}/` : ``); contents = [ {team.isBox && } {format && {format}}{team.name},