//DATA// info: DB.Find(refid, { collection: 'playerinfo' }) profile: DB.Find(refid, { collection: 'profile' }) rivals: DB.Find(refid, { collection: 'rival' }) all_players: DB.Find(null, { collection: 'playerinfo' }) - - function getFullGameName(shortName) { switch (shortName) { case "gf": return "GuitarFreaks" case "dm" : return "DrumMania" default: return "Unknown" } } function getFullGameVersion(shortVer) { switch (shortVer) { case "re" : return "Tri-Boost Re:EVOLVE" case "matixx": return "Matixx" case "EXCHAIN": return "exchain" case "nextage": return "NEX+AGE" case "highvoltage": return "HIGH-VOLTAGE" case "fuzzup": return "FUZZ-UP" case "galaxywave": return "GALAXY WAVE" case "galaxywave_delta": return "GALAXY WAVE DELTA" default: return "Unknown" } } - div each i in info .card .card-header p.card-header-title span.icon i.mdi.mdi-account-edit | User Detail (#{getFullGameVersion(i.version)}) .card-content form(method="post" action="/emit/updatePlayerInfo") .field label.label ID .control input.input(type="text" name="refid", value=refid readonly) .field label.label Version .control input.input(type="text" name="version", value=i.version readonly) .field label.label Name .control input.input(type="text" name="name", value=i.name) .field label.label Title .control input.input(type="text" name="title", value=i.title) .field button.button.is-primary(type="submit") span.icon i.mdi.mdi-check span Submit div each pr in profile .card .card-header p.card-header-title span.icon i.mdi.mdi-account-details | Profile Detail (#{getFullGameName(pr.game)} #{getFullGameVersion(pr.version)}) .card-content form(method="post") .field label.label Skill .control input.input(type="text" name="skill", value=(pr.skill/100) readonly) .field label.label Skill (All Songs) .control input.input(type="text" name="all_skill", value=(pr.all_skill/100) readonly) .field label.label Songs Cleared .control input.input(type="text" name="clear_num", value=pr.clear_num readonly) .field label.label Full Combos .control input.input(type="text" name="full_num", value=pr.full_num readonly) .field label.label Excellent Full Combos .control input.input(type="text" name="exce_num", value=pr.exce_num readonly) .field label.label Highest Difficulty Cleared .control input.input(type="text" name="max_clear_diff", value=(pr.max_clear_diff/100) readonly) .field label.label Highest Difficulty Full Combo .control input.input(type="text" name="max_full_diff", value=(pr.max_full_diff/100) readonly) .field label.label Highest Difficulty Excellent Full Combo .control input.input(type="text" name="max_exce_diff", value=(pr.max_exce_diff/100) readonly) .field label.label Sessions .control input.input(type="text" name="session_cnt", value=pr.session_cnt readonly) .card .card-header p.card-header-title span.icon i.mdi.mdi-account-multiple | Rivals (#{getFullGameName(pr.game)} #{getFullGameVersion(pr.version)}) .card-content - const selectedRivals = (rivals || []) .filter(r => r.game === pr.game && r.version === pr.version) .sort((a, b) => (a.slot || 0) - (b.slot || 0)) .map(r => r.rival_refid); const candidates = (all_players || []).filter(p => p.__refid !== refid && p.version === pr.version); form(method="post" action="/emit/updateRival") input(type="hidden" name="refid" value=refid) input(type="hidden" name="version" value=pr.version) input(type="hidden" name="game" value=pr.game) p.help Select up to five distinct players. Only players with the same game version are shown. each slot in [1, 2, 3, 4, 5] .field label.label Rival #{slot} .control .select.is-fullwidth select(name=`rival${slot}`) option(value="") None each candidate in candidates option(value=candidate.__refid selected=(selectedRivals[slot - 1] === candidate.__refid)) #{candidate.name} (DID: #{candidate.id}) .field button.button.is-primary(type="submit") span.icon i.mdi.mdi-check span Save rivals