Playground uses same component HTML as Developer Program

This commit is contained in:
ポール ウェッブ 2019-02-18 17:28:50 -06:00
parent 23e6142427
commit d323a16d1d
2 changed files with 5 additions and 11 deletions

View file

@ -268,9 +268,7 @@ const handleExamples = debounce(event => {
if (document.getElementById("playground-url").style.display === "none")
document.getElementById("playground-url").removeAttribute("style");
for (const example of document.querySelectorAll(".playground-navigation__example"))
example.classList.remove("active");
document.querySelectorAll(".playground-navigation__example").forEach(example => example.classList.remove("active"));
document.querySelector(".playground-navigation__example:nth-child(1)").classList.add("active");
document.getElementById("playground-loader").innerHTML = "";
@ -294,9 +292,7 @@ const handleExamples = debounce(event => {
document.getElementById("fetch-claim-uri").value = ""; // reset URL bar
document.getElementById("playground-url").style.display = "none";
for (const example of document.querySelectorAll(".playground-navigation__example"))
example.classList.remove("active");
document.querySelectorAll(".playground-navigation__example").forEach(example => example.classList.remove("active"));
document.querySelector(".playground-navigation__example:nth-child(2)").classList.add("active");
document.getElementById("playground-loader").innerHTML = "";
@ -323,9 +319,7 @@ const handleExamples = debounce(event => {
if (document.getElementById("playground-url").style.display === "none")
document.getElementById("playground-url").removeAttribute("style");
for (const example of document.querySelectorAll(".playground-navigation__example"))
example.classList.remove("active");
document.querySelectorAll(".playground-navigation__example").forEach(example => example.classList.remove("active"));
document.querySelector(".playground-navigation__example:nth-child(3)").classList.add("active");
document.getElementById("playground-loader").innerHTML = "";

View file

@ -28,10 +28,10 @@ export default () => dedent`
function example1() {
return html`
<div class="playground-content__urlbar" id="playground-url">
<input-submit class="playground-content__urlbar" id="playground-url">
<span>lbry://</span><input id="fetch-claim-uri" placeholder="&thinsp;Enter a LBRY address or select a video below" type="text"/>
<button class="button" data-action="execute claim" type="button">Resolve</button>
</div>
</input-submit>
<div class="playground-content__trends" id="playground-loader"></div>
<div id="playground-results"></div>