forked from akanyan/STARTLINER
feat: misc improvements
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user