11<script setup lang="ts">
2- import { PhArrowSquareOut , PhGearFine } from " @phosphor-icons/vue" ;
2+ import { PhArrowSquareOut , PhGearFine , PhTrash } from " @phosphor-icons/vue" ;
33import ActionButton from " @/components/ActionButton.vue" ;
44import UrlButton from " @/components/UrlButton.vue" ;
55
@@ -14,48 +14,54 @@ defineProps<{
1414}>();
1515defineEmits <{
1616 (e : " install" ): void ;
17+ (e : " uninstall" ): void ;
1718}>();
1819 </script >
1920
2021<template >
21- <div class =" flex flex-col gap-2 " >
22- <div class =" flex flex-wrap gap-2 justify-between items-baseline " >
22+ <div class =" flex gap-3 items-center " >
23+ <div class =" flex-1 self-start " >
2324 <h3 class =" font-semibold" >{{ name }}</h3 >
24-
25- <div class =" flex gap-2 justify-end items-baseline" >
26- <ActionButton
27- :disabled =" !canInstall"
28- class =" whitespace-nowrap"
29- :class =" { 'button-primary': canInstall && !isInstalled }"
30- @click =" $emit('install')"
31- >
32- <PhGearFine weight =" bold" class =" inline mb-1 mr-1" />
33- {{
34- $t(
35- !isInstalled
36- ? "exports.tools.install"
37- : "exports.tools.reinstall",
38- )
39- }}
40- </ActionButton >
41-
42- <UrlButton
43- v-if =" isInstalled"
44- :href =" showUrl"
45- target =" _blank"
46- class =" button-primary"
47- >
48- <PhArrowSquareOut weight =" bold" class =" inline mb-1 mr-1" />
49- {{ $t("exports.tools.view") }}
50- </UrlButton >
25+ <div class =" text-sm text-gray-500 dark:text-gray-400" >
26+ <div >{{ info }}</div >
27+ <a v-if =" linkUrl && linkText" :href =" linkUrl" target =" _blank" >
28+ {{ linkText }}
29+ </a >
5130 </div >
5231 </div >
5332
54- <div class =" text-sm text-gray-500 dark:text-gray-400" >
55- <div >{{ info }}</div >
56- <a v-if =" linkUrl && linkText" :href =" linkUrl" target =" _blank" >
57- {{ linkText }}
58- </a >
33+ <div class =" flex flex-col gap-2 items-end" >
34+ <UrlButton
35+ v-if =" isInstalled"
36+ :href =" showUrl"
37+ target =" _blank"
38+ class =" button-primary"
39+ >
40+ <PhArrowSquareOut weight =" bold" class =" inline mb-1 mr-1" />
41+ {{ $t("exports.tools.view") }}
42+ </UrlButton >
43+
44+ <ActionButton
45+ :disabled =" !canInstall"
46+ class =" whitespace-nowrap"
47+ :class =" { 'button-primary': canInstall && !isInstalled }"
48+ @click =" $emit('install')"
49+ >
50+ <PhGearFine weight =" bold" class =" inline mb-1 mr-1" />
51+ {{
52+ $t(!isInstalled ? "exports.tools.install" : "exports.tools.reinstall")
53+ }}
54+ </ActionButton >
55+
56+ <ActionButton
57+ v-if =" isInstalled"
58+ :disabled =" !canInstall"
59+ class =" whitespace-nowrap button-mute"
60+ @click =" $emit('uninstall')"
61+ >
62+ <PhTrash weight =" bold" class =" inline mb-1 mr-1" />
63+ {{ $t("exports.tools.uninstall") }}
64+ </ActionButton >
5965 </div >
6066 </div >
6167</template >
0 commit comments