Files
drop-app/main/components/DefaultProtonButton.vue
T
DecDuck 01335dadaf Async downloader, better Proton support (#183)
* feat: async downloader + other fixes

* feat: windows command parsing + use library path for install path

* feat: better proton support

* feat: style fixes and store button now uses in-app

* feat: emulator rename + umu emulator fix

* feat: bring process creation inline with docs

* fix: clippy
2026-02-06 23:24:14 +11:00

31 lines
739 B
Vue

<script setup lang="ts">
import { StarIcon } from "@heroicons/vue/24/solid";
import { invoke } from "@tauri-apps/api/core";
const props = defineProps<{
path?: string;
}>();
const model = defineModel<string | undefined>({ required: true });
const isDefault = computed(() => props.path == model.value);
async function setDefault() {
if (!props.path) return;
await invoke("set_default", { path: props.path });
model.value = props.path;
}
</script>
<template>
<button
:class="['p-0.5 rounded-full', isDefault ? 'bg-blue-500' : 'bg-zinc-800']"
@click="setDefault"
:disabled="!props.path"
>
<StarIcon
:class="['size-[0.7rem]', isDefault ? 'text-zinc-100' : 'text-zinc-100']"
/>
</button>
</template>