Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ async function openViewContents() {
const projectMap = new Map(projects.map((p: Labrinth.Projects.v2.Project) => [p.id, p]))

const contentItems: ContentItem[] = deps.map(
(dep: Labrinth.Versions.v2.Dependency): ContentItem => {
(dep: Labrinth.Versions.v2.Dependency, index: number): ContentItem => {
const depProject = dep.project_id ? projectMap.get(dep.project_id) : null
// @ts-expect-error - version_id is missing from the type for some reason
const depVersion = dep.version_id
Expand All @@ -323,6 +323,7 @@ async function openViewContents() {
: null

return {
id: dep.project_id ?? dep.file_name ?? `dependency-${index}`,
file_name: dep.file_name ?? depProject?.title ?? 'Unknown',
project_type: depProject?.project_type ?? 'mod',
has_update: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ function handleSort(column: ContentCardTableSortColumn) {
? 'bg-surface-1.5'
: 'bg-surface-2',
'border-0 border-t border-solid border-surface-4',
item.id === highlightedItemId
highlightedItemId && item.id === highlightedItemId
? 'outline outline-2 -outline-offset-2 outline-brand'
: '',
visibleRange.start + idx === items.length - 1 && !flat ? 'rounded-b-[20px]' : '',
Expand Down Expand Up @@ -540,7 +540,9 @@ function handleSort(column: ContentCardTableSortColumn) {
? 'bg-surface-1.5'
: 'bg-surface-2',
'border-0 border-t border-solid border-surface-4',
item.id === highlightedItemId ? 'outline outline-2 -outline-offset-2 outline-brand' : '',
highlightedItemId && item.id === highlightedItemId
? 'outline outline-2 -outline-offset-2 outline-brand'
: '',
index === items.length - 1 && !flat ? 'rounded-b-[20px]' : '',
]"
@select="(val, event) => toggleItemSelection(item.id, val ?? false, index, event)"
Expand Down
Loading