feat: add alert, version info, and async run

This commit is contained in:
rzmk 2025-04-22 10:45:50 -04:00
parent ca5bc328fc
commit f776d7f293
No known key found for this signature in database
3 changed files with 22 additions and 10 deletions

View file

@ -22,9 +22,14 @@ function App() {
disabled={loading}
onClick={() => {
setLoading(true);
invoke("run_path_update").finally(() => {
setLoading(false);
});
invoke("run_path_update")
.then((message) => {
setLoading(false);
alert("Successfully installed qsv. Try opening a new terminal and run a qsv command! Version info: " + message);
})
.finally(() => {
setLoading(false);
});
}}
className="mx-auto w-full flex justify-center bg-blue-400"
>
@ -36,7 +41,7 @@ function App() {
</button>
{loading && (
<p className="mt-4 text-center">
Downloading and installing to PATH. This may take a few seconds...
Downloading and installing qsv to PATH. This may take a few seconds...
</p>
)}
</main>