feat: 1.统一右侧抽屉关闭按钮布局 2.统一 UI 组件为 Ant Design 移除 radix-ui、floating-ui 组件 3. 修复 ESLint 文件格式错误的问题
This commit is contained in:
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { useEffectEvent } from '../../../hooks/common/useEffectEvent';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -184,10 +185,11 @@ export default function SettingsMembership() {
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
const onMount = useEffectEvent(() => {
|
||||
fetchPlans();
|
||||
fetchSetting();
|
||||
}, []);
|
||||
});
|
||||
useEffect(() => onMount(), [onMount]);
|
||||
|
||||
// 表格列定义
|
||||
const columns = [
|
||||
|
||||
@@ -17,13 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Form,
|
||||
Button,
|
||||
Typography,
|
||||
Space,
|
||||
Divider,
|
||||
} from '@/components/ui';
|
||||
import { Form, Button, Typography, Space, Divider } from '@/components/ui';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -105,7 +99,9 @@ const SettingsPaymentAlipay = ({ options, refresh }) => {
|
||||
href='https://open.alipay.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>{t('支付宝开放平台')}</a>{' '}
|
||||
>
|
||||
{t('支付宝开放平台')}
|
||||
</a>{' '}
|
||||
{t('获取相关配置信息。')}
|
||||
</Text>
|
||||
|
||||
@@ -151,7 +147,9 @@ const SettingsPaymentAlipay = ({ options, refresh }) => {
|
||||
placeholder={
|
||||
options.AlipayPrivateKey === '***ALREADY_SET***'
|
||||
? t('已设置(留空不修改,填写新内容则更新)')
|
||||
: t('请粘贴完整的 RSA2 私钥内容(包含 -----BEGIN PRIVATE KEY----- 等)')
|
||||
: t(
|
||||
'请粘贴完整的 RSA2 私钥内容(包含 -----BEGIN PRIVATE KEY----- 等)',
|
||||
)
|
||||
}
|
||||
rows={6}
|
||||
extraText={
|
||||
@@ -235,7 +233,9 @@ const SettingsPaymentAlipay = ({ options, refresh }) => {
|
||||
/>
|
||||
|
||||
<Space style={{ marginTop: 20 }}>
|
||||
<Button type='primary' htmlType='submit' loading={loading}>{t('保存配置')}</Button>
|
||||
<Button type='primary' htmlType='submit' loading={loading}>
|
||||
{t('保存配置')}
|
||||
</Button>
|
||||
</Space>
|
||||
</Form>
|
||||
</>
|
||||
|
||||
@@ -172,11 +172,19 @@ export default function SettingsPaymentGateway(props) {
|
||||
href='https://dashboard.stripe.com/developers'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>{t('点击此处')}</a>{t('进行设置,最好先在')}<a
|
||||
>
|
||||
{t('点击此处')}
|
||||
</a>
|
||||
{t('进行设置,最好先在')}
|
||||
<a
|
||||
href='https://dashboard.stripe.com/test/developers'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>{t('测试环境')}</a>{t('进行测试。')}<br />
|
||||
>
|
||||
{t('测试环境')}
|
||||
</a>
|
||||
{t('进行测试。')}
|
||||
<br />
|
||||
</Text>
|
||||
<Banner
|
||||
type='info'
|
||||
|
||||
@@ -17,13 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Form,
|
||||
Button,
|
||||
Typography,
|
||||
Space,
|
||||
Divider,
|
||||
} from '@/components/ui';
|
||||
import { Form, Button, Typography, Space, Divider } from '@/components/ui';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -131,7 +125,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
href='https://pay.weixin.qq.com'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>{t('微信支付商户平台')}</a>{' '}
|
||||
>
|
||||
{t('微信支付商户平台')}
|
||||
</a>{' '}
|
||||
获取相关配置信息。
|
||||
</Text>
|
||||
|
||||
@@ -234,7 +230,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
|
||||
<Divider margin='12px' />
|
||||
|
||||
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>{t('公钥模式(2024年新商户必选)')}</Title>
|
||||
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>
|
||||
{t('公钥模式(2024年新商户必选)')}
|
||||
</Title>
|
||||
<Text type='tertiary' style={{ display: 'block', marginBottom: 12 }}>
|
||||
2024年后注册的微信支付商户默认使用公钥模式。如果初始化失败提示"无可用的平台证书",
|
||||
请从商户平台下载微信支付公钥并启用此模式。
|
||||
@@ -271,8 +269,14 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
|
||||
<Divider margin='12px' />
|
||||
|
||||
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>{t('高级配置:手动平台证书模式(可选)')}</Title>
|
||||
<Text type='tertiary' style={{ display: 'block', marginBottom: 12 }}>{t('默认情况下,SDK 会自动下载微信平台证书,无需手动配置。仅在离线环境或网络受限时启用此选项。')}</Text>
|
||||
<Title heading={6} style={{ marginTop: 16, marginBottom: 8 }}>
|
||||
{t('高级配置:手动平台证书模式(可选)')}
|
||||
</Title>
|
||||
<Text type='tertiary' style={{ display: 'block', marginBottom: 12 }}>
|
||||
{t(
|
||||
'默认情况下,SDK 会自动下载微信平台证书,无需手动配置。仅在离线环境或网络受限时启用此选项。',
|
||||
)}
|
||||
</Text>
|
||||
|
||||
<Form.Switch
|
||||
field='WechatUseManualCert'
|
||||
@@ -342,7 +346,9 @@ const SettingsPaymentWechat = ({ options, refresh }) => {
|
||||
/>
|
||||
|
||||
<Space style={{ marginTop: 20 }}>
|
||||
<Button type='primary' htmlType='submit' loading={loading}>{t('保存配置')}</Button>
|
||||
<Button type='primary' htmlType='submit' loading={loading}>
|
||||
{t('保存配置')}
|
||||
</Button>
|
||||
</Space>
|
||||
</Form>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user