diff options
Diffstat (limited to 'web/src')
| -rw-r--r-- | web/src/lib/devData.json | 27 | ||||
| -rw-r--r-- | web/src/routes/+page.svelte | 6 |
2 files changed, 31 insertions, 2 deletions
diff --git a/web/src/lib/devData.json b/web/src/lib/devData.json new file mode 100644 index 0000000..9f99e61 --- /dev/null +++ b/web/src/lib/devData.json @@ -0,0 +1,27 @@ +[ + { "title": "Deutschland", "artist": "Rammstein", "uri": "1", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "2", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "3", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "4", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "5", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "6", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "7", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "8", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "9", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "10", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "11", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "12", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "13", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "14", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "15", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "16", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "17", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "18", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "19", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "20", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "21", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "22", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "23", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "24", "source": "dev", "weight": 0 }, + { "title": "Deutschland", "artist": "Rammstein", "uri": "25", "source": "dev", "weight": 0 } +] diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index 28177e2..dd23681 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -5,11 +5,13 @@ import pauseSVG from '../svg/pause.svg'; import type { WsMessage, Song, SearchResponse } from '../lib/api'; import API from '../lib/api'; + import devData from '../lib/devData.json'; + import { dev } from '$app/environment'; API.baseUrl = '/'; let status: 'paused' | 'playing' = 'paused'; let currentSong: Song | null = null; - let playlist: Array<Song> = []; + let playlist: Array<Song> = dev ? devData : []; let votes: Map<string, 'up' | 'down'> = new Map(); let search = ''; @@ -167,7 +169,7 @@ overflow-y: scroll; display: flex; flex-direction: column; - align-items: center; + align-items: center; } } @media not (max-width: 50em) { |
