mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2026-07-24 17:03:14 +10:00
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
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<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>
|
||||
Reference in New Issue
Block a user