feat: add icon support to app info display and update styles for improved layout in index.scss

This commit is contained in:
PandaDEV 2025-03-15 01:08:53 +01:00
parent f890851a59
commit 1ec040ef1e
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C
5 changed files with 71 additions and 160 deletions

View file

@ -59,6 +59,7 @@
<span
:class="{ 'url-truncate': row.isUrl }"
:data-text="row.value">
<img v-if="row.icon" :src="row.icon" :alt="String(row.value)">
{{ row.value }}
</span>
</div>
@ -747,7 +748,12 @@ const infoRows = computed(() => {
if (!getInfo.value) return [];
const commonRows = [
{ label: "Source", value: getInfo.value.source, isUrl: false },
{
label: "Source",
value: getInfo.value.source,
isUrl: false,
icon: selectedItem.value?.source_icon ? `data:image/png;base64,${selectedItem.value.source_icon}` : undefined
},
{
label: "Content Type",
value:
@ -759,7 +765,7 @@ const infoRows = computed(() => {
const typeSpecificRows: Record<
ContentType,
Array<{ label: string; value: string | number; isUrl?: boolean }>
Array<{ label: string; value: string | number; isUrl?: boolean; icon?: string }>
> = {
[ContentType.Text]: [
{ label: "Characters", value: (getInfo.value as InfoText).characters },