mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 13:20:19 +08:00
feat: support Pricings flow (#2250)
* feat: fix price display * feat: support subscription * feat: fix select-plan-> signup -> buy-plan -> login flow * feat: support paid-user to login and jump to the pricing page * feat: support more subscription state * feat: add payment providers for plan * feat: format code * feat: gofumpt * feat: redirect to buy-plan-result page when user have pending subscription * feat: response err when pricing don't exit * Update PricingListPage.js * Update ProductBuyPage.js * Update LoginPage.js --------- Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
@ -1170,9 +1170,9 @@ export function getTags(tags, urlPrefix = null) {
|
||||
return res;
|
||||
}
|
||||
|
||||
export function getTag(color, text) {
|
||||
export function getTag(color, text, icon) {
|
||||
return (
|
||||
<Tag color={color}>
|
||||
<Tag color={color} icon={icon}>
|
||||
{text}
|
||||
</Tag>
|
||||
);
|
||||
@ -1254,3 +1254,13 @@ export function builtInObject(obj) {
|
||||
}
|
||||
return obj.owner === "built-in" && BuiltInObjects.includes(obj.name);
|
||||
}
|
||||
|
||||
export function getCurrencySymbol(currency) {
|
||||
if (currency === "USD" || currency === "usd") {
|
||||
return "$";
|
||||
} else if (currency === "CNY" || currency === "cny") {
|
||||
return "¥";
|
||||
} else {
|
||||
return currency;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user