From 2cba45f82fdb24b6bd10e277e615893024e69eb8 Mon Sep 17 00:00:00 2001 From: Steven Vandevelde Date: Tue, 10 Mar 2026 16:31:50 +0100 Subject: [PATCH] chore: rename playlists -> playlist items import/export --- src/facets/tools/export-import/index.html | 4 ++-- src/facets/tools/export-import/index.inline.js | 12 ++++++------ src/facets/tools/v3-import/index.html | 4 ++-- src/facets/tools/v3-import/index.inline.js | 12 ++++++------ 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/facets/tools/export-import/index.html b/src/facets/tools/export-import/index.html index 217063b1..207a392a 100644 --- a/src/facets/tools/export-import/index.html +++ b/src/facets/tools/export-import/index.html @@ -24,8 +24,8 @@
-
diff --git a/src/facets/tools/export-import/index.inline.js b/src/facets/tools/export-import/index.inline.js index cdc13af6..7f97e47f 100644 --- a/src/facets/tools/export-import/index.inline.js +++ b/src/facets/tools/export-import/index.inline.js @@ -12,9 +12,9 @@ const fileInput = /** @type {HTMLInputElement} */ (document.querySelector("#file")); const importTracksBtn = /** @type {HTMLButtonElement} */ (document.querySelector("#import-tracks")); -const importPlaylistsBtn = +const importPlaylistItemsBtn = /** @type {HTMLButtonElement} */ (document.querySelector( - "#import-playlists", + "#import-playlist-items", )); const importFacetsBtn = /** @type {HTMLButtonElement} */ (document.querySelector("#import-facets")); @@ -78,7 +78,7 @@ fileInput.onchange = async () => { json = null; statusEl.hidden = true; importTracksBtn.disabled = true; - importPlaylistsBtn.disabled = true; + importPlaylistItemsBtn.disabled = true; importFacetsBtn.disabled = true; importThemesBtn.disabled = true; @@ -100,7 +100,7 @@ fileInput.onchange = async () => { } if (Array.isArray(json?.playlistItems) && json.playlistItems.length > 0) { - importPlaylistsBtn.disabled = false; + importPlaylistItemsBtn.disabled = false; } if (Array.isArray(json?.facets) && json.facets.length > 0) { @@ -127,8 +127,8 @@ importTracksBtn.onclick = async () => { } }; -// Import playlists -importPlaylistsBtn.onclick = async () => { +// Import playlist items +importPlaylistItemsBtn.onclick = async () => { /** @type {any[]} */ const playlistItems = json?.playlistItems; if (!Array.isArray(playlistItems) || playlistItems.length === 0) return; diff --git a/src/facets/tools/v3-import/index.html b/src/facets/tools/v3-import/index.html index 05af7aa6..45d69833 100644 --- a/src/facets/tools/v3-import/index.html +++ b/src/facets/tools/v3-import/index.html @@ -18,8 +18,8 @@
-
diff --git a/src/facets/tools/v3-import/index.inline.js b/src/facets/tools/v3-import/index.inline.js index 883faf5e..c1f12ee5 100644 --- a/src/facets/tools/v3-import/index.inline.js +++ b/src/facets/tools/v3-import/index.inline.js @@ -18,9 +18,9 @@ const importFavouritesBtn = /** @type {HTMLButtonElement} */ (document.querySelector( "#import-favourites", )); -const importPlaylistsBtn = +const importPlaylistItemsBtn = /** @type {HTMLButtonElement} */ (document.querySelector( - "#import-playlists", + "#import-playlist-items", )); const statusEl = /** @type {HTMLElement} */ (document.querySelector("#status")); @@ -45,7 +45,7 @@ fileInput.onchange = async () => { json = null; statusEl.hidden = true; importFavouritesBtn.disabled = true; - importPlaylistsBtn.disabled = true; + importPlaylistItemsBtn.disabled = true; if (!file) return; @@ -65,7 +65,7 @@ fileInput.onchange = async () => { } if (json?.playlists?.data?.length > 0) { - importPlaylistsBtn.disabled = false; + importPlaylistItemsBtn.disabled = false; } }; @@ -95,8 +95,8 @@ importFavouritesBtn.onclick = async () => { } }; -// Import playlists on button click -importPlaylistsBtn.onclick = async () => { +// Import playlist items on button click +importPlaylistItemsBtn.onclick = async () => { /** @type {any[]} */ const items = json?.playlists?.data; if (!items || items.length === 0) return; -- knotmirror 0.0.1