wire up uninstall button properly

This commit is contained in:
Tyler Wilding 2022-06-01 22:28:13 -04:00
parent d18ab4e1eb
commit 8c3d65171a
No known key found for this signature in database
GPG key ID: A89403EB356ED106
3 changed files with 46 additions and 49 deletions

View file

@ -1,7 +1,7 @@
<script>
import { setInstallStatus } from "$lib/config";
import { SUPPORTED_GAME } from "$lib/constants";
import { navigate } from "svelte-routing";
import { launchGame } from "$lib/launch";
function onClickConfig() {}
@ -11,8 +11,8 @@
}
async function onClickUninstall() {
// TODO - refresh the UI
await setInstallStatus(SUPPORTED_GAME.Jak1, false);
navigate("/jak1", { replace: true });
}
</script>

View file

@ -1,4 +1,5 @@
<script>
import "./progress.css";
export let step;
</script>
@ -16,50 +17,3 @@
</div>
{/if}
</section>
<style>
.progress {
display: flex;
overflow: hidden;
height: 30px;
background-color: #ecf0f1;
width: 75%;
margin: 20px auto;
}
.progress-bar {
overflow: hidden;
text-align: center;
background-color: dodgerblue;
}
.progress-bar-animated {
position: relative;
}
.progress-bar-animated::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5));
transform: translateX(-100%);
animation: progress-bar-shine 2s infinite;
}
@keyframes progress-bar-shine {
to {
transform: translateX(0);
opacity: 0.1;
}
}
.status {
justify-content: center;
align-items: center;
text-align: center;
}
</style>

View file

@ -0,0 +1,43 @@
.progress {
display: flex;
overflow: hidden;
height: 30px;
background-color: #ecf0f1;
width: 75%;
margin: 20px auto;
}
.progress-bar {
overflow: hidden;
text-align: center;
background-color: dodgerblue;
}
.progress-bar-animated {
position: relative;
}
.progress-bar-animated::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.5));
transform: translateX(-100%);
animation: progress-bar-shine 2s infinite;
}
@keyframes progress-bar-shine {
to {
transform: translateX(0);
opacity: 0.1;
}
}
.status {
justify-content: center;
align-items: center;
text-align: center;
}