diff --git a/.changeset/ready-animals-drum.md b/.changeset/ready-animals-drum.md new file mode 100644 index 0000000..0283af9 --- /dev/null +++ b/.changeset/ready-animals-drum.md @@ -0,0 +1,5 @@ +--- +'studytimer.io': patch +--- + +Revert the exercises selection in the settings form from a multi-select dropdown to checkboxes to allow users to select multiple exercises per category more easily. diff --git a/src/app.js b/src/app.js index abcb687..27dcdcc 100644 --- a/src/app.js +++ b/src/app.js @@ -133,6 +133,17 @@ export class App extends LitElement { } } + get #activeCategoryExercises() { + return EXERCISES_BY_CATEGORY_MAP.get(this._activeCategoryTab) ?? []; + } + + get #selectedCategoryExercises() { + return ( + this._settingsFormValues.exercisesByCategory[this._activeCategoryTab] ?? + [] + ); + } + render() { return html`${!this._isPageNotFound ? html`` @@ -279,7 +290,6 @@ export class App extends LitElement { showMotivationalQuote, enableNotifications, showExercises, - exercisesByCategory, exerciseReps, exerciseSets, pomodoroMinutes, @@ -288,14 +298,6 @@ export class App extends LitElement { audioSound, audioVolume, } = this._settingsFormValues; - const activeCategoryExercises = - EXERCISES_BY_CATEGORY_MAP.get( - /** @type {import("index.d.js").ExerciseCategory} */ ( - this._activeCategoryTab - ) - ) ?? []; - const selectedCategoryExercises = - exercisesByCategory[this._activeCategoryTab] ?? []; return html`