mirror of
https://github.com/dathere/qsv-easy-windows-installer.git
synced 2025-12-27 19:47:00 +00:00
feat: add alert, version info, and async run
This commit is contained in:
parent
ca5bc328fc
commit
f776d7f293
3 changed files with 22 additions and 10 deletions
13
src/App.tsx
13
src/App.tsx
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue