From 6df4b5a8af44d70563877002a93cfc3d301ccada Mon Sep 17 00:00:00 2001 From: 2weiEmu Date: Thu, 28 May 2026 20:58:28 +0200 Subject: [PATCH] updated: most edit menu things working --- public/css/index.css | 7 +++++++ public/index.html | 23 ++++++++++++++--------- public/js/index.js | 40 ++++++++++++++++++++++++++++++++++++---- songmanager | Bin 11691100 -> 11691100 bytes 4 files changed, 57 insertions(+), 13 deletions(-) diff --git a/public/css/index.css b/public/css/index.css index 4d4fbe7..4dcfc54 100644 --- a/public/css/index.css +++ b/public/css/index.css @@ -41,9 +41,16 @@ background-color: rgb(240, 240, 240); width: 50vw; + display: none; + #innerEditMenu { padding: 30px; } + input { + margin: 5px; + } + + } diff --git a/public/index.html b/public/index.html index a87cf21..29164c0 100644 --- a/public/index.html +++ b/public/index.html @@ -25,21 +25,26 @@ -

Song Title

Key:

- Artist Names
- Track Name
- TrackViewURL
- PreviewURL
- ArtworkURL60
- ArtworkURL100
- DisplayArtistNames
- DisplayTrackName + Artist Names
+ Track Name
+ TrackViewURL
+ PreviewURL
+ ArtworkURL60
+ ArtworkURL100
+ DisplayArtistNames
+ DisplayTrackName + +
+ +
+ + diff --git a/public/js/index.js b/public/js/index.js index 2702c3d..653013f 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -26,7 +26,7 @@ let innerSongList = document.getElementById("innerSongList")

✅

// or false // HERE WOULD GO THE IMAGE - +

SONG NAME

by

ARTIST NAME

@@ -63,6 +63,7 @@ function NewSongElement(exists, songName, artistName, imageUrl, id) { let editButton = document.createElement("button") editButton.innerText = "Edit" + editButton.addEventListener("click", function() { openEditMenu(wrapper.songId) }) let idP = document.createElement("p") idP.innerText = id @@ -196,18 +197,49 @@ songFilterInDB.oninput = (event) => {updateSongListWithFilter(event)} * (this should also close when clicking outside obviously) **/ +let editMenu = document.getElementById("editMenu") + +let editMenuSongKey = document.getElementById("editMenuSongKey") +let editMenuArtistName = document.getElementById("editMenuArtistName") +let editMenuTrackName = document.getElementById("editMenuTrackName") +let editMenuTrackViewURL = document.getElementById("editMenuTrackViewURL") +let editMenuPreviewURL = document.getElementById("editMenuPreviewURL") +let editMenuArtworkURL60 = document.getElementById("editMenuArtworkURL60") +let editMenuArtworkURL100 = document.getElementById("editMenuArtworkURL100") +let editMenuDisplayArtistNames = document.getElementById("editMenuDisplayArtistNames") +let editMenuDisplayTrackName = document.getElementById("editMenuDisplayTrackName") + + +function openEditMenu(songId) { + console.log("songid", songId) + + let song = songList.find((v, _1, _2) => { return v.Key.replace("song:", "") == songId }) + openEditMenuWithSong(song) +} + + /** * **/ -function openEditMenu() { - +function openEditMenuWithSong(song) { + editMenu.style.display = "block"; + + editMenuSongKey.value = song.Key + editMenuArtistName.value = song.ArtistName + editMenuTrackName.value = song.TrackName + editMenuTrackViewURL.value = song.TrackViewURL + editMenuPreviewURL.value = song.PreviewURL + editMenuArtworkURL60.value = song.ArtworkURL60 + editMenuArtworkURL100.value = song.ArtworkURL100 + editMenuDisplayArtistNames.value = song.DisplayArtistNames + editMenuDisplayTrackName.value = song.DisplayTrackName } /** * **/ function closeEditMenu() { - + editMenu.style.display = "none"; } /** diff --git a/songmanager b/songmanager index a76bf0a408002e10629affbe7db1d36f13a5a6fa..efd5226de1363b753aa7e7791644c1d0a77133b5 100755 GIT binary patch delta 1037 zcmca};v_2wZ^+@V&oOZiOp9{LGYd~FH4AVp3C;G*($5MtvNUqfG_5pqH%iP5GfOr1 z&DGB>EiNuC2`li;_Q~)JFe*1JDyh&fDK<5)3@dWX$w+fIGfK*+@-@z4U}0cj5Mf|o zU}j)oaQ6#kxSVuTXsej;)HxH^pPzYX*@aDVTPEq}WG0!J=r_OSZ-33t*#4TIsr@xS zbNg$4miE{DtnIJ)+1g+8v$wzI=V*V;&)NQ(pR4^fKX?0UexCN%{Jib2`T5#k^MmvX zw7=#TY=6x!)c%@ZxcxQ1Nc(Gk(e~H;V(qW_#oJ%=OSHe{mu!E{FV+5)}&D&q|TeQFCw`_mSZ`J;q-@5%ZzfJpVe%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