feat: new grouping options

This commit is contained in:
2025-04-28 22:00:33 +00:00
parent ee49da3665
commit 0add9200a6
8 changed files with 219 additions and 47 deletions

View File

@ -2,9 +2,13 @@
import { ref } from 'vue';
import Chip from 'primevue/chip';
import { convertFileSrc } from '@tauri-apps/api/core';
import { listen } from '@tauri-apps/api/event';
import { invoke } from '../invoke';
import { Feature, Package } from '../types';
import { hasFeature, needsUpdate } from '../util';
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
const props = defineProps({
pkg: Object as () => Package,
@ -17,7 +21,7 @@ const props = defineProps({
const icon = ref('/no-icon.png');
(async () => {
const reloadIcons = async () => {
const src = props.pkg?.loc?.icon ?? props.pkg?.rmt?.icon;
if (src === undefined) {
@ -32,7 +36,11 @@ const icon = ref('/no-icon.png');
icon.value = '/no-icon.png';
}
}
})();
};
reloadIcons();
listen('reload-icons', reloadIcons);
</script>
<template>
@ -97,7 +105,12 @@ const icon = ref('/no-icon.png');
v-if="showNamespace && pkg?.namespace"
class="text-sm opacity-75"
>
by&nbsp;{{ pkg.namespace }}
&nbsp;{{
t('by', { namespace: pkg.namespace }).replaceAll(
' ',
'&nbsp;'
)
}}
</span>
<span class="m-2">
<span