Skip to content
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

Add settings options and overlay buttons #10

Merged
merged 4 commits into from
Aug 21, 2020
Merged

Conversation

theoarav
Copy link
Contributor

Added buttons in overlay to reopen settings window and force refresh of tabs.
image

Added settings to customize interval between refresh and change the size of the overlay.
image
image

@theoarav theoarav mentioned this pull request Jul 28, 2020
Copy link
Owner

@pboutin pboutin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is super cool, once I have the time to play with it, I will merge this :)

main.js Outdated Show resolved Hide resolved
@@ -48,5 +45,16 @@ const refreshChaosRecipe = async () => {
};

ipcRenderer.on('forceChaosRecipeRefresh', () => refreshChaosRecipe());
setInterval(() => refreshChaosRecipe(), POLLING_DELAY);
setInterval(() => refreshChaosRecipe(), settings.get('overlay.refreshTime') * 1000 || 60000);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep a DEFAULT_REFRESH_TIME constant, so we can do
(settings.get('overlay.refreshTime') || DEFAULT_REFRESH_TIME) * 1000

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea, it's more user friendly like this :)
I don't know why I can't commit on this change, so if u can do it that's nice :)

src/ui/settings.html Outdated Show resolved Hide resolved
src/ui/settings.js Outdated Show resolved Hide resolved
theoarav and others added 3 commits August 21, 2020 01:19
Labels for overlay sizes

Co-authored-by: Pascal Boutin <contact@pboutin.net>
Constant for refresh time

Co-authored-by: Pascal Boutin <contact@pboutin.net>
Apply labels for overlay sizes in html

Co-authored-by: Pascal Boutin <contact@pboutin.net>
@pboutin
Copy link
Owner

pboutin commented Aug 21, 2020

Will merge and apply the final tweaks on master directly, thanks for the contribution !

@pboutin pboutin merged commit 18c9aba into pboutin:master Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants