replace orion with ncd
This commit is contained in:
@ -6,7 +6,7 @@ async function showPage({ rootEl, peertubeHelpers }) {
|
||||
const description = await peertubeHelpers.markdownRenderer.enhancedMarkdownToHTML(settings["sell-cancel-description"]);
|
||||
|
||||
rootEl.innerHTML = `
|
||||
<div class="orion-content text-center mt-5">
|
||||
<div class="ncd-content text-center mt-5">
|
||||
<h1>${await peertubeHelpers.translate("Subscription canceled.")}</h1>
|
||||
<p>${description}</p>
|
||||
</div>
|
||||
|
@ -43,7 +43,7 @@ async function showPage({ rootEl, peertubeHelpers }) {
|
||||
}
|
||||
|
||||
rootEl.innerHTML = `
|
||||
<div class="orion-content text-center">
|
||||
<div class="ncd-content text-center">
|
||||
<h1>${await peertubeHelpers.translate("Choose your Subscription")}</h1>
|
||||
<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">
|
||||
@ -52,7 +52,7 @@ async function showPage({ rootEl, peertubeHelpers }) {
|
||||
`<div class="col-sm-12 col-md-6 col-lg-4">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form method="POST" action="#" class="orionSubscriptionForm">
|
||||
<form method="POST" action="#" class="ncdSubscriptionForm">
|
||||
<h3 class="card-title">${plan.name}</h3>
|
||||
<h4>${plan.price}${currency} /${await peertubeHelpers.translate("month")}</h4>
|
||||
<p class="card-text">${plan.storage} ${await peertubeHelpers.translate("GB Storage")}</p>
|
||||
@ -88,7 +88,7 @@ async function showPage({ rootEl, peertubeHelpers }) {
|
||||
|
||||
|
||||
const checkForListen = () => {
|
||||
document.querySelectorAll(".orionSubscriptionForm").length === 3 ? listenSubmitSubscription(peertubeHelpers) : setTimeout(() => checkForListen(), 1000);
|
||||
document.querySelectorAll(".ncdSubscriptionForm").length === 3 ? listenSubmitSubscription(peertubeHelpers) : setTimeout(() => checkForListen(), 1000);
|
||||
};
|
||||
checkForListen();
|
||||
}
|
||||
@ -97,7 +97,7 @@ function listenSubmitSubscription(peertubeHelpers) {
|
||||
const baseUrl = peertubeHelpers.getBaseRouterRoute();
|
||||
|
||||
// Sub
|
||||
document.querySelectorAll(".orionSubscriptionForm").forEach(el => {
|
||||
document.querySelectorAll(".ncdSubscriptionForm").forEach(el => {
|
||||
el.addEventListener("submit", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
|
@ -9,11 +9,11 @@ async function showPage({ rootEl, peertubeHelpers }) {
|
||||
const description = await peertubeHelpers.markdownRenderer.enhancedMarkdownToHTML(settings["sell-thx-description"]);
|
||||
|
||||
rootEl.innerHTML = `
|
||||
<div class="orion-content text-center mt-5">
|
||||
<div class="ncd-content text-center mt-5">
|
||||
<h1>${await peertubeHelpers.translate("Subscription succesfull!")}</h1>
|
||||
|
||||
<div class="mt-5">
|
||||
<form action="#" method="POST" class="orionSubscriptionForm">
|
||||
<form action="#" method="POST" class="ncdSubscriptionForm">
|
||||
<input type="hidden" id="session-id" name="session_id" value="" />
|
||||
<button id="checkout-and-portal-button" type="submit" class="btn btn-primary">${await translate("Manage my Subscription")}</button>
|
||||
</form>
|
||||
@ -33,7 +33,7 @@ function listenSubmitSubscription(peertubeHelpers) {
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
if(params.has("session_id")) {
|
||||
document.getElementById("session-id").value = params.get("session_id");
|
||||
localStorage.setItem("orion-sub-session-id", params.get("session_id"));
|
||||
localStorage.setItem("ncd-sub-session-id", params.get("session_id"));
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append("session_id", params.get("session_id"));
|
||||
@ -55,7 +55,7 @@ function listenSubmitSubscription(peertubeHelpers) {
|
||||
})
|
||||
}
|
||||
|
||||
document.querySelector(".orionSubscriptionForm").addEventListener("submit", (e) => {
|
||||
document.querySelector(".ncdSubscriptionForm").addEventListener("submit", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user