update routes and version

This commit is contained in:
matty 2023-12-13 08:53:34 -05:00
parent 3a56584a98
commit c39c6fa7ba
4 changed files with 10 additions and 10 deletions

View File

@ -17,7 +17,7 @@ async function register({
if (params.path.startsWith("/my-account")) {
if (document.getElementById("subscription-link")) return;
let href = "/p/my-subscription";
let href = "/p/ncd-my-subscription";
// Get menu container
const menuContainer = document.getElementsByClassName("sub-menu")[0];
@ -25,7 +25,7 @@ async function register({
// Create link
const content = `
<a _ngcontent-dke-c79="" id="subscription-link" routerlinkactive="active" class="sub-menu-entry ng-star-inserted" href="${href}">
${await peertubeHelpers.translate("Storage")}
${await peertubeHelpers.translate("NCD Storage")}
</a>
`;
@ -41,21 +41,21 @@ async function register({
// Register routes
registerClientRoute({
route: "my-subscription",
route: "ncd-my-subscription",
onMount: ({ rootEl }) => {
subPage.showPage({rootEl, peertubeHelpers});
},
});
registerClientRoute({
route: "subscription-success",
route: "ncd-subscription-success",
onMount: ({ rootEl }) => {
successPage.showPage({rootEl, peertubeHelpers});
},
});
registerClientRoute({
route: "subscription-cancel",
route: "ncd-subscription-cancel",
onMount: ({ rootEl }) => {
cancelPage.showPage({rootEl, peertubeHelpers});
},

View File

@ -10,5 +10,5 @@
"Subscription canceled.": "Souscription annulée.",
"Secure payment with Stripe": "Paiement sécurisé via Stripe",
"Your current plan": "Votre offre actuelle",
"Storage": "Stockage"
"NCD Storage": "NCD Stockage"
}

View File

@ -121,8 +121,8 @@ async function register({
}
},
mode: 'subscription',
success_url: `${INSTANCE_URL}/p/subscription-success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${INSTANCE_URL}/p/subscription-cancel`,
success_url: `${INSTANCE_URL}/p/ncd-subscription-success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${INSTANCE_URL}/p/ncd-subscription-cancel`,
});
res.json({
@ -157,7 +157,7 @@ async function register({
// This is the url to which the customer will be redirected when they are done
// managing their billing with the portal.
const returnUrl = INSTANCE_URL + "/p/my-subscription";
const returnUrl = INSTANCE_URL + "/p/ncd-my-subscription";
const portalSession = await stripe.billingPortal.sessions.create({
customer: checkoutSession.customer,

View File

@ -1,7 +1,7 @@
{
"name": "peertube-plugin-ncd-sell-storage",
"description": "NCD fork of the peertube-plugin-orion-sell-storage to sell storage to users using Stripe",
"version": "1.0.6",
"version": "1.0.8",
"author": "matty",
"clientScripts": [
{