refactor shit

This commit is contained in:
matty 2024-04-02 15:58:58 -04:00
parent 5107f68d4c
commit 6a168a4b83

View File

@ -44,9 +44,9 @@ async function showPage({ rootEl, peertubeHelpers }) {
rootEl.innerHTML = ` rootEl.innerHTML = `
<div class="ncd-content text-center"> <div class="ncd-content text-center">
<h4><i>To subscribe to a storage plan with cryptocurrency (BTC, ETC, XMR) or cancel/update your subscription tier, <a href="/about/contact">contact us</a>.</i></h4> <h1>${await peertubeHelpers.translate("Choose your Storage Plan")}</h1>
<h1>${await peertubeHelpers.translate("Choose your Storage Plan")}</h1> <h4><i>To subscribe to a storage plan with cryptocurrency (BTC, ETH, XMR) or cancel/update your subscription tier, <a href="/about/contact">contact us</a>.</i></h4>
<p>${description.length ? description : await peertubeHelpers.translate("You want tu spport us ? Or need more space ? Your in the right place!")}</p> <!-- <p>${description.length ? description : await peertubeHelpers.translate("You want tu spport us ? Or need more space ? Your in the right place!")}</p> -->
<div class="mt-5"> <div class="mt-5">
<div class="row"> <div class="row">
${(await Promise.all(plans.map(async (plan) => ${(await Promise.all(plans.map(async (plan) =>
@ -68,12 +68,14 @@ async function showPage({ rootEl, peertubeHelpers }) {
</div> </div>
</div> </div>
${session_id ? `
<div class="mt-5"> <div class="mt-5">
<form method="POST" action="#" id="formManageSub"> <form method="POST" action="#" id="formManageSub">
<input type="hidden" id="session-id" name="session_id" value="${session_id}" /> <input type="hidden" id="session-id" name="session_id" value="${session_id}" />
<button id="checkout-and-portal-button" type="submit" class="btn btn-primary">${await translate("Manage my Subscription")}</button> <button id="checkout-and-portal-button" type="submit" class="btn btn-primary">${await translate("Manage my Subscription")}</button>
</form> </form>
</div> </div>
` : ""}
${sub_plan ? ` ${sub_plan ? `