-
Notifications
You must be signed in to change notification settings - Fork 954
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 Remix-Desktop-Scam-Alert-Bug-Fix
- Loading branch information
Showing
68 changed files
with
3,698 additions
and
68 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
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 QuickDapp Plugin |
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,11 @@ | ||
{ | ||
"name": "quick-dapp", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@dnd-kit/core": "^6.1.0", | ||
"@dnd-kit/sortable": "^8.0.0", | ||
"@drafish/surge-client": "^1.1.5" | ||
} | ||
} |
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,70 @@ | ||
{ | ||
"name": "quick-dapp", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "apps/quick-dapp/src", | ||
"projectType": "application", | ||
"implicitDependencies": [], | ||
"targets": { | ||
"build": { | ||
"executor": "@nrwl/webpack:webpack", | ||
"outputs": ["{options.outputPath}"], | ||
"defaultConfiguration": "development", | ||
"dependsOn": ["install"], | ||
"options": { | ||
"compiler": "babel", | ||
"outputPath": "dist/apps/quick-dapp", | ||
"index": "apps/quick-dapp/src/index.html", | ||
"baseHref": "./", | ||
"main": "apps/quick-dapp/src/main.tsx", | ||
"polyfills": "apps/quick-dapp/src/polyfills.ts", | ||
"tsConfig": "apps/quick-dapp/tsconfig.app.json", | ||
"assets": ["apps/quick-dapp/src/profile.json", "apps/quick-dapp/src/assets/edit-dapp.png"], | ||
"styles": ["apps/quick-dapp/src/index.css"], | ||
"scripts": [], | ||
"webpackConfig": "apps/quick-dapp/webpack.config.js" | ||
}, | ||
"configurations": { | ||
"development": { | ||
}, | ||
"production": { | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nrwl/linter:eslint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["apps/quick-dapp/**/*.ts"], | ||
"eslintConfig": "apps/quick-dapp/.eslintrc" | ||
} | ||
}, | ||
"install": { | ||
"executor": "nx:run-commands", | ||
"options": { | ||
"commands": [ | ||
"cd apps/quick-dapp && yarn" | ||
], | ||
"parallel": false | ||
} | ||
}, | ||
"serve": { | ||
"executor": "@nrwl/webpack:dev-server", | ||
"defaultConfiguration": "development", | ||
"options": { | ||
"buildTarget": "quick-dapp:build", | ||
"hmr": true, | ||
"baseHref": "/" | ||
}, | ||
"configurations": { | ||
"development": { | ||
"buildTarget": "quick-dapp:build:development", | ||
"port": 2025 | ||
}, | ||
"production": { | ||
"buildTarget": "quick-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,127 @@ | ||
/* You can add global styles to this file, and also import other style files */ | ||
|
||
.item-wrapper { | ||
transform: translate3d(var(--translate-x, 0), var(--translate-y, 0), 0) | ||
scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)); | ||
transform-origin: 0 0; | ||
touch-action: manipulation; | ||
|
||
&:hover { | ||
.item-remove { | ||
visibility: visible; | ||
} | ||
} | ||
} | ||
|
||
.item-remove { | ||
visibility: hidden; | ||
top: 5px; | ||
right: 5px; | ||
width: 20px; | ||
height: 20px; | ||
background-color: var(--gray-dark); | ||
|
||
.fas { | ||
color: var(--text-bg-mark); | ||
} | ||
} | ||
|
||
.item-action { | ||
touch-action: none; | ||
outline: none !important; | ||
appearance: none; | ||
background-color: transparent; | ||
-webkit-tap-highlight-color: transparent; | ||
|
||
@media (hover: hover) { | ||
&:hover { | ||
background-color: var(--light); | ||
} | ||
} | ||
|
||
.fas { | ||
color: var(--text-bg-mark); | ||
} | ||
} | ||
|
||
.bg-light { | ||
.item-action { | ||
@media (hover: hover) { | ||
&:hover { | ||
background-color: var(--dark); | ||
} | ||
} | ||
} | ||
} | ||
|
||
.container { | ||
flex-direction: column; | ||
|
||
&.placeholder { | ||
justify-content: center; | ||
align-items: center; | ||
cursor: pointer; | ||
} | ||
} | ||
|
||
|
||
.container-header { | ||
&:hover { | ||
.container-actions > * { | ||
opacity: 1 !important; | ||
} | ||
} | ||
} | ||
|
||
.container-actions { | ||
> *:first-child:not(:last-child) { | ||
opacity: 0; | ||
|
||
&:focus-visible { | ||
opacity: 1; | ||
} | ||
} | ||
} | ||
|
||
.instance-input { | ||
background-color: var(--custom-select) !important; | ||
font-size: 10px; | ||
} | ||
.has-args { | ||
border-top-right-radius: 0; | ||
border-bottom-right-radius: 0; | ||
} | ||
|
||
.udapp_intro { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
display: -webkit-box; | ||
white-space: pre-wrap; | ||
-webkit-line-clamp: 2; | ||
-webkit-box-orient: vertical; | ||
} | ||
.udapp_intro:hover { | ||
-webkit-line-clamp: inherit; | ||
} | ||
.cursor_pointer { | ||
cursor: pointer; | ||
} | ||
.cursor_pointer:hover { | ||
color: var(--secondary); | ||
} | ||
.custom-dropdown-items { | ||
padding: 0.25rem 0.25rem; | ||
border-radius: .25rem; | ||
background: var(--custom-select); | ||
} | ||
|
||
.custom-dropdown-items a { | ||
border-radius: .25rem; | ||
text-transform: none; | ||
text-decoration: none; | ||
font-weight: normal; | ||
font-size: 0.875rem; | ||
padding: 0.25rem 0.25rem; | ||
width: auto; | ||
color: var(--text); | ||
} |
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,71 @@ | ||
import React, { useEffect, useReducer, useState } from 'react'; | ||
import { IntlProvider } from 'react-intl' | ||
import CreateInstance from './components/CreateInstance'; | ||
import EditInstance from './components/EditInstance'; | ||
import DeployPanel from './components/DeployPanel'; | ||
import LoadingScreen from './components/LoadingScreen'; | ||
import { appInitialState, appReducer } from './reducers/state'; | ||
import { | ||
connectRemix, | ||
initDispatch, | ||
updateState, | ||
selectTheme, | ||
} from './actions'; | ||
import { AppContext } from './contexts'; | ||
import remixClient from './remix-client'; | ||
import './App.css'; | ||
|
||
function App(): JSX.Element { | ||
const [locale, setLocale] = useState<{code: string; messages: any}>({ | ||
code: 'en', | ||
messages: null, | ||
}) | ||
const [appState, dispatch] = useReducer(appReducer, appInitialState); | ||
useEffect(() => { | ||
updateState(appState); | ||
}, [appState]); | ||
useEffect(() => { | ||
initDispatch(dispatch); | ||
updateState(appState); | ||
connectRemix().then(() => { | ||
remixClient.call('theme', 'currentTheme').then((theme: any) => { | ||
selectTheme(theme.name); | ||
}); | ||
remixClient.on('theme', 'themeChanged', (theme: any) => { | ||
selectTheme(theme.name); | ||
}); | ||
// @ts-ignore | ||
remixClient.call('locale', 'currentLocale').then((locale: any) => { | ||
setLocale(locale) | ||
}) | ||
// @ts-ignore | ||
remixClient.on('locale', 'localeChanged', (locale: any) => { | ||
setLocale(locale) | ||
}) | ||
}); | ||
}, []); | ||
return ( | ||
<AppContext.Provider | ||
value={{ | ||
dispatch, | ||
appState, | ||
}} | ||
> | ||
<IntlProvider locale={locale.code} messages={locale.messages}> | ||
{Object.keys(appState.instance.abi).length > 0 ? ( | ||
<div className="row m-0 pt-3"> | ||
<EditInstance /> | ||
<DeployPanel /> | ||
</div> | ||
) : ( | ||
<div className="row m-0 pt-3"> | ||
<CreateInstance /> | ||
</div> | ||
)} | ||
<LoadingScreen /> | ||
</IntlProvider> | ||
</AppContext.Provider> | ||
); | ||
} | ||
|
||
export default App; |
Oops, something went wrong.