Skip to content

Commit a2021c0

Browse files
committed
update songs page
- Songs won't be loaded anymore, so people can actually sign in and download their uploaded songs. - Added alert telling people the page will be reworked.
1 parent 9a7d5aa commit a2021c0

File tree

2 files changed

+23
-17
lines changed

2 files changed

+23
-17
lines changed

assets/js/songs.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ $(function () {
2424
});
2525

2626
//Get all accepted songs
27-
db.collectionGroup("songs").where("status", "==", 1).get().then(function (querySnapshot) {
28-
querySnapshot.forEach(function (doc) {
29-
var data = doc.data();
30-
songList.add({
31-
name: data.name,
32-
author: data.author,
33-
original_author: data.original_author,
34-
download_link: data.download_url,
35-
date: data.date.toDate().toLocaleDateString('en-GB', {
36-
day: 'numeric', month: 'short', year: 'numeric'
37-
}).replace(/ /g, ' '),
38-
timestamp: data.date.toDate().getTime()
39-
});
40-
});
27+
// db.collectionGroup("songs").where("status", "==", 1).get().then(function (querySnapshot) {
28+
// querySnapshot.forEach(function (doc) {
29+
// var data = doc.data();
30+
// songList.add({
31+
// name: data.name,
32+
// author: data.author,
33+
// original_author: data.original_author,
34+
// download_link: data.download_url,
35+
// date: data.date.toDate().toLocaleDateString('en-GB', {
36+
// day: 'numeric', month: 'short', year: 'numeric'
37+
// }).replace(/ /g, ' '),
38+
// timestamp: data.date.toDate().getTime()
39+
// });
40+
// });
4141

42-
//Sort songs by date
43-
songList.sort("timestamp", { order: "desc" });
44-
});
42+
// //Sort songs by date
43+
// songList.sort("timestamp", { order: "desc" });
44+
// });
4545
});

pages/songs.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ permalink: /songs/
1313
<!-- One -->
1414
<section id="one" class="wrapper style2">
1515
<div class="container">
16+
<div class="alert alert-danger" role="alert">
17+
The songs page will be overhauled soon and all songs will be cleared. Please download your songs by signing in.
18+
</div>
1619
<div id="songList">
1720
<div id="searchOptions">
1821
<input class="search" placeholder="Search"/>
@@ -24,6 +27,9 @@ permalink: /songs/
2427
</ul>
2528
<ul class="pagination"></ul>
2629
</div>
30+
<div class="alert alert-danger" role="alert">
31+
Loading songs is disabled for now. Sorry!
32+
</div>
2733
<!-- List item template -->
2834
<div style="display:none;">
2935
<li id="song-item" class="row songItem">

0 commit comments

Comments
 (0)