aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorgammelalf <gammelalf@hopfen.space>2023-01-24 13:35:59 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2023-02-24 12:47:40 +0100
commit933e3b7e5a3a18a8c3f315f6c0d8c2375ceecb3c (patch)
tree7f0a5233dfdb73b4d66af37f223e1d14d31f0d94 /web
parent814958cb462e2622c912c4018498895e99ca02b2 (diff)
downloadWRMS-933e3b7e5a3a18a8c3f315f6c0d8c2375ceecb3c.tar.gz
WRMS-933e3b7e5a3a18a8c3f315f6c0d8c2375ceecb3c.zip
Added dev data
Diffstat (limited to 'web')
-rw-r--r--web/src/lib/devData.json27
-rw-r--r--web/src/routes/+page.svelte6
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) {