Minor improvements

This commit is contained in:
WardPearce
2026-03-25 02:40:39 +13:00
parent fc64635b73
commit da3d587a1a
3 changed files with 10 additions and 3 deletions
@@ -1,4 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { proxyGoogleImage } from '$lib/images';
import { avatarFromChannelId } from '$lib/thumbnail';
import { mergeAttrs } from 'melt';
@@ -22,6 +24,9 @@
<img class="circle small" {...avatar.image} alt="Channel profile" />
<button
class="circle secondary-container"
onclick={() => {
goto(resolve('/channel/[authorId]', { authorId }));
}}
{...mergeAttrs(avatar.fallback, {
style: 'text-transform: uppercase;border-radius: 2.5rem !important;'
})}>{author[0]}</button
@@ -45,8 +45,6 @@
});
function goToItem(uniqueItemId: string) {
feedLastItemId.set(uniqueItemId);
const articleElement = document.getElementById(uniqueItemId);
if (articleElement) {
const clickable = articleElement.querySelector('a, button');
@@ -74,6 +72,8 @@
{@const uniqueItemId = extractUniqueId(item)}
{@const spatialItem = spatialMenu.getItem(item, {
onSelect: () => {
feedLastItemId.set(uniqueItemId);
if ($isAndroidTvStore) goToItem(uniqueItemId);
}
})}
@@ -81,6 +81,8 @@
<article
{...mergeAttrs(spatialItem.attrs, {
onclick: () => {
feedLastItemId.set(uniqueItemId);
if ($isAndroidTvStore) goToItem(uniqueItemId);
},
id: uniqueItemId
File diff suppressed because one or more lines are too long