wnr
wnr copied to clipboard
Add preset time dropdowns for work, rest, and loop durations
Add preset time dropdowns for work, rest, and loop durations
Overview
This PR introduces a new user interface improvement to wnr that allows users to quickly select common time durations through dropdown menus with a scrollable interface, rather than manually typing values each time.
Features
- Added preset time dropdowns for work sessions, rest sessions, and loop counts
- Implemented a scrollable dropdown menu for better UX when many presets are available
- Styled dropdowns to match the existing application design language
- Color-coded dropdowns to match their respective functions (work=red, rest=blue, onlyRest=purple)
- Added hover effects for better visual feedback
UI Changes
- Small dropdown toggle buttons next to time input fields
- Dropdown menus appear on click with preset time values
- Scrollable dropdown menus that can accommodate multiple options
- Consistent styling with the rest of the application
Two issues to mention:
- Must fix: it does not support multi-languages.
- Shall better fix: the scroll-down list does not support dark mode.
I have fixed the problem and it could now support multi-language.
Feedbacks:
- Now your new commits introduce new bugs. If you click option+command+i will see bugs happening.
- And your way of localization is not preferred, that it hard-coded strings inside the code. All strings referred must only be located in locales/*.json and you must have no redundant strings inside it. And although that is not the case right now, but let's imagine we are having the fourth type of localization support and your current code will not work in this way.
- In
theme.js, you just created new darkmode support, which is redundant. Look at the code below you will find that. If you use AI, you must recheck that you are not introducing unnecessary changes and revert them using your git.
