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

Window Controls / close confirmation alert: Close window automatically after timeout #1657

Open
DNin01 opened this issue Aug 24, 2024 · 1 comment

Comments

@DNin01
Copy link
Collaborator

DNin01 commented Aug 24, 2024

It's good to check with the user that it is okay to close or exit something before that app is allowed to close itself, but sometimes you may want it to automatically close itself when you're away, for example, when using software that exports something.

A good solution for these scenarios is to add a countdown that closes the window automatically when it ends and can be stopped by clicking a cancel button before it ends. Think the alert message that appears when you change your display settings, which has a timer to make sure that if you change something that makes you unable to see the screen, the changes will automatically revert after a short time.

Here's an example:

Close.tab.confirmation.mp4

This would also involve replacing the alert() call, which can't time out, with a custom modal (which TurboWarp already has, it just doesn't yet have a specific modal for confirming to close a window and that times out).

@CubesterYT
Copy link
Collaborator

CubesterYT commented Aug 24, 2024

Interesting idea. The original behavior was it closes regardless, but before merge Garbo was the one with the non packaged warning pop up. But how would it work with the current setup, because alert() effectively paused the code till dismissed.

EDIT:
Didn't see the last part, sorry.

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

No branches or pull requests

2 participants