Minor improvements
This commit is contained in:
@@ -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
Reference in New Issue
Block a user