plugins/gitadora@asphyxia/webui/profile_player_info.pug

96 lines
3.0 KiB
Plaintext

//DATA//
info: DB.Find(refid, { collection: 'playerinfo' })
profile: DB.Find(refid, { collection: 'profile' })
-
-
function getFullGameName(shortName) {
switch (shortName) {
case "dm" :
return "Drummania"
case "gf":
return "Guitar Freaks"
default:
return "Unknown"
}
}
-
div
each i in info
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-account-edit
| User Detail (#{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)} #{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)