Change default format to gen9 (#2014)

This commit is contained in:
Karthik
2022-11-17 22:41:23 -05:00
committed by GitHub
parent 2181a68b7b
commit 4d92895c87

View File

@@ -126,7 +126,7 @@
// format
// Special values:
// '' - show all
// 'gen8' - show teams with no format
// 'gen9' - show teams with no format
// '/' - show teams with no folder
curFolder: '',
curFolderKeep: '',
@@ -237,7 +237,7 @@
format = this.curFolder;
} else {
format = Storage.teams[i].format;
if (!format) format = 'gen8';
if (!format) format = 'gen9';
}
if (!format) continue;
if (format in folderTable) continue;
@@ -250,8 +250,8 @@
}
continue;
}
if (format === 'gen8') {
folders.push('B~');
if (format === 'gen9') {
folders.push('A~');
continue;
}
switch (format.slice(0, 4)) {
@@ -367,7 +367,7 @@
var newTeamButtonText = "New Team";
if (filterFolder) newTeamButtonText = "New Team in folder";
if (filterFormat && filterFormat !== 'gen8') {
if (filterFormat && filterFormat !== 'gen9') {
newTeamButtonText = "New " + BattleLog.escapeFormat(filterFormat) + " Team";
}
buf += '<p><button name="newTop" value="team" class="button big"><i class="fa fa-plus-circle"></i> ' + newTeamButtonText + '</button> ' +
@@ -410,7 +410,7 @@
continue;
}
if (filterFormat && filterFormat !== (team.format || 'gen8')) continue;
if (filterFormat && filterFormat !== (team.format || 'gen9')) continue;
if (filterFolder !== undefined && filterFolder !== team.folder) continue;
if (this.curSearchVal) {
@@ -790,11 +790,11 @@
iconCache: ''
};
} else {
var format = this.curFolder || 'gen8';
var format = this.curFolder || 'gen9';
var folder = '';
if (format && format.charAt(format.length - 1) === '/') {
folder = format.slice(0, -1);
format = 'gen8';
format = 'gen9';
}
newTeam = {
name: (isBox ? 'Box ' : 'Untitled ') + (teams.length + 1),
@@ -836,7 +836,7 @@
document.getElementById("pasteData").value = team;
document.getElementById("pasteTitle").value = this.curTeam.name;
document.getElementById("pasteAuthor").value = app.user.get('name');
if (this.curTeam.format !== 'gen8') document.getElementById("pasteNotes").value = "Format: " + this.curTeam.format;
if (this.curTeam.format !== 'gen9') document.getElementById("pasteNotes").value = "Format: " + this.curTeam.format;
document.getElementById("pokepasteForm").submit();
},
@@ -1959,7 +1959,7 @@
this.$chart.scrollTop(0);
}
this.search.$inputEl = $inputEl;
this.search.setType(type, this.curTeam.format || 'gen8', this.curSet, cur);
this.search.setType(type, this.curTeam.format || 'gen9', this.curSet, cur);
this.qInitial = q;
this.search.qName = this.curChartName;
if (wasIncomplete) {