[READ-ONLY] Mirror of https://github.com/probablykasper/ferrum. Music library app for Mac, Linux and Windows ferrum.kasper.space
electron linux macos music music-library music-player napi windows
0

Configure Feed

Select the types of activity you want to include in your feed.

Simplify cellProperties

Kasper (May 28, 2025, 11:34 AM +0200) 38c4d4b6 52b5f9c3

+6 -14
+6 -14
src/components/TrackList.svelte
··· 269 269 270 270 let grid: HTMLRevoGridElement 271 271 272 - type ColumnDef = ColumnRegular & 272 + type ColumnRefined = ColumnRegular & { prop: string } 273 + type ColumnDef = ColumnRefined & 273 274 ( 274 275 | { 275 276 width_px: number ··· 388 389 'dateAdded', 389 390 'year', 390 391 ] 391 - let columns: ColumnRegular[] = load_columns() 392 + let columns: ColumnRefined[] = load_columns() 392 393 onMount(() => (columns = load_columns())) 393 - function load_columns(): ColumnRegular[] { 394 + function load_columns(): ColumnRefined[] { 394 395 let loaded_columns = view_options.columns 395 396 if (loaded_columns.length === 0) { 396 397 loaded_columns = [...default_columns] ··· 414 415 name: col.name === 'Image' ? '' : col.name, 415 416 size, 416 417 columnProperties() { 417 - const classes: Record<string, boolean> = {} 418 - classes[col.prop] = true 419 - return { 420 - class: classes, 421 - } 418 + return { class: col.prop } 422 419 }, 423 420 cellProperties() { 424 - const classes: Record<string, boolean> = {} 425 - classes[col.prop] = true 426 - return { 427 - class: classes, 428 - draggable: true, 429 - } 421 + return { class: col.prop, draggable: true } 430 422 }, 431 423 } 432 424 })