-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix issue2534 #2658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue2534 #2658
Conversation
|
Wow @gregueiras It looks amazing! |
|
@ZeroX-DG Thank you 😄 |
I submitted an extra file, it was not necessary
|
@gregueiras can you resolve all the conflicts? |
I've resolved all the conflicts and changed the scheduled theme dropdown options to be the same as the default theme one. |
| } | ||
|
|
||
| /** | ||
| * Gets the total number of minutes and returns a string in the HH:MM format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this comment since it's not relevant anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed that comment
| if (rangeSlider && rangeBullet) { | ||
| const bulletPosition = rangeSlider.value / rangeSlider.max | ||
| rangeBullet.style.left = | ||
| bulletPosition * 574 + 6 * (1 - bulletPosition) + 'px' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain to me where the value 574 come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We thought that we needed to set the slider position, but I tried removing it and it is working as expected, so I've removed the handleSlider function and we can just use the handleUIChange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works fine but somehow the theme doesn't automatically change when the time is out of the range. I'm currently pretty busy so I can't investigate this. Can you help me investigate it? probably a problem that cause the interval to stop working correctly
| const isBetweenStartAndEnd = minutes >= start && minutes < end | ||
| const isBetweenEndAndStart = minutes >= start || minutes < end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've fixed the problem. It was just the way I was comparing the dates. If you scheduled the change to happen at 15:30, it would change only at 15:31.
|
@gregueiras it's still not working for me. I'm not quite sure what is causing it because at first the |
|
@gregueiras The problem that I'm having is the incorrect theme from config. I added this line in your refresh theme loop. |
|
I believe I've fixed it! Previously, I was changing the instance returned from ConfigManager, but wasn't really setting it anywhere. I've changed ThemeManager to save the changes (using ConfigManager's set), so it should work correctly now. Let me know if it's still not working for you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, works perfectly now. Thank you for this PR 👍



Description
Users can now schedule a theme to be applied

In this example, from 07:20 to 17:50 the theme to be used is Monokai, otherwise the Default theme is used
Issue fixed
Issue #2534 Scheduled themes or auto day/night mode
Type of changes
Checklist:
Note: I couldn't run the tests