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

Changing tab on the top will reset the flashing process, resulting in a brick #45

Open
ggoraa opened this issue Apr 21, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@ggoraa
Copy link

ggoraa commented Apr 21, 2023

image
If i select a tab over here while I am flashing my radio, it will reset, resulting in a bricked radio
I would suggest just disabling those tabs while flashing, with a hover tooltip explaining why it's disabled

@freshollie
Copy link
Collaborator

This is a good point. I need to fix the deploy process for our new hosting but happy to get this in as a feature. For the bricked radio, is it possible to unbrick?

@ggoraa
Copy link
Author

ggoraa commented Apr 22, 2023

Yea, I can easily unbrick it by just flashing again, bootloader is not affected on error

@raphaelcoeffic raphaelcoeffic added the bug Something isn't working label Apr 12, 2024
@raphaelcoeffic
Copy link
Member

Just an idea at this point: what about folding the title bar while flashing and unfolding it once flashing is done?

@pfeerick
Copy link
Member

pfeerick commented Apr 24, 2024

I can't say I'm a fan of that idea (I don't like UIs that hide stuff and then give it back later). If going that way, I probably would have prefered a popup, which implies exclusive focus.

This is the relevant creation block for that menu:

<Menu
theme="dark"
mode="horizontal"
selectedKeys={[location.pathname.split("/")[1] as string]}
style={{ flex: 1, boxShadow: "none" }}
>
<Menu.Item key="flash">
<Link to="/flash">{t(`Radio firmware`)}</Link>
</Menu.Item>
<Menu.Item key="sdcard">
<Link to="/sdcard">{t(`SD Card content`)}</Link>
</Menu.Item>
{settings.expertMode && (
<Menu.Item key="dev">
<Link to="/dev">{t(`Dev tools`)}</Link>
</Menu.Item>
)}
</Menu>

I'm also relatively clueless regarding nodejs/electron, but am wondering if another style parameter can be added it that tracks a variable so that it can be disabled while at say the DeviceSelectionStep and OverviewStep steps (or perhaps just the latter?).

i.e. if pointer-events: none; can be injected, it will disabled the header buttons, but leave the GitHub and settings cog active (which should be safe, as one only changes options in place, and the other opens a new browser window). Setting pointer-events to auto will restore interaction with the menu options. Just can't readily see how to add that myself 🤪

@freshollie
Copy link
Collaborator

Yes, that could be an easy option. Another way is to just add a useBlocker on the flashing status page to prevent navigation whilst flashing is taking place:
https://reactrouter.com/en/main/hooks/use-blocker

@raphaelcoeffic
Copy link
Member

Yes, that could be an easy option. Another way is to just add a useBlocker on the flashing status page to prevent navigation whilst flashing is taking place: https://reactrouter.com/en/main/hooks/use-blocker

Thx for the hint! I'll look into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants