feat: add WeChat modal component and integrate it into SideNav and LoginPage

This commit is contained in:
shiyu
2025-09-26 19:04:30 +08:00
parent da41393db3
commit f3d9220569
3 changed files with 32 additions and 18 deletions

View File

@@ -0,0 +1,26 @@
import { Modal, theme } from 'antd';
import { useI18n } from '../i18n';
export interface WeChatModalProps {
open: boolean;
onClose: () => void;
}
export default function WeChatModal({ open, onClose }: WeChatModalProps) {
const { token } = theme.useToken();
const { t } = useI18n();
return (
<Modal open={open} onCancel={onClose} title={t('Join Community')} footer={null} width={320}>
<div style={{ textAlign: 'center', padding: '12px 0' }}>
<img src="https://foxel.cc/image/wechat.png" width={200} alt="wechat" />
<div style={{ marginTop: 12, color: token.colorTextSecondary }}>
{t('Scan to join WeChat group')}
</div>
<div style={{ marginTop: 8, fontSize: 12, color: token.colorTextTertiary }}>
{t('If QR expires, add drizzle2001 to join')}
</div>
</div>
</Modal>
);
}