]> git.example.dev Git - binbsis50-sm.git/commitdiff
started: more frontend work
author2weiEmu <saalbach.robert@outlook.de>
Thu, 21 May 2026 15:19:58 +0000 (17:19 +0200)
committer2weiEmu <saalbach.robert@outlook.de>
Thu, 21 May 2026 15:19:58 +0000 (17:19 +0200)
public/index.html
public/js/index.js
songmanager

index 3c1333dc76c6f2684b7731834424486b0c032de2..221578d0cdc77ffc7f6a47ed531b16a92624d491 100644 (file)
@@ -14,6 +14,8 @@
                        <h1><u>Song List</u></h1>
 
                        <input id="songFilterInput"></input>
+                       <input id="songFilterArtist"></input>
+                       <button id="" onclick="getSongList()">Update Songs</button>
                        <div id="innerSongList">
 
                        </div>
index ad72436f0b48e99032d50f1e909f64e3390c89b2..ea98888d2cd14cb031b523ad9db7d20be4e10c56 100644 (file)
@@ -1,17 +1,43 @@
 let songList = []
+let innerSongList = document.getElementById("innerSongList")
+
 
 /**
- * Get all the songs
+ * MAIN SONG ELEMENT
  **/
-async function getSongList() {
+/*
+<div songId="[ID OF SONG (just number)]" id="SONG:XX" class="songElement">
+       <p>✅</p> // or false
+       <p>SONG NAME</p> BY
+       <p>ARTIST NAME</p>
+       <img></img> // HERE WOULD GO THE IMAGE
+       <button>EDIT</button>
+       <p>ID: []</p>
+</div>
+*/
+function NewSongElement(exists, songName, artistName, imageUrl, id) {
 
-       
 }
 
 
 /**
- * MAIN SONG ELEMENT
+ * Get all the songs
  **/
+async function getSongList() {
+       // Empty the List
+       innerSongList.innerHTML = ""
+
+       fetch("/api/songs/get", {'Accept': 'application/json', 'Content-type': 'application/json'}).then(async (response) => {
+               body = await response.json()
+               console.log(body)
+
+               for (let i = 0; i < body.length; i++) {
+               }
+
+               // using the elements in the body, create all the new songs in the list
+       })
+}
+
 
 
 /**
@@ -24,6 +50,7 @@ let songFilterInput = document.getElementById("songFilterInput")
 
 
 // ==============================================================
+/*
 let AllSongs = null
 let AllFilenames = null
 let currentEditSong = null
@@ -294,3 +321,4 @@ editArtworkUrl60.addEventListener("focusout", closeIfNotInEditor)
 editArtworkUrl100.addEventListener("focusout", closeIfNotInEditor)
 editDisplayArtistNames.addEventListener("focusout", closeIfNotInEditor)
 
+*/
index e6ee821db88835c9e1ab36fbd3cfdd9b48cd39f3..46ec43862625ed54212bfd003b341d4d1a7ce19e 100755 (executable)
Binary files a/songmanager and b/songmanager differ