Skip to content

Commit

Permalink
perf: plan tip (labring#2513)
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu authored Aug 26, 2024
1 parent c1d08c0 commit 22a0f6b
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 20 deletions.
6 changes: 4 additions & 2 deletions packages/global/support/wallet/sub/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ export enum SubModeEnum {
export const subModeMap = {
[SubModeEnum.month]: {
label: 'support.wallet.subscription.mode.Month',
durationMonth: 1
durationMonth: 1,
payMonth: 1
},
[SubModeEnum.year]: {
label: 'support.wallet.subscription.mode.Year',
durationMonth: 12
durationMonth: 12,
payMonth: 10
}
};

Expand Down
5 changes: 4 additions & 1 deletion packages/web/i18n/en/user.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"bill": {
"buy_plan": "Buy a package",
"buy_standard_plan_success": "Package purchased successfully",
"not_need_invoice": "Balance payment, unable to issue invoice",
"renew_plan": "Renewal package"
"renew_plan": "Renewal package",
"standard_valid_tip": "Package usage rules: The system gives priority to using more advanced packages, and the original unused packages will take effect later.",
"valid_time": "Effective time"
},
"bind_inform_account_error": "Abnormal binding notification account",
"bind_inform_account_success": "Binding notification account successful",
Expand Down
23 changes: 13 additions & 10 deletions packages/web/i18n/zh/user.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{
"bill": {
"not_need_invoice": "余额支付,无法开票",
"balance": "余额",
"buy_plan": "购买套餐",
"buy_standard_plan_success": "购买套餐成功",
"contact_customer_service": "联系客服",
"conversion": "兑换",
"use_balance": "使用余额",
"convert_error": "兑换失败",
"convert_success": "兑换成功",
"not_need_invoice": "余额支付,无法开票",
"price": "价格",
"tokens": "积分",
"renew_plan": "续费套餐",
"standard_valid_tip": "套餐使用规则:系统优先使用更高级的套餐,原未用完的套餐将延后生效",
"token_expire_1year": "积分有效期一年",
"balance": "余额",
"you_can_convert": "您可兑换",
"tokens": "积分",
"use_balance": "使用余额",
"use_balance_hint": "由于系统升级,原“自动续费从余额扣款”模式取消,余额充值入口关闭。您的余额可用于购买积分",
"contact_customer_service": "联系客服",
"convert_success": "兑换成功",
"convert_error": "兑换失败",
"buy_standard_plan_success": "购买套餐成功",
"renew_plan": "续费套餐"
"valid_time": "生效时间",
"you_can_convert": "您可兑换"
},
"bind_inform_account_error": "绑定通知账号异常",
"bind_inform_account_success": "绑定通知账号成功",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import {
Th,
Td,
TableContainer,
ModalCloseButton
ModalCloseButton,
HStack,
Box
} from '@chakra-ui/react';
import MyModal from '@fastgpt/web/components/common/MyModal';
import { useTranslation } from 'next-i18next';
Expand Down Expand Up @@ -45,7 +47,7 @@ const StandDetailModal = ({ onClose }: { onClose: () => void }) => {
<Th>{t('common:support.standard.type')}</Th>
<Th>{t('common:support.standard.storage')}</Th>
<Th>{t('common:support.standard.AI Bonus Points')}</Th>
<Th>{t('common:support.standard.Start Time')}</Th>
<Th>{t('user:bill.valid_time')}</Th>
<Th>{t('common:support.standard.Expired Time')}</Th>
</Tr>
</Thead>
Expand Down Expand Up @@ -98,6 +100,10 @@ const StandDetailModal = ({ onClose }: { onClose: () => void }) => {
</Table>
<Loading loading={isLoading} fixed={false} />
</TableContainer>
<HStack mt={4} color={'primary.600'}>
<MyIcon name={'infoRounded'} w={'1rem'} />
<Box fontSize={'sm'}>{t('user:bill.standard_valid_tip')}</Box>
</HStack>
</ModalBody>
<ModalFooter></ModalFooter>
</MyModal>
Expand Down
2 changes: 1 addition & 1 deletion projects/app/src/pages/price/components/Standard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const Standard = ({
})
}
>
{t('common:support.wallet.subscription.Buy now')}
{t('user:bill.buy_plan')}
</Button>
);
})()}
Expand Down
15 changes: 11 additions & 4 deletions scripts/icon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ app.get('/', (req, res) => {

svgPaths.forEach((filePath) => {
const name = filePath.split('.')[0];

const icon = fs.readFileSync(`${svgDir}/${filePath}`, 'utf8');

iconHtml += `<div class="item" id="${name}" onclick="onclickCopy('${name}')">
<img src="/icons/${filePath}" width="30" height="30" />
${icon}
<div>${name}</div>
</div>`;
});
Expand All @@ -48,7 +51,7 @@ app.get('/', (req, res) => {
.grid {
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(6, 1fr);
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
padding: 10px;
background-color: #F0F1F6;
}
Expand All @@ -65,9 +68,13 @@ app.get('/', (req, res) => {
.item:hover{
background-color: rgba(17, 24, 36, 0.1);
}
img {
margin-bottom: 5px;
svg {
width: 30px;
height: 30px;
margin: auto;
fill: #999;
}
</style>
<body>
<div class="grid">
Expand Down

0 comments on commit 22a0f6b

Please sign in to comment.