feat: implement user account center with subscription and EVM wallet payment integration, along with initial project configuration files.
This commit is contained in:
@@ -246,15 +246,10 @@ async function getWalletConnectProvider(
|
|||||||
"WalletConnect 未配置:缺少 NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID。",
|
"WalletConnect 未配置:缺少 NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID。",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (
|
if (walletConnectProviderCache && walletConnectProviderChainId === chainId) {
|
||||||
walletConnectProviderCache &&
|
|
||||||
walletConnectProviderChainId === chainId
|
|
||||||
) {
|
|
||||||
return walletConnectProviderCache;
|
return walletConnectProviderCache;
|
||||||
}
|
}
|
||||||
const { EthereumProvider } = await import(
|
const { EthereumProvider } = await import("@walletconnect/ethereum-provider");
|
||||||
"@walletconnect/ethereum-provider"
|
|
||||||
);
|
|
||||||
const rpcMap: Record<number, string> = {
|
const rpcMap: Record<number, string> = {
|
||||||
[chainId]: rpcUrl || WALLETCONNECT_POLYGON_RPC_URL,
|
[chainId]: rpcUrl || WALLETCONNECT_POLYGON_RPC_URL,
|
||||||
};
|
};
|
||||||
@@ -1543,7 +1538,7 @@ export function AccountCenter() {
|
|||||||
<Bot size={22} /> Telegram Bot 绑定
|
<Bot size={22} /> Telegram Bot 绑定
|
||||||
</h3>
|
</h3>
|
||||||
<p className="text-slate-400 text-sm mb-6">
|
<p className="text-slate-400 text-sm mb-6">
|
||||||
将下方命令发送给到群聊,实现全平台气象推送与权限同步。(https://t.me/+nMG7SjziUKYyZmM1)
|
将下方命令发送给polyweather机器人,实现全平台气象推送与权限同步。
|
||||||
</p>
|
</p>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<code className="flex-grow bg-black/40 border border-white/10 p-4 rounded-xl font-mono text-xs text-blue-300 overflow-hidden text-ellipsis whitespace-nowrap">
|
<code className="flex-grow bg-black/40 border border-white/10 p-4 rounded-xl font-mono text-xs text-blue-300 overflow-hidden text-ellipsis whitespace-nowrap">
|
||||||
@@ -1654,7 +1649,9 @@ export function AccountCenter() {
|
|||||||
{!walletConnectEnabled && (
|
{!walletConnectEnabled && (
|
||||||
<p className="text-[11px] text-slate-500">
|
<p className="text-[11px] text-slate-500">
|
||||||
未启用 WalletConnect:请配置
|
未启用 WalletConnect:请配置
|
||||||
<code className="mx-1">NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID</code>
|
<code className="mx-1">
|
||||||
|
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
|
||||||
|
</code>
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Generated
+1
@@ -30,6 +30,7 @@
|
|||||||
"@types/node": "^22.15.21",
|
"@types/node": "^22.15.21",
|
||||||
"@types/react": "^19.0.10",
|
"@types/react": "^19.0.10",
|
||||||
"@types/react-dom": "^19.0.4",
|
"@types/react-dom": "^19.0.4",
|
||||||
|
"@types/trusted-types": "^2.0.7",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"postcss": "^8.5.3",
|
"postcss": "^8.5.3",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^3.4.17",
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
"@types/node": "^22.15.21",
|
"@types/node": "^22.15.21",
|
||||||
"@types/react": "^19.0.10",
|
"@types/react": "^19.0.10",
|
||||||
"@types/react-dom": "^19.0.4",
|
"@types/react-dom": "^19.0.4",
|
||||||
|
"@types/trusted-types": "^2.0.7",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.20",
|
||||||
"postcss": "^8.5.3",
|
"postcss": "^8.5.3",
|
||||||
"tailwindcss": "^3.4.17",
|
"tailwindcss": "^3.4.17",
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./*"]
|
"@/*": ["./*"]
|
||||||
},
|
},
|
||||||
"plugins": [{ "name": "next" }]
|
"plugins": [{ "name": "next" }],
|
||||||
|
"typeRoots": ["./node_modules/@types"]
|
||||||
},
|
},
|
||||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
|
|||||||
Reference in New Issue
Block a user