[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.

Design refinement

Kasper (Jan 22, 2024, 3:48 PM +0100) 2a4273dd 891b741e

+9 -25
+1
src/App.svelte
··· 211 211 212 212 <style lang="sass"> 213 213 :global(:root) 214 + --cubic-out: cubic-bezier(0.33, 1, 0.68, 1) 214 215 --player-bg-color: #17181c 215 216 --text-color: #e6e6e6 216 217 --drag-bg-color: #1e1f24
+1 -1
src/components/Button.svelte
··· 33 33 bottom: 0px 34 34 right: 0px 35 35 border-radius: 7px 36 - transition: all 120ms cubic-bezier(0.4, 0.0, 0.2, 1) 36 + transition: all 120ms var(--cubic-out) 37 37 button.normal 38 38 &::before 39 39 background-color: hsl(220, 100%, 46%)
+1 -1
src/components/Filter.svelte
··· 7 7 onDestroy( 8 8 ipcListen('filter', () => { 9 9 filterInput.select() 10 - }) 10 + }), 11 11 ) 12 12 </script> 13 13
-10
src/components/QueueItem.svelte
··· 1 - <script lang="ts" context="module"> 2 - const durations: number[] = [] 3 - let total_duration = 0 4 - </script> 5 - 6 1 <script lang="ts"> 7 2 import { methods, paths, trackMetadataUpdated } from '@/lib/data' 8 3 import { fade } from 'svelte/transition' ··· 16 11 let success: boolean | null = null 17 12 18 13 $: filePath = joinPaths(paths.tracksDir, track.file) 19 - 20 - const start = Date.now() 21 14 </script> 22 15 23 16 <div class="box"> ··· 42 35 alt="" 43 36 on:load={() => { 44 37 success = true 45 - durations.push(Date.now() - start) 46 - total_duration += durations[durations.length - 1] 47 - console.log('durations avg', total_duration / durations.length, durations) 48 38 }} 49 39 on:error={() => { 50 40 success = false
+3 -3
src/components/SidebarItems.svelte
··· 361 361 margin-left: 2px 362 362 margin-right: -8px 363 363 padding: 6px 364 - width: 6px 365 - height: 6px 364 + width: 7px 365 + height: 7px 366 366 z-index: 1 367 367 flex-shrink: 0 368 368 fill: white 369 - transition: 120ms transform cubic-bezier(0, 0.02, 0.2, 1) 369 + transition: 140ms transform var(--cubic-out) 370 370 .show > svg.arrow 371 371 transform: rotate(90deg) 372 372 .text
+2 -2
src/electron/main.ts
··· 71 71 72 72 protocol.registerBufferProtocol('trackimg', (request, callback) => { 73 73 const url = decodeURI(request.url) 74 - const track_id = url.substring(9) 74 + const path = url.substring(9) 75 75 addon 76 - .read_cover_async_path(track_id, 0) 76 + .read_cover_async_path(path, 0) 77 77 .then((buffer) => { 78 78 callback(Buffer.from(buffer)) 79 79 })
+1 -8
src/lib/data.ts
··· 1 1 import { writable } from 'svelte/store' 2 2 import { ipcRenderer } from '@/lib/window' 3 - import type { 4 - MsSinceUnixEpoch, 5 - TrackID, 6 - TrackList, 7 - TrackListID, 8 - TrackMd, 9 - Size, 10 - } from '../../ferrum-addon' 3 + import type { MsSinceUnixEpoch, TrackID, TrackList, TrackListID, TrackMd } from '../../ferrum-addon' 11 4 import { selection as pageSelection } from './page' 12 5 import { queue } from './queue' 13 6