-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into workspace-selection-fixes
- Loading branch information
Showing
73 changed files
with
5,780 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "../../.eslintrc.json", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Remix Dapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "remix-dapp", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"webpack-manifest-plugin": "^5.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"name": "remix-dapp", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/remix-dapp/src", | ||
"projectType": "application", | ||
"implicitDependencies": [], | ||
"targets": { | ||
"build": { | ||
"executor": "@nrwl/webpack:webpack", | ||
"outputs": ["{options.outputPath}"], | ||
"defaultConfiguration": "development", | ||
"dependsOn": ["install"], | ||
"options": { | ||
"compiler": "babel", | ||
"outputPath": "dist/apps/remix-dapp", | ||
"index": "apps/remix-dapp/src/index.html", | ||
"baseHref": "./", | ||
"main": "apps/remix-dapp/src/main.tsx", | ||
"tsConfig": "apps/remix-dapp/tsconfig.app.json", | ||
"assets": ["apps/remix-dapp/src/assets/instance.json", "apps/remix-dapp/src/assets/logo.png"], | ||
"styles": ["apps/remix-dapp/src/App.css"], | ||
"scripts": [], | ||
"webpackConfig": "apps/remix-dapp/webpack.config.js" | ||
}, | ||
"configurations": { | ||
"development": { | ||
}, | ||
"production": { | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nrwl/linter:eslint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["apps/remix-dapp/**/*.ts"], | ||
"eslintConfig": "apps/remix-dapp/.eslintrc" | ||
} | ||
}, | ||
"install": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"commands": [ | ||
"cd apps/remix-dapp && yarn" | ||
], | ||
"parallel": false | ||
} | ||
}, | ||
"serve": { | ||
"executor": "@nrwl/webpack:dev-server", | ||
"defaultConfiguration": "development", | ||
"options": { | ||
"buildTarget": "remix-dapp:build", | ||
"hmr": true, | ||
"baseHref": "/" | ||
}, | ||
"configurations": { | ||
"development": { | ||
"buildTarget": "remix-dapp:build:development", | ||
"port": 2026 | ||
}, | ||
"production": { | ||
"buildTarget": "remix-dapp:build:production" | ||
} | ||
} | ||
} | ||
}, | ||
"tags": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.dragbar_terminal { | ||
left: 0px; | ||
top: 0px; | ||
height: 0.3em; | ||
} | ||
|
||
.dragbar_terminal:hover, | ||
.dragbar_terminal.ondrag { | ||
background-color: var(--secondary); | ||
cursor: row-resize; | ||
} | ||
|
||
.label_item { | ||
word-break: break-all; | ||
max-width: 90%; | ||
} | ||
.label_key { | ||
max-width: 65%; | ||
min-width: fit-content; | ||
} | ||
.label_value { | ||
min-width: 10%; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React, { useEffect, useReducer } from 'react'; | ||
import { IntlProvider } from 'react-intl'; | ||
import { ToastContainer } from 'react-toastify'; | ||
import 'react-toastify/dist/ReactToastify.css'; | ||
import { AppContext } from './contexts'; | ||
import { appInitialState, appReducer } from './reducers/state'; | ||
import { initDispatch, initInstance, updateState } from './actions'; | ||
import enJson from './locales/en'; | ||
import zhJson from './locales/zh'; | ||
import esJson from './locales/es'; | ||
import frJson from './locales/fr'; | ||
import itJson from './locales/it'; | ||
import './App.css'; | ||
import { isMobile } from './utils/tools'; | ||
import MobilePage from './components/Home/mobile'; | ||
import PCPage from './components/Home/pc'; | ||
|
||
const localeMap: Record<string, any> = { | ||
zh: zhJson, | ||
en: enJson, | ||
fr: frJson, | ||
it: itJson, | ||
es: esJson, | ||
}; | ||
|
||
function App(): JSX.Element { | ||
const [appState, dispatch] = useReducer(appReducer, appInitialState); | ||
const selectedLocaleCode = appState.settings.selectedLocaleCode; | ||
useEffect(() => { | ||
updateState(appState); | ||
}, [appState]); | ||
useEffect(() => { | ||
initDispatch(dispatch); | ||
updateState(appState); | ||
initInstance(); | ||
}, []); | ||
|
||
return ( | ||
<AppContext.Provider | ||
value={{ | ||
dispatch, | ||
appState, | ||
}} | ||
> | ||
<IntlProvider | ||
locale={selectedLocaleCode} | ||
messages={localeMap[selectedLocaleCode]} | ||
> | ||
{isMobile() ? <MobilePage /> : <PCPage />} | ||
<ToastContainer | ||
position="bottom-right" | ||
newestOnTop | ||
closeOnClick | ||
rtl={false} | ||
pauseOnFocusLoss | ||
draggable | ||
pauseOnHover | ||
theme="colored" | ||
/> | ||
</IntlProvider> | ||
</AppContext.Provider> | ||
); | ||
} | ||
|
||
export default App; |
Oops, something went wrong.