peertube-plugin-ncd-sell-st.../client/pages/cancel.js

16 lines
599 B
JavaScript
Raw Normal View History

2023-12-13 00:31:35 +00:00
async function showPage({ rootEl, peertubeHelpers }) {
// Redirect to login page if not auth
if (!peertubeHelpers.isLoggedIn()) return (window.location.href = "/login");
const settings = await peertubeHelpers.getSettings();
const description = await peertubeHelpers.markdownRenderer.enhancedMarkdownToHTML(settings["sell-cancel-description"]);
rootEl.innerHTML = `
2023-12-13 00:42:42 +00:00
<div class="ncd-content text-center mt-5">
2023-12-13 00:31:35 +00:00
<h1>${await peertubeHelpers.translate("Subscription canceled.")}</h1>
<p>${description}</p>
</div>
`;
}
export { showPage };