8000 Move restart warning to Toast by duckAxe · Pull Request #926 · bitaxeorg/ESP-Miner · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Move restart warning to Toast #926

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

Merged

Conversation

duckAxe
Copy link
Contributor
@duckAxe duckAxe commented May 16, 2025

The hint You must restart this device after saving for changes to take effect is currently right next to the save button. That does not look good. It would be much better if this warning only appeared when needed. For example, when saving.

My idea is to display the warning as a Toast notification. This way, the user would immediately notice the warning when saving.

This affects 3 settings pages: Pool, Network, (Miner) Settings.

Before
localhost_4200_

After
localhost_4200_ (2) (1) 11

@duckAxe duckAxe changed the title Move save warning to Toastr Move restart warning to Toastr May 16, 2025
@duckAxe duckAxe changed the title Move restart warning to Toastr Move restart warning to Toast May 18, 2025
Copy link
Collaborator
@mutatrum mutatrum left a comment

Choose a reason for hiding this comment

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

LGTM, makes a lot of sense to move this to toasters. I assume this is also fine on mobile?

There are some other banner type warnings as well, should they all be moved to toasters?

< 8000 div class="TimelineItem-badge">
@mutatrum mutatrum merged commit e87205e into bitaxeorg:dev-latest May 23, 2025
2 checks passed
@mutatrum
Copy link
Collaborator

Merges, created #944 for possible follow-up.

@WantClue
Copy link
Collaborator

You introduced a misbehavior with this PR, the "you must restart your device for changes to take effect" is now being shown every single time. Which is incorrect. This is only needed on certain changes and not always @duckAxe would be nice if you can tackle this?

@duckAxe
Copy link
Contributor Author
duckAxe commented May 24, 2025

@WantClue Have you tested my changes? The message only pops up when you save something and only on the pages I mentioned. Check also my code changes on .ts files. There is always a condition around the message.
And can you pls provide a screenshot or vid.

@WantClue
Copy link
Collaborator

@WantClue Have you tested my changes? The message only pops up when you save something and only on the pages I mentioned. Check also my code changes on .ts files. There is always a condition around the message. And can you pls provide a screenshot or vid.

@duckAxe Yes I've tested them, the provided vid e.g. shows the toast on the freq change as an example. Which does change on the fly and doesn't req a reboot

2025-05-25.15-14-29.mp4

@duckAxe
Copy link
Contributor Author
duckAxe commented May 25, 2025

@WantClue The behavior shown in the video is expected.
Before I made the change, the text was always behind the Save button. I moved the text to Toastr, so now the text appears after clicking the Save button.

In both cases, restarting the device after saving is suggested. I see no difference in the way the user is communicated with.

Before my PR
Screenshot 2025-05-25 at 15 23 30

@duckAxe
Copy link
Contributor Author
duckAxe commented May 25, 2025

@WantClue Do you mean something else? Are you saying that a restart isn't required for every field change? Do I understand correctly? If so, that wasn't the case before I made the change. The message "You must restart ..." was always visible, making it clear to the user that a restart was necessary for every adjustment.

If we want to show the message only for certain settings, we can do so in a new PR. In order to do so, I need to know which settings require a restart and which do not.

@mutatrum
Copy link
Collaborator

That would be #741, which is still open.

@duckAxe
Copy link
Contributor Author
duckAxe commented May 25, 2025

That would be #741, which is still open.

Exactly.

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.

3 participants
0