Skip to content

Dev #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 143 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
4560600
potai port
May 14, 2024
8f9ac76
login
May 14, 2024
3315ed8
register
May 17, 2024
ced283c
InvestmentMarket
May 20, 2024
c1af28d
loading
May 23, 2024
ebc01b0
modal
May 24, 2024
f88d50e
theme global store
May 27, 2024
dad917a
switch base
ohnoitsasia May 27, 2024
3bf1bba
Merge branch 'DEV' of http://192.168.10.77:8888/ben_peng/potai_client…
May 27, 2024
c656721
dark switch
May 27, 2024
d633662
link
ohnoitsasia May 27, 2024
a98985f
link
ohnoitsasia May 27, 2024
682004d
tailwind+rwd+eslist
ohnoitsasia May 29, 2024
63ac8ac
rwd+menu
ohnoitsasia May 29, 2024
2586632
rwd
ohnoitsasia May 29, 2024
8ffa516
rwd
ohnoitsasia May 29, 2024
53db4d0
password
ohnoitsasia May 30, 2024
a47b327
i18n
ohnoitsasia Jun 3, 2024
17a8612
potai ecosystem
Jun 3, 2024
d407a4e
Merge branch 'DEV' of http://192.168.10.77:8888/ben_peng/potai_client…
Jun 3, 2024
e4c47a1
temp
ohnoitsasia Jun 3, 2024
1f8c7c3
Merge branch 'DEV' of http://192.168.10.77:8888/ben_peng/potai_client…
ohnoitsasia Jun 3, 2024
bdc8112
i18n
ohnoitsasia Jun 3, 2024
4d5715c
vi
Jun 13, 2024
29d138f
success message
Jun 13, 2024
9ae6537
i18n
Jun 14, 2024
afb978a
login and register debug
Jun 20, 2024
33edc4c
alan template
Jul 9, 2024
cdbd4bd
styles fix
Jul 12, 2024
99f9104
update function
dragonfly9999 Sep 24, 2024
3665492
show invitation code
Sep 24, 2024
6b7f46f
eco set
Sep 24, 2024
ef28260
update function 2
dragonfly9999 Sep 24, 2024
5576d0c
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Sep 24, 2024
c07712c
kyc
Sep 24, 2024
7a2c22f
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
Sep 24, 2024
5da7703
fix bug
Sep 24, 2024
4947a0b
kyc fix
Sep 25, 2024
bf85294
up to date to build
dragonfly9999 Sep 25, 2024
f13efca
fix da test problem
dragonfly9999 Sep 26, 2024
1d4288e
update fix da potai test bug
dragonfly9999 Sep 26, 2024
8e04246
fix to check2
dragonfly9999 Sep 27, 2024
47eaa81
update KYC and register form
dragonfly9999 Sep 30, 2024
a669e3c
update countryCode extra update Country function
dragonfly9999 Oct 1, 2024
4adcf69
Fix navigating useSWR.get() is undefined bug
Oct 1, 2024
168d96b
MT4 account creation
Oct 7, 2024
f930b87
baotai account info
Oct 7, 2024
127fa70
check1
dragonfly9999 Oct 8, 2024
4f569c2
check pull
dragonfly9999 Oct 8, 2024
6b5bc09
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Oct 8, 2024
1b38eef
delete
dragonfly9999 Oct 8, 2024
cf8084c
up to date dl
dragonfly9999 Oct 9, 2024
00ce6fc
update dl 2
dragonfly9999 Oct 9, 2024
4203966
proress function err
dragonfly9999 Oct 17, 2024
8f71e4e
update mt account and translate
dragonfly9999 Oct 17, 2024
31e32a6
refact kyc
dragonfly9999 Oct 18, 2024
e72ebd3
Deposit,bank
Oct 20, 2024
7e608d9
Merge remote-tracking branch 'refs/remotes/origin/DEV' into DEV
Oct 21, 2024
360186b
Exclude mt4 from deposit
Oct 21, 2024
70a9bfb
pay translation
dragonfly9999 Oct 21, 2024
dff2989
translation payment2
dragonfly9999 Oct 21, 2024
b3274ea
fix deposit design, add spinner
Oct 21, 2024
2cbaccd
withdraw confirm form
Oct 21, 2024
9931d44
withdraw wallet balance
Oct 21, 2024
1f12718
rafact translate all KYC
dragonfly9999 Oct 21, 2024
b554ab9
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Oct 21, 2024
14d3af8
fix bug useVerification
Oct 21, 2024
0923aac
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
Oct 21, 2024
65e329a
withdraw email verification
Oct 22, 2024
945bad4
deposit function, validation signUp
dragonfly9999 Oct 22, 2024
d6b1438
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Oct 22, 2024
5784aa3
Countdown
Oct 22, 2024
65755bd
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
Oct 22, 2024
04c8144
change https
Oct 22, 2024
a3686d5
version base
Oct 22, 2024
8942264
Resend Email and Auth
dragonfly9999 Oct 22, 2024
3b881bd
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Oct 22, 2024
60071b8
show progress bar when making request
Oct 23, 2024
e56e38c
session expired notification token expired, implement useAxiosInterce…
Oct 23, 2024
06bd77f
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
Oct 23, 2024
47b7793
withDraw valid, handle data
dragonfly9999 Oct 23, 2024
71a74e1
refact auth's input
dragonfly9999 Oct 23, 2024
6112277
auth's email 2
dragonfly9999 Oct 23, 2024
0ea433b
auth's mail 2
dragonfly9999 Oct 23, 2024
e70eeda
track, manage bank acc
dragonfly9999 Oct 24, 2024
32b4541
NotifyCompletedOrder, add custom handler for SignalR connection
Oct 24, 2024
d0ceb7c
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
Oct 24, 2024
50ec7bf
centralize api
Oct 24, 2024
fd623ec
pustt
SoUni2003 Oct 26, 2024
af9a924
[#25]: The drawers for depositing money will interfere with each othe…
Oct 28, 2024
7cc9d79
[#24]: Fix bug Deposit BVAC cannot be displayed
Oct 28, 2024
9c0c5ca
[#26]: Select the trading platform and change it to "Please enter the…
Oct 28, 2024
3442d5c
"I need to pay: USDT"
Oct 28, 2024
f940308
[#41]: When the amount is insufficient for transfer, an error message…
Oct 28, 2024
862da73
Update version
Oct 28, 2024
19499c2
process bug 28-10
dragonfly9999 Oct 28, 2024
570950c
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Oct 28, 2024
29f5917
fix width
SoUni2003 Oct 28, 2024
c9986f3
fix some err
SoUni2003 Oct 28, 2024
950f96a
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
SoUni2003 Oct 28, 2024
0c30689
update process form and language
dragonfly9999 Oct 28, 2024
ddc7035
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Oct 28, 2024
9ad403f
update nb version
dragonfly9999 Oct 29, 2024
0cb4425
version number
dragonfly9999 Oct 29, 2024
0978d4a
number and namer verstion
dragonfly9999 Oct 29, 2024
df6d477
process display MT acc
dragonfly9999 Oct 29, 2024
261bc3d
Withdraw fix
Oct 29, 2024
28d617a
add langues
SoUni2003 Oct 30, 2024
6836cc3
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
SoUni2003 Oct 30, 2024
d5b3711
potai_bug update process
dragonfly9999 Oct 30, 2024
fecb98f
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Oct 30, 2024
d6e226d
get version
dragonfly9999 Oct 30, 2024
c9b482d
Cut delay effect
dragonfly9999 Oct 30, 2024
4927c5c
process Link tag
dragonfly9999 Oct 30, 2024
04bfb4f
process switch
dragonfly9999 Oct 30, 2024
f933285
process switch2
dragonfly9999 Oct 30, 2024
0acd814
update err
dragonfly9999 Oct 31, 2024
079ee67
get tab address
dragonfly9999 Oct 31, 2024
c9f83b5
Transfer, transaction history
Nov 1, 2024
66c761d
process logo
dragonfly9999 Nov 4, 2024
0bbb456
version
dragonfly9999 Nov 4, 2024
e39ac87
KYC & asset management link
dragonfly9999 Nov 5, 2024
70ffc25
loop price
SoUni2003 Nov 5, 2024
6456bff
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
SoUni2003 Nov 5, 2024
00f9018
related merge
dragonfly9999 Nov 7, 2024
2ccf89c
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Nov 7, 2024
50a5071
update to merge tranposit
dragonfly9999 Nov 7, 2024
9268892
version, first process set connection update too much
dragonfly9999 Nov 7, 2024
232653f
version, first process set connection update too much
dragonfly9999 Nov 7, 2024
6205b16
Implement CsChat (chatting between anonymous and CS, chatting between…
Nov 11, 2024
4488e1b
Chat between client and cs
Nov 11, 2024
c47f648
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
Nov 12, 2024
dfe81a8
update
SoUni2003 Nov 12, 2024
23bd7da
Fix message order, seen icon
Nov 13, 2024
63b2cab
Hover on document show fileUrl
Nov 13, 2024
01a2453
config hook data, process MT4Info,Crypto table
dragonfly9999 Nov 13, 2024
01f8c75
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
dragonfly9999 Nov 13, 2024
c43b17f
process DailyFlutuationData Chart
dragonfly9999 Nov 14, 2024
995cc46
process chart sine funcs and render error
dragonfly9999 Nov 18, 2024
f2a8685
Merge branch 'DEV' of http://220.135.67.240:8880/ben_peng/potai_clien…
SoUni2003 Nov 20, 2024
367ff76
m
SoUni2003 Nov 20, 2024
cb37844
mege
SoUni2003 Nov 20, 2024
5f15417
change secr
SoUni2003 Jan 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PORT=3001
VITE_HTTP_ROOT=https://demoApi.rushprofit.uk
VITE_PAYMENT_ROOT=http://localhost:5000
VITE_HUBS_URL=/hubs/
VITE_VERSION=Shuu-11-12

# VITE_HTTP_ROOT=https://demoApi.rushprofit.uk
5 changes: 5 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VITE_PUBLIC_API_URL=https://api.rushprofit.uk
VITE_HTTP_ROOT=https://demoApi.rushprofit.uk
VITE_PAYMENT_ROOT=http://localhost:5000
VITE_HUBS_URL=/hubs/
VITE_VERSION=Shuu-11-12
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
'react/function-component-definition': [
2,
{
namedComponents: ['function-expression' | 'arrow-function'],
namedComponents: ['function-expression', 'arrow-function'],
unnamedComponents: ['function-expression'],
},
],
Expand All @@ -35,6 +35,7 @@ module.exports = {
],
'no-empty-pattern': ['off'],
},
include: ['tailwind.config.js'] ,

settings: {
'import/parsers': {
Expand Down
Binary file added .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
29 changes: 29 additions & 0 deletions ecosystem.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/** Paste the run script
* pm2 start ecosystem.config.cjs --only PtClientDev-3001 --attach
* pm2 start ecosystem.config.cjs --only PtClientProd-3002 --attach
*/

const path = require('path');
const vitePath = path.normalize('./node_modules/vite/bin/vite.js');
// const interpreterPath = path.normalize('/home/dls/.nvm/versions/node/v18.20.2/bin/node'); // -- ubuntu
const interpreterPath = path.normalize('C:\\Program Files\\nodejs\\node.exe'); // -- windows

module.exports = {
apps: [
{
name: 'PtClientDev-3001',
script: vitePath,
interpreter: interpreterPath,
args: '--host',
},
{
name: 'PtClientProd-3002',
script: 'serve',
env: {
PM2_SERVE_PATH: './dist/',
PM2_SERVE_PORT: 3002,
PM2_SERVE_SPA: 'true',
},
},
],
};
22 changes: 20 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,49 @@
"dependencies": {
"@ant-design/charts": "^2.1.0",
"@ant-design/icons": "^5.3.6",
"@ant-design/pro-components": "^2.7.1",
"@ant-design/pro-components": "^2.7.19",
"@ant-design/pro-form": "^2.30.2",
"@ant-design/pro-layout": "^7.19.0",
"@faker-js/faker": "^8.4.1",
"@microsoft/signalr": "^8.0.0",
"@microsoft/signalr": "^8.0.7",
"@reduxjs/toolkit": "^2.2.7",
"@tanstack/react-query": "^5.32.0",
"@tanstack/react-query-devtools": "^5.32.0",
"antd": "^5.16.5",
"axios": "^1.6.8",
"chart.js": "^4.4.6",
"dayjs": "^1.11.11",
"formik": "^2.4.6",
"i18next": "^23.11.5",
"localforage": "^1.10.0",
"numbro": "^2.5.0",
"react": "^18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.0",
"react-fast-marquee": "^1.6.4",
"react-i18next": "^14.1.2",
"react-icons": "^5.1.0",
"react-native-svg": "^15.2.0",
"react-redux": "^9.1.2",
"react-responsive": "^10.0.0",
"react-router-dom": "^6.23.0",
"react-to-print": "^2.15.1",
"tesseract.js": "^5.1.1",
"vega": "^5.30.0",
"vega-embed": "^6.28.0",
"vega-lite": "^5.21.0",
"yup": "^1.4.0",
"zustand": "^4.5.2"
},
"devDependencies": {
"@types/lodash": "^4.17.13",
"@types/node": "^20.12.7",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "7.0.0",
"@typescript-eslint/parser": "7.2.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"autoprefixer": "^10.4.19",
"eslint": "8.56.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^18.0.0",
Expand All @@ -50,9 +66,11 @@
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-refresh": "^0.4.6",
"postcss": "^8.4.38",
"prettier": "3.1.0",
"prettier-eslint": "16.1.2",
"sass": "^1.75.0",
"tailwindcss": "^3.4.3",
"typescript": "^5.2.2",
"vite": "^5.2.0"
}
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
Empty file added react-i18n/package-lock.json
Empty file.
35 changes: 35 additions & 0 deletions src/I18n/I18n.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import en from './en/en';
import ch from './ch/ch';
import vi from './vi/vi';

const resources = {
ch: {
translation: ch,
language:'繁體中文',
family:'chinese'
},
en: {
translation: en,
language:'English',
family:'English'
},
vi: {
translation: vi,
language:'Tiếng Việt',
family:'Tiếng Việt'
},
};


i18n.use(initReactI18next).init({
resources,
lng: 'ch',
fallbackLng: 'ch',
interpolation: {
escapeValue: false,
},
});

export default { i18n, resources };
19 changes: 19 additions & 0 deletions src/I18n/TranslationTypes/TranslationTypes.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { auth } from './components/auth';
import { layout } from './components/layout';
import { nav } from './components/nav';
import { account } from './components/account';
import { assets } from './components/assets';
import { report } from './components/report';
import { serve } from './components/serve';

export type Translation = {
register: string;
welcome: string;
auth: auth;
layout: layout;
account: account;
nav: nav;
assets: assets;
report: report;
serve: serve;
};
15 changes: 15 additions & 0 deletions src/I18n/TranslationTypes/components/account.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export type account = {
帳戶管理: string,
我的帳戶: string,
新增帳戶: string,
取消: string,
選擇交易平台: string,
選擇帳戶類型: string,
真實帳戶: string,
虛擬帳戶: string,
設定帳戶密碼: string,
輸入: string,
確認: string,
前往: string,
PasswordInvestor: string,
};
60 changes: 60 additions & 0 deletions src/I18n/TranslationTypes/components/assets.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
export type assets = {
資產管理: string,
入金: string,
出金: string,
轉帳: string,
資產報表: string,
通過實名驗證: string,
通過: string,
未通過: string,
開始驗證: string,
驗證碼審核中: string,
下載: string,
搜尋: string,
存入資金: string,
入金方式: string,
入金帳戶: string,
我要存入: string,
帳戶可用資金: string,
手續費: string,
需支付: string,
清除: string,
提交: string,
超過限額: string,
提取為: string,
提取至: string,
出金匯率: string,
帶入通過KYC的銀行帳戶: string,
從: string,
處理中: string,
請支付: string,
剩餘: string,
流水號: string,
建立時間: string,
點擊已完成付款後: string,
資產紀錄: string,
全部: string,
進行中: string,
贈金: string,
完成: string,
開始日期: string,
結束日期: string,
請於時限內: string,
注意事項: string,
剩餘支付時間: string,
收款地址: string,
我已經完成付款: string,
沒有加密貨幣錢包嗎: string,
選擇下列平台: string,
CNY轉帳支付: string,
立即下載: string,
填寫銀行資料: string,
交易平台: string,
其他平台: string,
總覽: string,
優惠活動: string,
交易社區: string,
熱門投資: string
};

export default assets;
14 changes: 14 additions & 0 deletions src/I18n/TranslationTypes/components/auth.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export type auth = {
loginTitle: String;
SuggestCreateAcc: String;
forgotPasswordAtLogin: String;
passwordAtLogin: String;
loginButton: String;
emailAtLogin: String;
rememberAtLogin: String;
noAccountYetAtLogin: String;
noEmailYet: String;
resend: String;
logOutAtHeader: String;
};

25 changes: 25 additions & 0 deletions src/I18n/TranslationTypes/components/layout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
export type layout = {
使用條款: string,
免責聲明: string,
請閱讀並同意: string,
客戶協議書: string,
風險披露聲明: string,
保密協議: string,
聯絡客服: string,
新會員尚未實名驗證: string,
實名驗證審核中: string,
已通過實名驗證: string,
通過實名驗證開始投資: string,
幫助中心: string,
如何入金: string,
如何出金: string,
如何開立帳戶: string,
如何驗證帳戶: string,
關於我們: string,
簡介: string,
最新公告: string,
隱私和法規: string,
通知入金成功: string,
通知出金成功: string,
};

9 changes: 9 additions & 0 deletions src/I18n/TranslationTypes/components/nav.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export type nav ={
填寫銀行資料: string,
交易平台: string,
其他平台: string,
總覽: string,
優惠活動: string,
交易社區: string,
熱門投資: string,
};
28 changes: 28 additions & 0 deletions src/I18n/TranslationTypes/components/report.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export type report = {
報表查詢: string;
帳戶報表: string;
資產報表: string;
我的總價值: string;
寶泰帳戶: string;
MT4帳戶: string;
MT5帳戶: string;
貨幣: string;
指數: string;
股票: string;
大宗商品: string;
加密貨幣: string;
平倉: string;
持倉: string;
掛單: string;
開立倉位: string;
單位: string;
開倉: string;
止損: string;
止盈: string;
傭金: string;
稅收: string;
過夜利息: string;
盈虧: string;
損益: string;
浮動損益: string;
};
17 changes: 17 additions & 0 deletions src/I18n/TranslationTypes/components/serve.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export type serve = {
客戶服務: string;
投資市場: string;
我的關注: string;
新聞: string;
工具: string;
每日波動: string;
漲跌幅: string;
一天: string;
賣出: string;
買入: string;
五十二周區間: string;
情緒: string;
交易: string;
關注: string;
前往交易: string;
};
22 changes: 22 additions & 0 deletions src/I18n/ch/ch.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Translation } from '../TranslationTypes/TranslationTypes';
import auth from './components/auth';
import layout from './components/layout';
import nav from './components/nav';
import account from './components/account';
import assets from './components/assets';
import report from './components/report';
import serve from './components/serve';

const ch: Translation = {
register: '註冊',
welcome: '哩後',
auth: auth,
layout: layout,
nav:nav,
account: account,
assets:assets,
report: report,
serve: serve,
};

export default ch;
Loading