plugins/ddr@asphyxia/webui/js/profile_settings.js
2021-06-07 17:29:08 +09:00

50 lines
1.5 KiB
JavaScript

$('#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());
});