Skip to content

Commit

Permalink
Merge branch 'master' into Remix-Desktop-Scam-Alert-Bug-Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bunsenstraat authored Aug 27, 2024
2 parents 4cbccf5 + b87bfc7 commit 9ef71bd
Show file tree
Hide file tree
Showing 68 changed files with 3,698 additions and 68 deletions.
15 changes: 10 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
xlarge
working_directory: ~/remix-project
steps:
- run: sudo apt update && sudo apt install zstd
- checkout
- restore_cache:
keys:
Expand Down Expand Up @@ -44,8 +45,8 @@ jobs:
key: soljson-v7-{{ checksum "soljson-versions.txt" }}
paths:
- dist/apps/remix-ide/assets/js/soljson
- run: mkdir persist && zip -0 -r persist/dist.zip dist

- run: mkdir persist && tar -cf - dist | zstd -1 -o persist/dist.tar.zst
- persist_to_workspace:
root: .
paths:
Expand Down Expand Up @@ -360,11 +361,13 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: unzip ./persist/dist.zip
- run: sudo apt update && sudo apt install python3-pip -y zstd
- run: zstd -d persist/dist.tar.zst -o persist/dist.tar
- run: tar -xf persist/dist.tar
- run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules || yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules
- run: mkdir node_modules/hardhat && wget https://unpkg.com/hardhat/console.sol -O node_modules/hardhat/console.sol
- run: ls -la ./dist/apps/remix-ide/assets/js
- run: sudo apt update && sudo apt install python3-pip -y

- when:
condition:
equal: [ "chrome", << parameters.browser >> ]
Expand Down Expand Up @@ -416,7 +419,9 @@ jobs:
- checkout
- attach_workspace:
at: .
- run: unzip ./persist/dist.zip
- run: sudo apt update && sudo apt install zstd
- run: zstd -d persist/dist.tar.zst -o persist/dist.tar
- run: tar -xf persist/dist.tar
- run: unzip ./persist/plugin-<< parameters.plugin >>.zip
- run: yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules || yarn install --cwd ./apps/remix-ide-e2e --modules-folder ../../node_modules
- browser-tools/install-browser-tools:
Expand Down
3 changes: 3 additions & 0 deletions apps/quick-dapp/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../.eslintrc.json",
}
1 change: 1 addition & 0 deletions apps/quick-dapp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Remix QuickDapp Plugin
11 changes: 11 additions & 0 deletions apps/quick-dapp/package.json
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"
}
}
70 changes: 70 additions & 0 deletions apps/quick-dapp/project.json
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": []
}
127 changes: 127 additions & 0 deletions apps/quick-dapp/src/App.css
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);
}
71 changes: 71 additions & 0 deletions apps/quick-dapp/src/App.tsx
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;
Loading

0 comments on commit 9ef71bd

Please sign in to comment.