feat: misc improvements

This commit is contained in:
2025-03-18 23:27:17 +00:00
parent fe1a32f31b
commit 1191cdd95c
15 changed files with 264 additions and 68 deletions

View File

@ -1,4 +1,5 @@
<script setup lang="ts">
import { computed } from 'vue';
import Chip from 'primevue/chip';
import { convertFileSrc } from '@tauri-apps/api/core';
import { Feature, Package } from '../types';
@ -13,8 +14,8 @@ const props = defineProps({
showIcon: Boolean,
});
const iconSrc = () => {
const icon = props.pkg?.icon;
const iconSrc = computed(() => {
const icon = props.pkg?.loc?.icon ?? props.pkg?.rmt?.icon;
if (icon === undefined) {
return '';
@ -23,13 +24,13 @@ const iconSrc = () => {
} else {
return convertFileSrc(icon);
}
};
});
</script>
<template>
<img
v-if="showIcon"
:src="iconSrc()"
:src="iconSrc"
class="self-center rounded-sm"
width="32px"
height="32px"
@ -66,7 +67,7 @@ const iconSrc = () => {
<span
v-if="hasFeature(pkg, Feature.Aime)"
v-tooltip="'Aime'"
class="pi pi-wrench ml-1 text-purple-400"
class="pi pi-credit-card ml-1 text-purple-400"
>
</span>
<span