cleanup
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
$('#change-name').on('click', () => {
|
||||
const name = $('#dancer_name').val().toUpperCase();
|
||||
|
||||
emit('updateName', { refid, name }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-weight').on('click', () => {
|
||||
const weight1 = $('#weight_1').val();
|
||||
const weight2 = $('#weight_2').val();
|
||||
const weight = weight1 + '.' + weight2;
|
||||
|
||||
emit('updateWeight', { refid, weight }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-display-calories').on('click', () => {
|
||||
const selected = $('#display_calories option:selected').val();
|
||||
|
||||
emit('updateDisplayCalories', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-arrow-skin').on('click', () => {
|
||||
const selected = $('#arrow_skin option:selected').val();
|
||||
|
||||
emit('updateArrowSkin', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-guideline').on('click', () => {
|
||||
const selected = $('#guideline option:selected').val();
|
||||
|
||||
emit('updateGuideline', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-filter').on('click', () => {
|
||||
const selected = $('#filter option:selected').val();
|
||||
|
||||
emit('updateFilter', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-judgment-priority').on('click', () => {
|
||||
const selected = $('#judgment_priority option:selected').val();
|
||||
|
||||
emit('updateJudgmentPriority', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
|
||||
$('#change-display-timing').on('click', () => {
|
||||
const selected = $('#display_timing option:selected').val();
|
||||
|
||||
emit('updateDisplayTiming', { refid, selected }).then(() => location.reload());
|
||||
});
|
||||
@@ -0,0 +1,280 @@
|
||||
//DATA//
|
||||
profile: DB.FindOne(refid, { collection: "profile" })
|
||||
profile3: DB.FindOne(refid, { collection: "profile3" })
|
||||
|
||||
-
|
||||
const onOff = [ "Off", "On" ];
|
||||
const characters = [ "All Character Random", "Man Random", "Female Random", "Yuni", "Rage", "Afro", "Jenny", "Emi", "Baby-Lon", "Gus", "Ruby", "Alice", "Julio", "Bonnie", "Zero", "Rinon" ];
|
||||
const arrowSkins = [ "Normal", "X", "Classic", "Cyber", "Medium", "Small", "Dot" ];
|
||||
const guidelines = [ "Off", "Border", "Center" ];
|
||||
const filters = [ "Off", "Dark", "Darker", "Darkest" ];
|
||||
const judgmentPrioritys = [ "Judgment priority", "Arrow priority" ];
|
||||
|
||||
if profile
|
||||
-
|
||||
const common = profile.usergamedata.COMMON.strdata.split(",");
|
||||
const option = profile.usergamedata.OPTION.strdata.split(",");
|
||||
|
||||
const name = common[25];
|
||||
const weight = common[17];
|
||||
const displayCalories = parseInt(common[3]);
|
||||
const character = parseInt(common[4]);
|
||||
const arrowSkin = parseInt(option[11]);
|
||||
const guideline = parseInt(option[13]);
|
||||
const filter = parseInt(option[12]);
|
||||
const judgmentPriority = parseInt(option[15]);
|
||||
const displayTiming = parseInt(option[16]);
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-cog
|
||||
| Profile Settings
|
||||
|
||||
.card-content
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Dancer Name
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="text", id="dancer_name", pattern="[A-Z]{8}", maxlength=8, value=name)
|
||||
p.control
|
||||
a.button.is-primary#change-name Change
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Workout Weight
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="number", id="weight_1", value=weight.split(".")[0])
|
||||
p.control
|
||||
input.input(type="number", id="weight_2", value=weight.split(".")[1])
|
||||
p.control
|
||||
a.button.is-primary#change-weight Change
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Workout Display Calories
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#display_calories
|
||||
if (displayCalories === 1)
|
||||
option(value=0) Off
|
||||
option(value=1, selected) On
|
||||
else
|
||||
option(value=0, selected) Off
|
||||
option(value=1) On
|
||||
p.control
|
||||
a.button.is-primary#change-display-calories Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Arrow Skin
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#arrow_skin
|
||||
each v, i in arrowSkins
|
||||
if (arrowSkin === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-arrow-skin Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Guideline
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#guideline
|
||||
each v, i in guidelines
|
||||
if (guideline === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-guideline Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Filter concentration
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#filter
|
||||
each v, i in filters
|
||||
if (filter === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-filter Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Judgment display priority
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#judgment_priority
|
||||
each v, i in judgmentPrioritys
|
||||
if (judgmentPriority === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-judgment-priority Submit
|
||||
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Display Timing judgment
|
||||
.field-body
|
||||
p.control
|
||||
.select
|
||||
select#display_timing
|
||||
each v, i in ["Off", "On"]
|
||||
if (displayTiming === i)
|
||||
option(value=i, selected) #{v}
|
||||
else
|
||||
option(value=i) #{v}
|
||||
p.control
|
||||
a.button.is-primary#change-display-timing Submit
|
||||
|
||||
else if profile3
|
||||
-
|
||||
const name = profile3.dancerName;
|
||||
const weight = profile3.weight;
|
||||
const dispWeight = profile3.isDispWeight;
|
||||
// const character = parseInt(common[4]);
|
||||
const arrowSkin = profile3.arrowDesign;
|
||||
const guideline = profile3.opGuideline;
|
||||
// const filter = parseInt(option[12]);
|
||||
const judgmentPriority = profile3.arrowPriority;
|
||||
const displayTiming = profile3.opTimingDisp;
|
||||
|
||||
div
|
||||
.card
|
||||
.card-header
|
||||
p.card-header-title
|
||||
span.icon
|
||||
i.mdi.mdi-cog
|
||||
| Profile (WIP)
|
||||
|
||||
.card-content
|
||||
.field.is-horizontal.has-addons
|
||||
.field-label.is-normal
|
||||
label.label Dancer Name
|
||||
.field-body
|
||||
p.control
|
||||
input.input(type="text", id="dancer_name", pattern="[A-Z]{8}", maxlength=8, value=name)
|
||||
//- p.control
|
||||
//- a.button.is-primary#change-name Change
|
||||
|
||||
//- .field.is-horizontal.has-addons
|
||||
//- .field-label.is-normal
|
||||
//- label.label Workout Weight
|
||||
//- .field-body
|
||||
//- p.control
|
||||
//- input.input(type="number", id="weight_1", value=weight.split(".")[0])
|
||||
//- p.control
|
||||
//- input.input(type="number", id="weight_2", value=weight.split(".")[1])
|
||||
//- p.control
|
||||
//- a.button.is-primary#change-weight Change
|
||||
|
||||
//- .field.is-horizontal.has-addons
|
||||
//- .field-label.is-normal
|
||||
//- label.label Workout Display Calories
|
||||
//- .field-body
|
||||
//- p.control
|
||||
//- .select
|
||||
//- select#display_calories
|
||||
//- if (dispWeight === 1)
|
||||
//- option(value=0) Off
|
||||
//- option(value=1, selected) On
|
||||
//- else
|
||||
//- option(value=0, selected) Off
|
||||
//- option(value=1) On
|
||||
//- p.control
|
||||
//- a.button.is-primary#change-display-calories Submit
|
||||
|
||||
//- .field.is-horizontal.has-addons
|
||||
//- .field-label.is-normal
|
||||
//- label.label Arrow Skin
|
||||
//- .field-body
|
||||
//- p.control
|
||||
//- .select
|
||||
//- select#arrow_skin
|
||||
//- each v, i in arrowSkins
|
||||
//- if (arrowSkin === i)
|
||||
//- option(value=i, selected) #{v}
|
||||
//- else
|
||||
//- option(value=i) #{v}
|
||||
//- p.control
|
||||
//- a.button.is-primary#change-arrow-skin Submit
|
||||
|
||||
//- .field.is-horizontal.has-addons
|
||||
//- .field-label.is-normal
|
||||
//- label.label Guideline
|
||||
//- .field-body
|
||||
//- p.control
|
||||
//- .select
|
||||
//- select#guideline
|
||||
//- each v, i in guidelines
|
||||
//- if (guideline === i)
|
||||
//- option(value=i, selected) #{v}
|
||||
//- else
|
||||
//- option(value=i) #{v}
|
||||
//- p.control
|
||||
//- a.button.is-primary#change-guideline Submit
|
||||
|
||||
//- .field.is-horizontal.has-addons
|
||||
//- .field-label.is-normal
|
||||
//- label.label Filter concentration
|
||||
//- .field-body
|
||||
//- p.control
|
||||
//- .select
|
||||
//- select#filter
|
||||
//- each v, i in filters
|
||||
//- if (filter === i)
|
||||
//- option(value=i, selected) #{v}
|
||||
//- else
|
||||
//- option(value=i) #{v}
|
||||
//- p.control
|
||||
//- a.button.is-primary#change-filter Submit
|
||||
|
||||
//- .field.is-horizontal.has-addons
|
||||
//- .field-label.is-normal
|
||||
//- label.label Judgment display priority
|
||||
//- .field-body
|
||||
//- p.control
|
||||
//- .select
|
||||
//- select#judgment_priority
|
||||
//- each v, i in judgmentPrioritys
|
||||
//- if (judgmentPriority === i)
|
||||
//- option(value=i, selected) #{v}
|
||||
//- else
|
||||
//- option(value=i) #{v}
|
||||
//- p.control
|
||||
//- a.button.is-primary#change-judgment-priority Submit
|
||||
|
||||
//- .field.is-horizontal.has-addons
|
||||
//- .field-label.is-normal
|
||||
//- label.label Display Timing judgment
|
||||
//- .field-body
|
||||
//- p.control
|
||||
//- .select
|
||||
//- select#display_timing
|
||||
//- each v, i in ["Off", "On"]
|
||||
//- if (displayTiming === i)
|
||||
//- option(value=i, selected) #{v}
|
||||
//- else
|
||||
//- option(value=i) #{v}
|
||||
//- p.control
|
||||
//- a.button.is-primary#change-display-timing Submit
|
||||
|
||||
script(src="static/js/profile_settings.js")
|
||||
Reference in New Issue
Block a user