add uninstall button

This commit is contained in:
llama 2025-10-20 10:04:38 +08:00
parent 54d9a19a1c
commit 7b5afb8dd8
No known key found for this signature in database
GPG key ID: 0B7543854B9413C3

View file

@ -13,11 +13,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
existing, existing,
allowBetas, allowBetas,
choose, choose,
uninstall,
}: { }: {
releases: Versions; releases: Versions;
existing: ExistingVersions; existing: ExistingVersions;
allowBetas: boolean; allowBetas: boolean;
choose: (version: string, existing: boolean, current?: string) => void; choose: (version: string, existing: boolean, current?: string) => void;
uninstall: (() => void) | null;
} = $props(); } = $props();
let availableVersions = $derived( let availableVersions = $derived(
@ -77,6 +79,13 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<EnumSelector bind:value={selected} choices={availableVersions} /> <EnumSelector bind:value={selected} choices={availableVersions} />
</div> </div>
</Row> </Row>
{#if uninstall != null}
<Row class="centre m-3">
<button class="btn btn-primary" onclick={uninstall}>
{$tr.launcherUninstall()}
</button>
</Row>
{/if}
</div> </div>
<style lang="scss"> <style lang="scss">