mirror of
https://github.com/asphyxia-core/plugins.git
synced 2026-03-21 17:34:46 -05:00
IIDX: Added score import/export
This commit is contained in:
parent
425b8962ee
commit
5750f8f464
|
|
@ -136,6 +136,7 @@ Changelogs
|
|||
- Added Initial support for GOLD
|
||||
- Added Disable Beginner Option
|
||||
- Added Experimental Badge saving support
|
||||
- Added Experimental score Import/Export
|
||||
- Fixed where plugin may fail to register due to missing types in dev mode
|
||||
- Fixed where pacemaker isn't working as intended due to malformed ghost data on music.appoint response (~ DJ TROOPERS)
|
||||
- Fixed where unable to login after first-play (SPADA, SINOBUZ, Rootage)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { profile } from "../models/profile";
|
||||
import { rival } from "../models/rival";
|
||||
import { custom } from "../models/custom";
|
||||
import { score, old_score } from "../models/score";
|
||||
|
||||
export const updateRivalSettings = async (data) => {
|
||||
let update_array = [];
|
||||
|
|
@ -264,6 +265,113 @@ export const updateCustomSettings = async (data) => {
|
|||
}
|
||||
};
|
||||
|
||||
export const importScoreData = async (data) => {
|
||||
if (_.isEmpty(data.data)) return;
|
||||
|
||||
let content = JSON.parse(data.data);
|
||||
let version = content.version;
|
||||
let count = content.count;
|
||||
|
||||
switch (version) {
|
||||
case 1:
|
||||
let sd_ver1: old_score[] = content.data;
|
||||
for (let a = 0; a < count; a++) {
|
||||
let result = {
|
||||
pgArray: Array<number>(10).fill(0),
|
||||
gArray: Array<number>(10).fill(0),
|
||||
mArray: Array<number>(10).fill(0),
|
||||
cArray: Array<number>(10).fill(0),
|
||||
rArray: Array<number>(10).fill(-1),
|
||||
esArray: Array<number>(10).fill(0),
|
||||
|
||||
optArray: Array<number>(10).fill(0),
|
||||
opt2Array: Array<number>(10).fill(0),
|
||||
}
|
||||
|
||||
if (!_.isNil(sd_ver1[a].spmArray)) {
|
||||
for (let b = 0; b < 5; b++) {
|
||||
result.cArray[b] = sd_ver1[a].spmArray[2 + b];
|
||||
result.esArray[b] = sd_ver1[a].spmArray[7 + b];
|
||||
if (sd_ver1[a].spmArray[12 + b] != -1) result.mArray[b] = sd_ver1[a].spmArray[12 + b];
|
||||
}
|
||||
}
|
||||
|
||||
if (!_.isNil(sd_ver1[a].dpmArray)) {
|
||||
for (let b = 5; b < 10; b++) {
|
||||
result.cArray[b] = sd_ver1[a].dpmArray[2 + b];
|
||||
result.esArray[b] = sd_ver1[a].dpmArray[7 + b];
|
||||
if (sd_ver1[a].dpmArray[12 + b] != -1) result.mArray[b] = sd_ver1[a].dpmArray[12 + b];
|
||||
}
|
||||
}
|
||||
|
||||
if (!_.isNil(sd_ver1[a].optArray)) {
|
||||
result.optArray = sd_ver1[a].optArray;
|
||||
}
|
||||
|
||||
if (!_.isNil(sd_ver1[a].opt2Array)) {
|
||||
result.opt2Array = sd_ver1[a].opt2Array;
|
||||
}
|
||||
|
||||
for (let b = 0; b < 10; b++) {
|
||||
if (_.isNil(sd_ver1[a][b])) continue;
|
||||
result[b] = sd_ver1[a][b];
|
||||
|
||||
if (!_.isNil(sd_ver1[a][b + 10])) {
|
||||
result[b + 10] = sd_ver1[a][b + 10];
|
||||
}
|
||||
}
|
||||
|
||||
await DB.Upsert<score>(data.refid,
|
||||
{
|
||||
collection: "score",
|
||||
mid: sd_ver1[a].music_id
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
...result
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
let sd_ver2: score[] = content.data;
|
||||
for (let a = 0; a < count; a++) {
|
||||
await DB.Upsert<score>(data.refid,
|
||||
{
|
||||
collection: "score",
|
||||
mid: sd_ver2[a].mid
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
...sd_ver2[a]
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
export const exportScoreData = async (data, send: WebUISend) => {
|
||||
const score = await DB.Find<score>(data.refid, {
|
||||
collection: "score"
|
||||
});
|
||||
|
||||
let result = {
|
||||
version: 2,
|
||||
count: score.length,
|
||||
data: {
|
||||
...score,
|
||||
}
|
||||
}
|
||||
|
||||
send.json(result);
|
||||
}
|
||||
|
||||
function StoB(value: string) {
|
||||
return value == "on" ? true : false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { shopgetname, shopsavename, shopgetconvention, shopsetconvention } from
|
|||
import { musicreg, musicgetrank, musicappoint, musicarenacpu, musiccrate, musicbreg, musicgetralive } from "./handlers/music";
|
||||
import { graderaised } from "./handlers/grade";
|
||||
import { gssysteminfo } from "./handlers/gamesystem";
|
||||
import { updateRivalSettings, updateCustomSettings } from "./handlers/webui";
|
||||
import { updateRivalSettings, updateCustomSettings, importScoreData, exportScoreData } from "./handlers/webui";
|
||||
import { GetVersion } from "./util";
|
||||
import { rankingentry, rankinggetranker, rankingoentry } from "./handlers/ranking";
|
||||
|
||||
|
|
@ -461,6 +461,8 @@ export function register() {
|
|||
// TODO:: Reflect data when version dropdown menu has been changed //
|
||||
R.WebUIEvent("updateIIDXRival", updateRivalSettings);
|
||||
R.WebUIEvent("updateIIDXCustom", updateCustomSettings);
|
||||
R.WebUIEvent("importScoreData", importScoreData);
|
||||
R.WebUIEvent("exportScoreData", exportScoreData);
|
||||
|
||||
const MultiRoute = (method: string, handler: EPR | boolean) => {
|
||||
R.Route(`${method}`, handler);
|
||||
|
|
|
|||
|
|
@ -24,3 +24,16 @@ export interface score_top {
|
|||
scores: number[];
|
||||
clflgs: number[];
|
||||
}
|
||||
|
||||
export interface old_score {
|
||||
music_id: number;
|
||||
|
||||
spmArray: number[];
|
||||
dpmArray: number[];
|
||||
|
||||
optArray: number[];
|
||||
opt2Array: number[];
|
||||
|
||||
option_1: number;
|
||||
option_2: number;
|
||||
}
|
||||
|
|
@ -1,65 +1,65 @@
|
|||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: 'profile' })
|
||||
pcdata: DB.FindOne(refid, { collection: 'pcdata' })
|
||||
|
||||
-
|
||||
const version = [
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30
|
||||
];
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Profile
|
||||
.card-content
|
||||
.field
|
||||
label.label Version
|
||||
.ver-select
|
||||
.control
|
||||
.select
|
||||
select(name="version")
|
||||
each i in version
|
||||
option(selected=(i==pcdata.version)) #{i}
|
||||
.field
|
||||
label.label Name
|
||||
.body
|
||||
body #{profile.name}
|
||||
.field
|
||||
label.label IIDX ID
|
||||
.body
|
||||
body #{profile.idstr}
|
||||
.field
|
||||
label.label SP Grade
|
||||
.body
|
||||
- const a = pcdata.sgid
|
||||
if a==-1
|
||||
body ----
|
||||
else
|
||||
body #{pcdata.sgid}
|
||||
.field
|
||||
label.label DP Grade
|
||||
.body
|
||||
- const b = pcdata.dgid
|
||||
if b==-1
|
||||
body ----
|
||||
else
|
||||
body #{pcdata.dgid}
|
||||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: 'profile' })
|
||||
pcdata: DB.FindOne(refid, { collection: 'pcdata' })
|
||||
|
||||
-
|
||||
const version = [
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30
|
||||
];
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Profile
|
||||
.card-content
|
||||
.field
|
||||
label.label Version
|
||||
.ver-select
|
||||
.control
|
||||
.select
|
||||
select(name="version")
|
||||
each i in version
|
||||
option(selected=(i==pcdata.version)) #{i}
|
||||
.field
|
||||
label.label Name
|
||||
.body
|
||||
body #{profile.name}
|
||||
.field
|
||||
label.label IIDX ID
|
||||
.body
|
||||
body #{profile.idstr}
|
||||
.field
|
||||
label.label SP Grade
|
||||
.body
|
||||
- const a = pcdata.sgid
|
||||
if a==-1
|
||||
body ----
|
||||
else
|
||||
body #{pcdata.sgid}
|
||||
.field
|
||||
label.label DP Grade
|
||||
.body
|
||||
- const b = pcdata.dgid
|
||||
if b==-1
|
||||
body ----
|
||||
else
|
||||
body #{pcdata.dgid}
|
||||
|
|
@ -1,202 +1,202 @@
|
|||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
pcdata: DB.FindOne(refid, { collection: "pcdata" })
|
||||
custom: DB.FindOne(refid, { collection: "custom" })
|
||||
|
||||
-
|
||||
const version = [
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30
|
||||
];
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Settings
|
||||
.card-content
|
||||
form(method="post" action="/emit/updateIIDXCustom")
|
||||
.field
|
||||
input(type="text" name="refid", value=refid readonly hidden)
|
||||
label.label IIDX ID
|
||||
.control
|
||||
input.input(type="text" name="iidxid", value=profile.idstr readonly)
|
||||
.field
|
||||
label.label Version
|
||||
.control
|
||||
.select
|
||||
select(name="version")
|
||||
each i in version
|
||||
option(selected=(i==pcdata.version)) #{i}
|
||||
.field
|
||||
label.label Name
|
||||
.control
|
||||
input.input(type="text" name="name", value=profile.name)
|
||||
//- SKIN
|
||||
.field
|
||||
label.label Frame
|
||||
.control
|
||||
input.input(type="number" name="frame", value=custom.frame)
|
||||
.field
|
||||
label.label Turntable
|
||||
.control
|
||||
input.input(type="number" name="turntable", value=custom.turntable)
|
||||
.field
|
||||
label.label Note Burst
|
||||
.control
|
||||
input.input(type="number" name="note_burst", value=custom.note_burst)
|
||||
.field
|
||||
label.label Menu Music
|
||||
.control
|
||||
input.input(type="number" name="menu_music", value=custom.menu_music)
|
||||
.field
|
||||
label.label Lane Cover
|
||||
.control
|
||||
input.input(type="number" name="lane_cover", value=custom.lane_cover)
|
||||
.field
|
||||
label.label Category Voice
|
||||
.control
|
||||
input.input(type="number" name="category_vox", value=custom.category_vox)
|
||||
.field
|
||||
label.label Note Skin
|
||||
.control
|
||||
input.input(type="number" name="note_skin", value=custom.note_skin)
|
||||
.field
|
||||
label.label Full Combo Splash
|
||||
.control
|
||||
input.input(type="number" name="full_combo_splash", value=custom.full_combo_splash)
|
||||
.field
|
||||
label.label Note Beam
|
||||
.control
|
||||
input.input(type="number" name="note_beam", value=custom.note_beam)
|
||||
.field
|
||||
label.label Judgement Font
|
||||
.control
|
||||
input.input(type="number" name="judge_font", value=custom.judge_font)
|
||||
.field
|
||||
label.label Disable Music Preview
|
||||
.control
|
||||
input(type="checkbox" name="disable_musicpreview", checked=Boolean(custom.disable_musicpreview))
|
||||
.field
|
||||
label.label Pacemaker Cover
|
||||
.control
|
||||
input.input(type="number" name="pacemaker_cover", value=custom.pacemaker_cover)
|
||||
.field
|
||||
label.label VEFX Lock
|
||||
.control
|
||||
input(type="checkbox" name="vefx_lock", checked=Boolean(custom.vefx_lock))
|
||||
.field
|
||||
label.label VEFX Lock (Effector)
|
||||
.control
|
||||
input.input(type="number" name="effect", value=custom.effect)
|
||||
.field
|
||||
label.label Note Burst Size
|
||||
.control
|
||||
input.input(type="number" name="bomb_size", value=custom.bomb_size)
|
||||
.field
|
||||
label.label Disable HCN Color
|
||||
.control
|
||||
input(type="checkbox" name="disable_hcn_color", checked=Boolean(custom.disable_hcn_color))
|
||||
.field
|
||||
label.label First Note Preview
|
||||
.control
|
||||
input.input(type="number" name="first_note_preview", value=custom.first_note_preview)
|
||||
//- APPEND SETTINGS
|
||||
.field
|
||||
label.label Rank Folder
|
||||
.control
|
||||
input(type="checkbox" name="rank_folder", checked=Boolean(custom.rank_folder))
|
||||
.field
|
||||
label.label Clear State Folder
|
||||
.control
|
||||
input(type="checkbox" name="clear_folder", checked=Boolean(custom.clear_folder))
|
||||
.field
|
||||
label.label Difficulty Folder
|
||||
.control
|
||||
input(type="checkbox" name="diff_folder", checked=Boolean(custom.diff_folder))
|
||||
.field
|
||||
label.label Alphabet Folder
|
||||
.control
|
||||
input(type="checkbox" name="alpha_folder", checked=Boolean(custom.alpha_folder))
|
||||
.field
|
||||
label.label Rival Folder
|
||||
.control
|
||||
input(type="checkbox" name="rival_folder", checked=Boolean(custom.rival_folder))
|
||||
.field
|
||||
label.label Rival WIN/LOSE Folder
|
||||
.control
|
||||
input(type="checkbox" name="rival_battle_folder", checked=Boolean(custom.rival_battle_folder))
|
||||
.field
|
||||
label.label Rival Info / Venue Top Display
|
||||
.control
|
||||
input(type="checkbox" name="rival_info", checked=Boolean(custom.rival_info))
|
||||
.field
|
||||
label.label Hide Playcount
|
||||
.control
|
||||
input(type="checkbox" name="hide_playcount", checked=Boolean(custom.hide_playcount))
|
||||
.field
|
||||
label.label Disable Pacemaker Cut-In
|
||||
.control
|
||||
input(type="checkbox" name="disable_graph_cutin", checked=Boolean(custom.disable_graph_cutin))
|
||||
.field
|
||||
label.label Classic Hi-SPEED
|
||||
.control
|
||||
input(type="checkbox" name="class_hispeed", checked=Boolean(custom.class_hispeed))
|
||||
.field
|
||||
label.label Rival Played Folder
|
||||
.control
|
||||
input(type="checkbox" name="rival_played_folder", checked=Boolean(custom.rival_played_folder))
|
||||
.field
|
||||
label.label Hide IIDX ID
|
||||
.control
|
||||
input(type="checkbox" name="hide_iidxid", checked=Boolean(custom.hide_iidxid))
|
||||
.field
|
||||
label.label Disable Beginner Option
|
||||
.control
|
||||
if custom.disable_beginner_option === undefined
|
||||
input(type="checkbox" name="disable_beginner_option", checked=Boolean(false))
|
||||
else
|
||||
input(type="checkbox" name="disable_beginner_option", checked=Boolean(custom.disable_beginner_option))
|
||||
//- QPRO
|
||||
.field
|
||||
label.label QPRO Head
|
||||
.control
|
||||
input.input(type="number" name="qpro_head", value=custom.qpro_head)
|
||||
.field
|
||||
label.label QPRO Hair
|
||||
.control
|
||||
input.input(type="number" name="qpro_hair", value=custom.qpro_hair)
|
||||
.field
|
||||
label.label QPRO Hand
|
||||
.control
|
||||
input.input(type="number" name="qpro_hand", value=custom.qpro_hand)
|
||||
.field
|
||||
label.label QPRO Face
|
||||
.control
|
||||
input.input(type="number" name="qpro_face", value=custom.qpro_face)
|
||||
.field
|
||||
label.label QPRO Body
|
||||
.control
|
||||
input.input(type="number" name="qpro_body", value=custom.qpro_body)
|
||||
.field
|
||||
button.button.is-primary(type="submit")
|
||||
span.icon
|
||||
i.mdi.mdi-check
|
||||
span Submit
|
||||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
pcdata: DB.FindOne(refid, { collection: "pcdata" })
|
||||
custom: DB.FindOne(refid, { collection: "custom" })
|
||||
|
||||
-
|
||||
const version = [
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30
|
||||
];
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Settings
|
||||
.card-content
|
||||
form(method="post" action="/emit/updateIIDXCustom")
|
||||
.field
|
||||
input(type="text" name="refid", value=refid readonly hidden)
|
||||
label.label IIDX ID
|
||||
.control
|
||||
input.input(type="text" name="iidxid", value=profile.idstr readonly)
|
||||
.field
|
||||
label.label Version
|
||||
.control
|
||||
.select
|
||||
select(name="version")
|
||||
each i in version
|
||||
option(selected=(i==pcdata.version)) #{i}
|
||||
.field
|
||||
label.label Name
|
||||
.control
|
||||
input.input(type="text" name="name", value=profile.name)
|
||||
//- SKIN
|
||||
.field
|
||||
label.label Frame
|
||||
.control
|
||||
input.input(type="number" name="frame", value=custom.frame)
|
||||
.field
|
||||
label.label Turntable
|
||||
.control
|
||||
input.input(type="number" name="turntable", value=custom.turntable)
|
||||
.field
|
||||
label.label Note Burst
|
||||
.control
|
||||
input.input(type="number" name="note_burst", value=custom.note_burst)
|
||||
.field
|
||||
label.label Menu Music
|
||||
.control
|
||||
input.input(type="number" name="menu_music", value=custom.menu_music)
|
||||
.field
|
||||
label.label Lane Cover
|
||||
.control
|
||||
input.input(type="number" name="lane_cover", value=custom.lane_cover)
|
||||
.field
|
||||
label.label Category Voice
|
||||
.control
|
||||
input.input(type="number" name="category_vox", value=custom.category_vox)
|
||||
.field
|
||||
label.label Note Skin
|
||||
.control
|
||||
input.input(type="number" name="note_skin", value=custom.note_skin)
|
||||
.field
|
||||
label.label Full Combo Splash
|
||||
.control
|
||||
input.input(type="number" name="full_combo_splash", value=custom.full_combo_splash)
|
||||
.field
|
||||
label.label Note Beam
|
||||
.control
|
||||
input.input(type="number" name="note_beam", value=custom.note_beam)
|
||||
.field
|
||||
label.label Judgement Font
|
||||
.control
|
||||
input.input(type="number" name="judge_font", value=custom.judge_font)
|
||||
.field
|
||||
label.label Disable Music Preview
|
||||
.control
|
||||
input(type="checkbox" name="disable_musicpreview", checked=Boolean(custom.disable_musicpreview))
|
||||
.field
|
||||
label.label Pacemaker Cover
|
||||
.control
|
||||
input.input(type="number" name="pacemaker_cover", value=custom.pacemaker_cover)
|
||||
.field
|
||||
label.label VEFX Lock
|
||||
.control
|
||||
input(type="checkbox" name="vefx_lock", checked=Boolean(custom.vefx_lock))
|
||||
.field
|
||||
label.label VEFX Lock (Effector)
|
||||
.control
|
||||
input.input(type="number" name="effect", value=custom.effect)
|
||||
.field
|
||||
label.label Note Burst Size
|
||||
.control
|
||||
input.input(type="number" name="bomb_size", value=custom.bomb_size)
|
||||
.field
|
||||
label.label Disable HCN Color
|
||||
.control
|
||||
input(type="checkbox" name="disable_hcn_color", checked=Boolean(custom.disable_hcn_color))
|
||||
.field
|
||||
label.label First Note Preview
|
||||
.control
|
||||
input.input(type="number" name="first_note_preview", value=custom.first_note_preview)
|
||||
//- APPEND SETTINGS
|
||||
.field
|
||||
label.label Rank Folder
|
||||
.control
|
||||
input(type="checkbox" name="rank_folder", checked=Boolean(custom.rank_folder))
|
||||
.field
|
||||
label.label Clear State Folder
|
||||
.control
|
||||
input(type="checkbox" name="clear_folder", checked=Boolean(custom.clear_folder))
|
||||
.field
|
||||
label.label Difficulty Folder
|
||||
.control
|
||||
input(type="checkbox" name="diff_folder", checked=Boolean(custom.diff_folder))
|
||||
.field
|
||||
label.label Alphabet Folder
|
||||
.control
|
||||
input(type="checkbox" name="alpha_folder", checked=Boolean(custom.alpha_folder))
|
||||
.field
|
||||
label.label Rival Folder
|
||||
.control
|
||||
input(type="checkbox" name="rival_folder", checked=Boolean(custom.rival_folder))
|
||||
.field
|
||||
label.label Rival WIN/LOSE Folder
|
||||
.control
|
||||
input(type="checkbox" name="rival_battle_folder", checked=Boolean(custom.rival_battle_folder))
|
||||
.field
|
||||
label.label Rival Info / Venue Top Display
|
||||
.control
|
||||
input(type="checkbox" name="rival_info", checked=Boolean(custom.rival_info))
|
||||
.field
|
||||
label.label Hide Playcount
|
||||
.control
|
||||
input(type="checkbox" name="hide_playcount", checked=Boolean(custom.hide_playcount))
|
||||
.field
|
||||
label.label Disable Pacemaker Cut-In
|
||||
.control
|
||||
input(type="checkbox" name="disable_graph_cutin", checked=Boolean(custom.disable_graph_cutin))
|
||||
.field
|
||||
label.label Classic Hi-SPEED
|
||||
.control
|
||||
input(type="checkbox" name="class_hispeed", checked=Boolean(custom.class_hispeed))
|
||||
.field
|
||||
label.label Rival Played Folder
|
||||
.control
|
||||
input(type="checkbox" name="rival_played_folder", checked=Boolean(custom.rival_played_folder))
|
||||
.field
|
||||
label.label Hide IIDX ID
|
||||
.control
|
||||
input(type="checkbox" name="hide_iidxid", checked=Boolean(custom.hide_iidxid))
|
||||
.field
|
||||
label.label Disable Beginner Option
|
||||
.control
|
||||
if custom.disable_beginner_option === undefined
|
||||
input(type="checkbox" name="disable_beginner_option", checked=Boolean(false))
|
||||
else
|
||||
input(type="checkbox" name="disable_beginner_option", checked=Boolean(custom.disable_beginner_option))
|
||||
//- QPRO
|
||||
.field
|
||||
label.label QPRO Head
|
||||
.control
|
||||
input.input(type="number" name="qpro_head", value=custom.qpro_head)
|
||||
.field
|
||||
label.label QPRO Hair
|
||||
.control
|
||||
input.input(type="number" name="qpro_hair", value=custom.qpro_hair)
|
||||
.field
|
||||
label.label QPRO Hand
|
||||
.control
|
||||
input.input(type="number" name="qpro_hand", value=custom.qpro_hand)
|
||||
.field
|
||||
label.label QPRO Face
|
||||
.control
|
||||
input.input(type="number" name="qpro_face", value=custom.qpro_face)
|
||||
.field
|
||||
label.label QPRO Body
|
||||
.control
|
||||
input.input(type="number" name="qpro_body", value=custom.qpro_body)
|
||||
.field
|
||||
button.button.is-primary(type="submit")
|
||||
span.icon
|
||||
i.mdi.mdi-check
|
||||
span Submit
|
||||
|
|
@ -1,118 +1,118 @@
|
|||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
profiles: DB.Find(null, { collection: "profile" })
|
||||
rival: DB.Find(refid, { collection: "rival" })
|
||||
|
||||
-
|
||||
let rival_list=[["", "None", "0000-0000"]];
|
||||
profiles.forEach((res) => {
|
||||
rival_list.push([res.refid, res.name, res.idstr])
|
||||
});
|
||||
|
||||
let my_sp_rival = [], my_dp_rival = [];
|
||||
rival.forEach((res) => {
|
||||
if (res.play_style == 1) my_sp_rival[res.index] = res.rival_refid;
|
||||
else if (res.play_style == 2) my_dp_rival[res.index] = res.rival_refid;
|
||||
});
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Rivals
|
||||
.card-content
|
||||
form(method="post" action="/emit/updateIIDXRival")
|
||||
.field
|
||||
input(type="text" name="refid", value=refid readonly hidden)
|
||||
label.label SP Rivals
|
||||
.body
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival1")
|
||||
each i in rival_list
|
||||
if my_sp_rival[0] != null
|
||||
option(selected=(i[0]==my_sp_rival[0]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival2")
|
||||
each i in rival_list
|
||||
if my_sp_rival[1] != null
|
||||
option(selected=(i[0]==my_sp_rival[1]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival3")
|
||||
each i in rival_list
|
||||
if my_sp_rival[2] != null
|
||||
option(selected=(i[0]==my_sp_rival[2]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival4")
|
||||
each i in rival_list
|
||||
if my_sp_rival[3] != null
|
||||
option(selected=(i[0]==my_sp_rival[3]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival5")
|
||||
each i in rival_list
|
||||
if my_sp_rival[4] != null
|
||||
option(selected=(i[0]==my_sp_rival[4]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.field
|
||||
label.label DP Rivals
|
||||
.body
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival1")
|
||||
each i in rival_list
|
||||
if my_dp_rival[0] != null
|
||||
option(selected=(i[0]==my_dp_rival[0]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival2")
|
||||
each i in rival_list
|
||||
if my_dp_rival[1] != null
|
||||
option(selected=(i[0]==my_dp_rival[1]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival3")
|
||||
each i in rival_list
|
||||
if my_dp_rival[2] != null
|
||||
option(selected=(i[0]==my_dp_rival[2]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival4")
|
||||
each i in rival_list
|
||||
if my_dp_rival[3] != null
|
||||
option(selected=(i[0]==my_dp_rival[3]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival5")
|
||||
each i in rival_list
|
||||
if my_dp_rival[4] != null
|
||||
option(selected=(i[0]==my_dp_rival[4]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.field
|
||||
button.button.is-primary(type="submit")
|
||||
span.icon
|
||||
i.mdi.mdi-check
|
||||
span Submit
|
||||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
profiles: DB.Find(null, { collection: "profile" })
|
||||
rival: DB.Find(refid, { collection: "rival" })
|
||||
|
||||
-
|
||||
let rival_list=[["", "None", "0000-0000"]];
|
||||
profiles.forEach((res) => {
|
||||
rival_list.push([res.refid, res.name, res.idstr])
|
||||
});
|
||||
|
||||
let my_sp_rival = [], my_dp_rival = [];
|
||||
rival.forEach((res) => {
|
||||
if (res.play_style == 1) my_sp_rival[res.index] = res.rival_refid;
|
||||
else if (res.play_style == 2) my_dp_rival[res.index] = res.rival_refid;
|
||||
});
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Rivals
|
||||
.card-content
|
||||
form(method="post" action="/emit/updateIIDXRival")
|
||||
.field
|
||||
input(type="text" name="refid", value=refid readonly hidden)
|
||||
label.label SP Rivals
|
||||
.body
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival1")
|
||||
each i in rival_list
|
||||
if my_sp_rival[0] != null
|
||||
option(selected=(i[0]==my_sp_rival[0]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival2")
|
||||
each i in rival_list
|
||||
if my_sp_rival[1] != null
|
||||
option(selected=(i[0]==my_sp_rival[1]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival3")
|
||||
each i in rival_list
|
||||
if my_sp_rival[2] != null
|
||||
option(selected=(i[0]==my_sp_rival[2]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival4")
|
||||
each i in rival_list
|
||||
if my_sp_rival[3] != null
|
||||
option(selected=(i[0]==my_sp_rival[3]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="sp_rival5")
|
||||
each i in rival_list
|
||||
if my_sp_rival[4] != null
|
||||
option(selected=(i[0]==my_sp_rival[4]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.field
|
||||
label.label DP Rivals
|
||||
.body
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival1")
|
||||
each i in rival_list
|
||||
if my_dp_rival[0] != null
|
||||
option(selected=(i[0]==my_dp_rival[0]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival2")
|
||||
each i in rival_list
|
||||
if my_dp_rival[1] != null
|
||||
option(selected=(i[0]==my_dp_rival[1]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival3")
|
||||
each i in rival_list
|
||||
if my_dp_rival[2] != null
|
||||
option(selected=(i[0]==my_dp_rival[2]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival4")
|
||||
each i in rival_list
|
||||
if my_dp_rival[3] != null
|
||||
option(selected=(i[0]==my_dp_rival[3]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.control
|
||||
.select
|
||||
select(name="dp_rival5")
|
||||
each i in rival_list
|
||||
if my_dp_rival[4] != null
|
||||
option(selected=(i[0]==my_dp_rival[4]) value=i[0]) #{i[1]} [#{i[2]}]
|
||||
else
|
||||
option(value=i[0]) #{i[1]} [#{i[2]}]
|
||||
.field
|
||||
button.button.is-primary(type="submit")
|
||||
span.icon
|
||||
i.mdi.mdi-check
|
||||
span Submit
|
||||
|
|
@ -1,25 +1,25 @@
|
|||
//DATA//
|
||||
score: DB.Find(refid, { collection: 'score' })
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Score
|
||||
.card-content
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th Music ID
|
||||
th EXSCORE [SPB~DPL]
|
||||
th Miss Count [SPB~DPL]
|
||||
th Clear Lamp [SPB~DPL]
|
||||
tbody
|
||||
each i in score
|
||||
tr
|
||||
td #{i.mid}
|
||||
td #{i.esArray}
|
||||
td #{i.mArray}
|
||||
td #{i.cArray}
|
||||
//DATA//
|
||||
score: DB.Find(refid, { collection: 'score' })
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Score
|
||||
.card-content
|
||||
table.table
|
||||
thead
|
||||
tr
|
||||
th Music ID
|
||||
th EXSCORE [SPB~DPL]
|
||||
th Miss Count [SPB~DPL]
|
||||
th Clear Lamp [SPB~DPL]
|
||||
tbody
|
||||
each i in score
|
||||
tr
|
||||
td #{i.mid}
|
||||
td #{i.esArray}
|
||||
td #{i.mArray}
|
||||
td #{i.cArray}
|
||||
27
iidx@asphyxia/webui/profile_-data.pug
Normal file
27
iidx@asphyxia/webui/profile_-data.pug
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-account-edit
|
||||
| Data Management
|
||||
.card-content
|
||||
.field
|
||||
label.label [!] This will overwrite exsiting scores
|
||||
form(method="post" action="/emit/importScoreData")
|
||||
.field
|
||||
input(type="text" name="refid", value=refid readonly hidden)
|
||||
input.input(type="text" name="data" placeholder="Paste score JSON data")
|
||||
p
|
||||
button.button.is-primary(type="submit")
|
||||
span.icon
|
||||
i.mdi.mdi-check
|
||||
span Score Import
|
||||
.field
|
||||
form(method="post" action="/emit/exportScoreData")
|
||||
.field
|
||||
input(type="text" name="refid", value=refid readonly hidden)
|
||||
button.button.is-primary(type="submit")
|
||||
span.icon
|
||||
i.mdi.mdi-check
|
||||
span Score Export
|
||||
Loading…
Reference in New Issue
Block a user