Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CoNETProject committed Nov 20, 2023
1 parent 86db00e commit 26ffb56
Show file tree
Hide file tree
Showing 11 changed files with 242 additions and 223 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@
"@conet.project/seguro-worker-lib": "0.13.9",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.14.16",
"@mui/material": "^5.14.17",
"@mui/icons-material": "^5.14.18",
"@mui/material": "^5.14.18",
"@mui/lab": "^5.0.0-alpha.153",
"primereact": "^10.0.9",
"@react-icons/all-files": "^4.1.0",
"@tippyjs/react": "^4.2.6",
"dayjs": "^1.11.10",
"framer-motion": "^10.16.4",
"framer-motion": "^10.16.5",
"get-port": "^7.0.0",
"react-draggable": "^4.4.6",
"react-hot-toast": "^2.4.1",
"react-loader-spinner": "^5.4.5",
"react-lottie-player": "^1.5.5",
"react-router-dom": "^6.18.0",
"react-router-dom": "^6.19.0",
"uuid": "^9.0.1",
"web-vitals": "^3.5.0",
"country-flag-icons": "^1.5.7",
Expand All @@ -59,10 +59,10 @@
"@storybook/preset-create-react-app": "^7.5.3",
"@storybook/react": "^7.5.3",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.1.0",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
"@types/jest": "^29.5.8",
"@types/node": "^20.9.0",
"@types/node": "^20.9.2",
"@types/react": "^18.2.37",
"@types/react-document-meta": "^3.0.5",
"@types/react-dom": "^18.2.15",
Expand All @@ -73,21 +73,21 @@
"concurrently": "^8.2.2",
"buffer": "^6.0.3",
"cors": "^2.8.5",
"electron":"^27.0.4",
"electron":"^27.1.0",
"eslint-plugin-react-hooks": "^4.6.0",
"express": "^4.18.2",
"modern-normalize": "^2.0.0",
"react": "^18.2.0",
"react-document-meta": "^3.0.0-beta.2",
"react-dom": "^18.2.0",
"react-icons": "^4.11.0",
"react-intl": "^6.5.2",
"react-icons": "^4.12.0",
"react-intl": "^6.5.5",
"react-redux": "^8.1.3",
"react-scripts": "^5.0.1",
"styled-components": "^6.1.1",
"typescript": "^5.2.2",
"wait-on": "^7.1.0",
"caniuse-lite": "^1.0.30001561"
"wait-on": "^7.2.0",
"caniuse-lite": "^1.0.30001563"
},
"browserslist": {
"production": [
Expand Down
5 changes: 2 additions & 3 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ const App = () => {
const test = await testLocalServer ()
if (test === true) {
setlocalDaemon(true)
dAPPInitialize().then(() => {

})
}
dAPPInitialize().then(() => {
})
}

testDeamon().catch((ex) => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 63 additions & 12 deletions src/components/App/Apps/CONET-Proxy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ import AccordionDetails from '@mui/material/AccordionDetails'
import SaaSNodes from './SaasNodes'
import type {nodes_info} from './SaasNodes'
import { useIntl } from "react-intl"
import chromeImg from './assets/images/chrome.gif'
import Stack from '@mui/material/Stack'
import miner2 from '../../../../assets/miner/FancyNyan.webp'

//import { ColorMode, TerminalOutput } from 'react-terminal-ui'
Expand Down Expand Up @@ -87,7 +89,7 @@ const StyleIconSize = styledCom.img`
`

const StyleIconSize1 = styledCom.img`
width:700px;
width:400px;
`

Expand Down Expand Up @@ -172,15 +174,30 @@ const FeatureArea7Item = () => {
)
}

const FeatureArea5 = () => {
const showMoreDetail = (locale: string) => {

switch(locale) {
default:
case 'ja-JP':
case 'en-US': {
return window.open(`https://doc.conet.network/conet-white-paper/introduction/wallet-address-routing-network-infrastructure/conet-proxy-service`)
}
case 'zh-TW':
case'zh-CN': {
return window.open(`https://doc.conet.network/conet-bai-pi-shu/jie-shao/qian-bao-di-zhi-lu-you-wang-lao-ji-chu-she-shi/conet-dai-li-fu-wu`)
}
}
}

const FeatureArea5 = (locale: string) => {
const intl = useIntl()
return (
<ThemeProvider theme={themeTopArea1}>
<Grid container spacing={2} columns={{ xs: 4, sm: 8, md: 12 }} sx={{padding:'5rem 5rem 2rem 5rem'}}>
<Grid container spacing={2} columns={{ xs: 4, sm: 8, md: 12 }} sx={{padding:'5rem 5rem 5rem 5rem'}}>
<Grid item xs={12}>
<ItemTopArea2 elevation={0}>
<Slide direction="right" in={true} mountOnEnter>
<Typography variant="h4" >
<Typography variant="h4" sx={{color:' #448aff'}} >
{ intl.formatMessage({id:'platform.proxy.FeatureArea.title.1'})}

</Typography>
Expand All @@ -193,9 +210,18 @@ const FeatureArea5 = () => {
</Slide>
</ItemTopArea2>
</Grid>

< FeatureArea5Item />
< FeatureArea6Item />
< FeatureArea7Item />
<Grid item xs={12} sx={{textAlign: 'center' }}>
<Button
variant="outlined" size="large"
onClick={() => showMoreDetail(locale)}
sx={{backgroundColor:'white', textTransform: 'none', fontSize: '1.5rem' }}>
{ intl.formatMessage({id: 'platform.proxy.FeatureArea5.moreDetail'})}
</Button>
</Grid>
</Grid>

</ThemeProvider>
Expand Down Expand Up @@ -283,9 +309,9 @@ const featureArea8Item = (conetBalance: string, loading: boolean, faucet: () =>
id="panel1a-header"
sx={{backgroundColor: 'rgb(240,240,240)'}}
>
<Typography variant="h5" sx={{ fontWeight: '900', textAlign:'center', textTransform: 'uppercase' }}>
{intl.formatMessage({id: 'platform.proxy.step1.title'})}
</Typography>

{intl.formatMessage({id: 'platform.proxy.step1.title'})}

</AccordionSummary>
<AccordionDetails>
<Grid container spacing={2} columns={{ xs: 4, sm: 8, md: 12 }}>
Expand Down Expand Up @@ -397,15 +423,39 @@ const featureArea8Item = (conetBalance: string, loading: boolean, faucet: () =>
</Accordion>
{
// Firefox setup ***************************************************
}
}
<Accordion expanded={expanded === 'panel3'} onChange={handleChange('panel3')}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="panel1a-content"
id="panel1a-header"
sx={{backgroundColor: 'rgb(240,240,240)'}}
>
{intl.formatMessage({id: 'platform.proxy.featureArea8Item.chrome'})}
</AccordionSummary>
<AccordionDetails>
<StyleIconItem>
<Stack>
<StyleIconSize1 src={chromeImg}/>
<Button
variant="outlined" size="large"
onClick={() =>window.open(`https://chromewebstore.google.com/detail/conet-platform/pkhkeliikkihkaolfcogfcbjmbehockd`)}
sx={{backgroundColor:'white', textTransform: 'none', fontSize: '1.5rem' }}>
{ intl.formatMessage({id: 'platform.proxy.featureArea8Item.chrome.extensions'})}
</Button>
</Stack>

</StyleIconItem>
</AccordionDetails>
</Accordion>
<Accordion expanded={expanded === 'panel2'} onChange={handleChange('panel2')}>
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
aria-controls="panel1a-content"
id="panel1a-header"
sx={{backgroundColor: 'rgb(240,240,240)'}}
>
<Typography variant="h5" sx={{ fontWeight: '900', textAlign:'center', textTransform: 'uppercase' }}>{intl.formatMessage({id: 'platform.proxy.featureArea8Item.step3'})}</Typography>
{intl.formatMessage({id: 'platform.proxy.featureArea8Item.step3'})}
</AccordionSummary>
<AccordionDetails>
<StyleIconItem>
Expand Down Expand Up @@ -433,11 +483,11 @@ const featureArea6 = (conetBalance: string, loading: boolean,
const intl = useIntl()
return (
<ThemeProvider theme={themeTopArea1}>
<Grid container spacing={2} columns={{ xs: 4, sm: 8, md: 12 }} sx={{padding:'0 5rem 0 5rem'}}>
<Grid container spacing={2} columns={{ xs: 4, sm: 8, md: 12 }} sx={{padding:'3rem 5rem 0 5rem'}}>
<Grid item xs={12} sx={{paddingBottom: '2rem'}} >
<ItemTopArea2 elevation={0}>
<Slide direction="right" in={true} mountOnEnter>
<Typography variant="h4" >
<Typography variant="h4" sx={{color:' #448aff'}}>
{ intl.formatMessage({id:'platform.proxy.FeatureArea.start'})}
</Typography>
</Slide>
Expand Down Expand Up @@ -528,6 +578,7 @@ const fetchProxyData = async (node: nodes_info, setProxyNodeLog: React.Dispatch<
const LaunchPage = () => {

const {
locale,
setShowGuide,
setShowAppStore
} = useAppState()
Expand Down Expand Up @@ -657,7 +708,7 @@ const LaunchPage = () => {
<ThemeProvider theme={themeTopArea1} >
<ItemContainer sx={{ overflowY: 'scroll'}}>
<HeaderArea/>
<FeatureArea5 />
{FeatureArea5( locale )}
{
featureArea6(showAssetBalance_balance, loading, faucet, selectOnChange, regionConfirm, regionProgress, walletAddress, nodes, showConfirm, showProxyNodeLogs, showMiner, setShowMiner)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/NoDaemon/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const deamon = () => {
setLoading (true)
const test = await testLocalServer()
setLoading(false)
if (test === false) {
if (test !== true) {
setError (true)
return setTimeout(() => setError(false), 1000)
}
Expand Down
7 changes: 5 additions & 2 deletions src/localization/messages/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ const en_US: Messages = {
'launchPage.FeatureArea5.1': 'TRUE PRIVACY',
'launchPage.FeatureArea5.2': 'Privacy from government and corporate surveillance is becoming increasingly important to users. By replacing cumbersome Web2 communication protocols with an innovative Web3 protocol, true privacy becomes possible.',

'platform.proxy.FeatureArea5.moreDetail': 'More Information',
'launchPage.FeatureArea6.1': 'SIMPLE USER ADOPTION',
'launchPage.FeatureArea6.2': 'Onboarding is easy since the platform runs in various browsers. There’s no need to install any app to get the benefit of CoNET. All incoming and outgoing data will still be encrypted, making user history invisible.',

Expand Down Expand Up @@ -303,7 +304,9 @@ const en_US: Messages = {
'platform.proxy.featureArea8Item.step1.transferQuote': 'Billed by traffic, 1MB/1$CONET',
'platform.proxy.featureArea8Item.step2': 'Step 2 select proxy server localtion',
'platform.proxy.featureArea8Item.step2.random': '',//'Multiple selections will use randomly by fragmented data packets',
'platform.proxy.featureArea8Item.step3': 'Setp 3 Setup Your FireFox',
'platform.proxy.featureArea8Item.step3': 'Setup FireFox',
'platform.proxy.featureArea8Item.chrome': 'Setup Chromium',
'platform.proxy.featureArea8Item.chrome.extensions': 'Download from Chrome Store',

'platform.proxy.featureArea8Item.minerSetup.title': 'Select Option',
'platform.proxy.featureArea8Item.minerSetup.saas':'SaaS',
Expand All @@ -314,7 +317,7 @@ const en_US: Messages = {
'launchPage.FeatureArea9.title': 'CONET testnet is live',
'platform.joinUS.header.title.1': 'DePEN Idle Computer Resources',
'platform.joinUS.header.title.2': 'Fair Free Market',
'platform.joinUS.header.detail': 'CONET is building a suite of privacy network layer infrastructure for Web3.',
'platform.joinUS.header.detail': 'CONET is a infrastructure for privacy in layer minus',
'platform.joinUS.header.whatConet': `What's CONET`,
'platform.joinUS.miner.Bandwidth': 'Bandwidth Provider',
'platform.joinUS.miner.BandwidthDetail': 'Get rewards by sharing your unused network resources.',
Expand Down
7 changes: 5 additions & 2 deletions src/localization/messages/ja_JP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ const ja_JP: Messages = {

'platform.proxy.FeatureArea5.1': '真のプライバシー保護へ',
'platform.proxy.FeatureArea5.2': 'CONETプロキシテクノロジは、VPNプライバシーの定義を書き換えます。 分散型で断片化された通信により、データはデータの海に完全に隠蔽されます。ウォレットアドレス通信ルーティングのネットワークにより、ユーザーは監視から消えます。',
'platform.proxy.FeatureArea5.moreDetail': 'もっと詳しく',
'platform.proxy.FeatureArea6.1': 'トラフィックの難読化テクノロジ',
'platform.proxy.FeatureArea6.2': `CONETプロキシの最大の特徴は、独自なプロトコルを使われていない事`,
'platform.proxy.FeatureArea7.1': '同時トラフィックのパワー',
Expand All @@ -288,7 +289,9 @@ const ja_JP: Messages = {
'platform.proxy.featureArea8Item.step1.transferQuote': 'お見積 1MB/1$CONET',
'platform.proxy.featureArea8Item.step2': 'ステップ 2: プロキシサーバーの場所を選択(複数選択肢が可能)',
'platform.proxy.featureArea8Item.step2.random': ' ',
'platform.proxy.featureArea8Item.step3': 'ステップ 3: Firefoxをセットアップ',
'platform.proxy.featureArea8Item.step3': 'Firefoxをセットアップ',
'platform.proxy.featureArea8Item.chrome': 'Chromium類ブラウザをセットアップ',
'platform.proxy.featureArea8Item.chrome.extensions': 'Googleアプリストアからダウンロード',

'platform.proxy.featureArea8Item.minerSetup.title': 'マイニングタイプを選択してください',
'platform.proxy.featureArea8Item.minerSetup.saas':'SaaS コンピューティングパワーマイニング',
Expand All @@ -297,7 +300,7 @@ const ja_JP: Messages = {
'launchPage.FeatureArea9.title': 'CONETテストネットが正式に開始',
'platform.joinUS.header.title.1': '余ったコンピューターリソースで',
'platform.joinUS.header.title.2': 'フェアトレード市場',
'platform.joinUS.header.detail': 'CONETはWeb3のためにプライバシーネットワーク層インフラストラクチャを構築',
'platform.joinUS.header.detail': 'CONETはLayer Minusプライバシーインフラです',
'platform.joinUS.header.whatConet': `CONETとは`,
'launchPage.FeatureArea3.2': 'CONETはパーミッションレス、トラストレスのコミュニティ主導の相互作用を促進する、オープンソースプロジェクトです。ブロックチェーン技術で初めて匿名マイニングが実現しました。 ユーザーはCONETトークンを使用して、ガス料を支払い、報酬の獲得、トークンの委任、ノードの実行、ガバナンス計画への投票を行うことができます。',
'launchPage.FeatureArea4.1': 'CONETは業界のトップに',
Expand Down
8 changes: 6 additions & 2 deletions src/localization/messages/zh-CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ const zh_CN: Messages = {
'platform.proxy.FeatureArea.title.2': ' ',
'platform.proxy.FeatureArea5.1': '实现真正的隐私',
'platform.proxy.FeatureArea5.2': 'CONET代理技术重写了VPN隐私定义。碎片化通信让数据完美地隐藏在数据海洋中。钱包地址通讯路由网络,让客户在去中心化代理服务商面前完全匿名',
'platform.proxy.FeatureArea5.moreDetail': '更多信息',

'platform.proxy.FeatureArea6.1': '流量混淆技术',
'platform.proxy.FeatureArea6.2': `CONET代理最大特点是没有特殊协议,碎片化通讯让流量隐身不可见`,
'platform.proxy.FeatureArea7.1': '并发流量的威力',
Expand All @@ -290,7 +292,9 @@ const zh_CN: Messages = {
'platform.proxy.featureArea8Item.step1.transferQuote': '计费 1MB/1$CONET',
'platform.proxy.featureArea8Item.step2': '第二步:选择代理服务器位置(可多选)',
'platform.proxy.featureArea8Item.step2.random': ' ',//'多重选择,通讯数据将碎片化随机使用',
'platform.proxy.featureArea8Item.step3': '第三步:设置火狐浏览器来使用代理',
'platform.proxy.featureArea8Item.step3': '火狐浏览器设置',
'platform.proxy.featureArea8Item.chrome': 'Chromium内核类浏览器设置',
'platform.proxy.featureArea8Item.chrome.extensions': '谷歌应用商店下载',

'platform.proxy.featureArea8Item.minerSetup.title': '请选择挖矿类型',
'platform.proxy.featureArea8Item.minerSetup.saas':'SaaS算力挖矿',
Expand All @@ -301,7 +305,7 @@ const zh_CN: Messages = {
'launchPage.FeatureArea9.title': 'CONET测试网正式运行',
'platform.joinUS.header.title.1': '空余计算机资源',
'platform.joinUS.header.title.2': '公平交易市场',
'platform.joinUS.header.detail': 'CONET正在为Web3构建一套隐私网络层基础设施',
'platform.joinUS.header.detail': 'CONET是Layer Minus隐私基础设施',
'platform.joinUS.header.whatConet': `CONET是什么`,
'platform.joinUS.miner.Bandwidth': '带宽挖矿',
'platform.joinUS.miner.BandwidthDetail': '通过分享未使用网络资源来获取奖励。',
Expand Down
7 changes: 5 additions & 2 deletions src/localization/messages/zh-TW.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ const zh_CN: Messages = {
'platform.proxy.FeatureArea.title.2': ' ',
'platform.proxy.FeatureArea5.1': '實現真正的隱私',
'platform.proxy.FeatureArea5.2': 'CONET代理技術重寫了VPN隱私定義。碎片化通訊讓資料完美地隱藏在資料海洋中。錢包地址通訊路由網絡,讓客戶在去中心化代理服務商面前完全匿名',
'platform.proxy.FeatureArea5.moreDetail': '更多資訊',
'platform.proxy.FeatureArea6.1': '流量混淆技術',
'platform.proxy.FeatureArea6.2': `CONET代理最大特色是沒有特殊協議,碎片化通訊讓流量隱形不可見`,
'platform.proxy.FeatureArea7.1': '並發流量的威力',
Expand All @@ -307,7 +308,9 @@ const zh_CN: Messages = {
'platform.proxy.featureArea8Item.step1.transferQuote': '計費 1MB/1$CONET',
'platform.proxy.featureArea8Item.step2': '第二步:選擇代理伺服器位置(可多選)',
'platform.proxy.featureArea8Item.step2.random': ' ',//'多重選擇,通訊資料將碎片化隨機使用',
'platform.proxy.featureArea8Item.step3': '第三步:設定火狐瀏覽器來使用代理',
'platform.proxy.featureArea8Item.step3': '火狐瀏覽器設定',
'platform.proxy.featureArea8Item.chrome': 'Chromium內核類瀏覽器設定',
'platform.proxy.featureArea8Item.chrome.extensions': '谷歌應用程式商店下載',

'platform.proxy.featureArea8Item.minerSetup.title': '請選擇挖礦類型',
'platform.proxy.featureArea8Item.minerSetup.saas':'SaaS算力挖礦',
Expand All @@ -318,7 +321,7 @@ const zh_CN: Messages = {
'launchPage.FeatureArea9.title': 'CONET測試網正式運行',
'platform.joinUS.header.title.1': '空餘電腦資源',
'platform.joinUS.header.title.2': '公平交易市場',
'platform.joinUS.header.detail': 'CONET正在為Web3建置一套隱私網路層基礎設施',
'platform.joinUS.header.detail': 'CONET是Layer Minus隱私基礎設施',
'platform.joinUS.header.whatConet': `CONET是什麼`,
'platform.joinUS.miner.Bandwidth': '頻寬挖礦',
'platform.joinUS.miner.BandwidthDetail': '透過分享未使用網路資源來獲取獎勵。',
Expand Down
Loading

0 comments on commit 26ffb56

Please sign in to comment.