mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 07:43:16 +10:00
## Description Adds support for customising the theme and CSS for the embedding components which is restricted to platform customers and above. Additionally adds proper support for the platform plan which will let us update our stripe products. <img width="1040" alt="image" src="https://github.com/user-attachments/assets/f694cd1e-ac93-4dc0-9f78-92fa813f6404"> <img width="1015" alt="image" src="https://github.com/user-attachments/assets/4209972a-b2bd-40c9-9049-0367382a4de5"> <img width="1065" alt="image" src="https://github.com/user-attachments/assets/fdbaaaa5-a028-4b1d-a58a-ea6224e21abe"> ## Related Issue N/A ## Changes Made - Added support for using CSS Vars and CSS within the embedding route - Added a guard for platform and enterprise plans to activate the custom css - Added support for the platform plan ## Testing Performed Yes
22 lines
657 B
TypeScript
22 lines
657 B
TypeScript
import { STRIPE_PLAN_TYPE } from '@documenso/lib/constants/billing';
|
|
|
|
import { getPricesByPlan } from './get-prices-by-plan';
|
|
|
|
/**
|
|
* Returns the Stripe prices of items that affect the amount of teams a user can create.
|
|
*/
|
|
export const getTeamRelatedPrices = async () => {
|
|
return await getPricesByPlan([
|
|
STRIPE_PLAN_TYPE.COMMUNITY,
|
|
STRIPE_PLAN_TYPE.PLATFORM,
|
|
STRIPE_PLAN_TYPE.ENTERPRISE,
|
|
]);
|
|
};
|
|
|
|
/**
|
|
* Returns the Stripe price IDs of items that affect the amount of teams a user can create.
|
|
*/
|
|
export const getTeamRelatedPriceIds = async () => {
|
|
return await getTeamRelatedPrices().then((prices) => prices.map((price) => price.id));
|
|
};
|