in public/js/account.js [192:224]
renderSpotifyLink() {
this.spotifyLinkRoot.innerText = "";
const isLinked = this.model.isLinked;
const unlinkInfo = document.createElement("p");
if (isLinked) {
unlinkInfo.textContent =
"Your account is already connected to Spotify. To unlink your account click the button below, this will remove your access to your paid podcasts on the Spotify app.";
} else {
unlinkInfo.textContent =
"By linking your account to Spotify, you'll get access to any of your paid podcasts on the Spotify app.";
}
this.spotifyLinkRoot.appendChild(unlinkInfo);
const unlinkButton = document.createElement("button");
unlinkButton.classList.add("spotify-link");
unlinkButton.addEventListener("click", this.onSpotifyConnectionClicked);
this.spotifyLinkRoot.appendChild(unlinkButton);
const spotifyLogo = document.createElement("img");
spotifyLogo.src = "/assets/img/Spotify_Icon_RGB_White.png";
spotifyLogo.width = 20;
spotifyLogo.height = 20;
unlinkButton.appendChild(spotifyLogo);
const buttonText = document.createElement("span");
if (isLinked) {
buttonText.textContent = "Unlink from Spotify";
} else {
buttonText.textContent = "Connect to Spotify";
}
unlinkButton.appendChild(buttonText);
}