Merge branch 'master' into multiselect-dragdrop

pull/5370/head
Joseph Izang 7 months ago committed by GitHub
commit 8f0a6abad1
  1. 17
      apps/circuit-compiler/src/app/services/circomPluginClient.ts
  2. 1
      apps/remix-ide/src/app/plugins/git.tsx
  3. 1
      apps/remix-ide/src/app/tabs/locales/en/terminal.json
  4. 1
      apps/remix-ide/src/app/tabs/locales/es/terminal.json
  5. 3
      apps/remix-ide/src/app/tabs/locales/fr/terminal.json
  6. 1
      apps/remix-ide/src/app/tabs/locales/it/terminal.json
  7. 1
      apps/remix-ide/src/app/tabs/locales/ko/terminal.json
  8. 1
      apps/remix-ide/src/app/tabs/locales/ru/terminal.json
  9. 1
      apps/remix-ide/src/app/tabs/locales/zh/terminal.json
  10. 2
      libs/remix-lib/package.json
  11. 2
      libs/remix-simulator/src/methods/accounts.ts
  12. 2
      libs/remix-ui/app/src/lib/remix-app/remix-app.tsx
  13. 1
      libs/remix-ui/app/src/lib/remix-app/style/remix-app.css
  14. 2
      libs/remix-ui/home-tab/src/lib/components/homeTabFile.tsx
  15. 4
      libs/remix-ui/home-tab/src/lib/components/homeTabGetStarted.tsx
  16. 6
      libs/remix-ui/modal-dialog/src/lib/remix-ui-modal-dialog.css
  17. 13
      libs/remix-ui/terminal/src/lib/components/Table.tsx
  18. 2
      libs/remix-ui/workspace/src/lib/components/workspace-hamburger.tsx

@ -10,8 +10,6 @@ import * as compilerV215 from 'circom_wasm/v2.1.5'
import { extractNameFromKey, extractParentFromKey } from '@remix-ui/helper'
import { CompilationConfig, CompilerReport, PrimeValue, ResolverOutput } from '../types'
// @ts-ignore
const _paq = (window._paq = window._paq || [])
export class CircomPluginClient extends PluginClient {
public internalEvents: EventManager
private _compilationConfig: CompilationConfig = {
@ -22,6 +20,11 @@ export class CircomPluginClient extends PluginClient {
private lastParsedFiles: Record<string, string> = {}
private lastCompiledFile: string = ''
private compiler: typeof compilerV215 & typeof compilerV216 & typeof compilerV217 & typeof compilerV218
private _paq = {
push: (args) => {
this.call('matomo' as any, 'track', args)
}
}
constructor() {
super()
@ -164,7 +167,7 @@ export class CircomPluginClient extends PluginClient {
const circuitErrors = circuitApi.report()
this.logCompilerReport(circuitErrors)
_paq.push(['trackEvent', 'circuit-compiler', 'compile', 'Compilation failed'])
this._paq.push(['trackEvent', 'circuit-compiler', 'compile', 'Compilation failed'])
throw new Error(circuitErrors)
} else {
this.lastCompiledFile = path
@ -184,7 +187,7 @@ export class CircomPluginClient extends PluginClient {
} else {
this.internalEvents.emit('circuit_compiling_done', [])
}
_paq.push(['trackEvent', 'circuit-compiler', 'compile', 'Compilation successful'])
this._paq.push(['trackEvent', 'circuit-compiler', 'compile', 'Compilation successful'])
circuitApi.log().map(log => {
log && this.call('terminal', 'log', { type: 'log', value: log })
})
@ -226,7 +229,7 @@ export class CircomPluginClient extends PluginClient {
const r1csErrors = r1csApi.report()
this.logCompilerReport(r1csErrors)
_paq.push(['trackEvent', 'circuit-compiler', 'generateR1cs', 'R1CS Generation failed'])
this._paq.push(['trackEvent', 'circuit-compiler', 'generateR1cs', 'R1CS Generation failed'])
throw new Error(r1csErrors)
} else {
this.internalEvents.emit('circuit_generating_r1cs_done')
@ -235,7 +238,7 @@ export class CircomPluginClient extends PluginClient {
// @ts-ignore
await this.call('fileManager', 'writeFile', writePath, r1csProgram, true)
_paq.push(['trackEvent', 'circuit-compiler', 'generateR1cs', 'R1CS Generation successful'])
this._paq.push(['trackEvent', 'circuit-compiler', 'generateR1cs', 'R1CS Generation successful'])
r1csApi.log().map(log => {
log && this.call('terminal', 'log', { type: 'log', value: log })
})
@ -256,7 +259,7 @@ export class CircomPluginClient extends PluginClient {
const witness = this.compiler ? await this.compiler.generate_witness(dataRead, input) : await generate_witness(dataRead, input)
// @ts-ignore
await this.call('fileManager', 'writeFile', wasmPath.replace('.wasm', '.wtn'), witness, true)
_paq.push(['trackEvent', 'circuit-compiler', 'computeWitness', 'Witness computing successful'])
this._paq.push(['trackEvent', 'circuit-compiler', 'computeWitness', 'Witness computing successful'])
this.internalEvents.emit('circuit_computing_witness_done')
this.emit('statusChanged', { key: 'succeed', title: 'witness computed successfully', type: 'success' })
}

@ -6,6 +6,7 @@ import * as packageJson from '../../../../../package.json'
const profile = {
name: 'dgit',
displayName: 'Git',
desciption: 'Git plugin for Remix',
methods: ['pull', 'track', 'diff', 'clone', 'open'],
events: [''],

@ -40,5 +40,6 @@
"terminal.input": "input",
"terminal.decodedInput": "decoded input",
"terminal.decodedOutput": "decoded output",
"terminal.rawlogs": "raw logs",
"terminal.logs": "logs"
}

@ -39,5 +39,6 @@
"terminal.input": "entrada",
"terminal.decodedInput": "entrada descodificada",
"terminal.decodedOutput": "salida descodificada",
"terminal.rawlogs": "registros sin procesar",
"terminal.logs": "registros"
}

@ -39,5 +39,6 @@
"terminal.input": "entrée",
"terminal.decodedInput": "entrée décodée",
"terminal.decodedOutput": "sortie décodée",
"terminal.logs": "logs"
"terminal.rawlogs": "logs bruts",
"terminal.logs": "Log"
}

@ -39,5 +39,6 @@
"terminal.input": "input",
"terminal.decodedInput": "input decodificato",
"terminal.decodedOutput": "output decodificato",
"terminal.rawlogs": "log grezzi",
"terminal.logs": "Log"
}

@ -39,5 +39,6 @@
"terminal.input": "입력",
"terminal.decodedInput": "디코드된 입력",
"terminal.decodedOutput": "디코드된 출력",
"terminal.rawlogs": "원시 로그",
"terminal.logs": "로그"
}

@ -39,5 +39,6 @@
"terminal.input": "ввод",
"terminal.decodedInput": "декодированный ввод",
"terminal.decodedOutput": "декодированный вывод",
"terminal.rawlogs": "необработанные журналы",
"terminal.logs": "журналы"
}

@ -39,5 +39,6 @@
"terminal.input": "输入",
"terminal.decodedInput": "解码输入",
"terminal.decodedOutput": "解码输出",
"terminal.rawlogs": "原始日志",
"terminal.logs": "日志"
}

@ -57,4 +57,4 @@
"typings": "src/index.d.ts",
"gitHead": "35e1469e94bb370f5427d4ab230fcbd47c665e55",
"types": "./src/index.d.ts"
}
}

@ -44,7 +44,7 @@ export class Web3Accounts {
async _addAccount (privateKey, balance) {
try {
privateKey = toBytes('0x' + privateKey)
if (typeof privateKey === 'string') privateKey = toBytes('0x' + privateKey)
const address: Uint8Array = privateToAddress(privateKey)
const addressStr = toChecksumAddress(bytesToHex(address))
this.accounts[addressStr] = { privateKey, nonce: 0 }

@ -194,7 +194,7 @@ const RemixApp = (props: IRemixAppUi) => {
<DragBar
resetTrigger={resetLeftTrigger}
maximiseTrigger={maximiseLeftTrigger}
minWidth={285}
minWidth={305}
refObject={sidePanelRef}
hidden={hideSidePanel}
setHideStatus={setHideSidePanel}

@ -43,6 +43,7 @@ pre {
.pinnedpanel {
width : 320px;
transition : width 0.25s;
padding-bottom : 1.4rem;
}
.highlightcode {
position : absolute;

@ -209,7 +209,7 @@ function HomeTabFile({ plugin }: HomeTabFileProps) {
await plugin.call('filePanel', 'clone')
}}>
<i className="fa-brands fa-github-alt pl-1 pr-2"></i>
Git Clone
Clone
</button>
</CustomTooltip>
<CustomTooltip placement={'top'} tooltipId="overlay-tooltip" tooltipClasses="text-nowrap" tooltipText={<FormattedMessage id="home.connectToLocalhost" />} tooltipTextClasses="border bg-light text-dark p-1 pr-3">

@ -157,12 +157,12 @@ function HomeTabGetStarted({ plugin }: HomeTabGetStartedProps) {
<div ref={carouselRefDiv} className="w-100 d-flex flex-column pt-1">
<ThemeContext.Provider value={themeFilter}>
<div className="pt-3">
<div className="d-flex flex-row align-items-center mb-3 flex-wrap">
<div className="d-flex flex-row align-items-center flex-wrap">
{workspaceTemplates.map((template, index) => (
<CustomTooltip tooltipText={template.description} tooltipId={template.gsID} tooltipClasses="text-nowrap" tooltipTextClasses="border bg-light text-dark p-1 pr-3" placement="top-start" key={`${template.gsID}-${template.workspaceTitle}-${index}`}>
<button
key={index}
className={index === 0 ? 'btn btn-primary border p-2 text-nowrap mr-3 mb-3' : index === workspaceTemplates.length - 1 ? 'btn border p-2 text-nowrap mr-2 mb-3' : 'btn border p-2 text-nowrap mr-3 mb-3'}
className={index === 0 ? 'btn btn-primary border p-2 text-nowrap mr-3 mb-2' : index === workspaceTemplates.length - 1 ? 'btn border p-2 text-nowrap mr-2 mb-2' : 'btn border p-2 text-nowrap mr-3 mb-3'}
onClick={(e) => {
createWorkspace(template.templateName)
}}

@ -10,6 +10,12 @@
max-height: 600px;
white-space: pre-line;
}
.modal-ok {
min-width: 4rem;
}
.modal-cancel {
min-width: 4rem;
}
@-webkit-keyframes animatetop {
from {top: -300px; opacity: 0}
to {top: 0; opacity: 1}

@ -188,7 +188,18 @@ const showTable = (opts, showTableHash) => {
<td className="remix_ui_terminal_td" data-id={`txLoggerTableHash${opts.hash}`} data-shared={`pair_${opts.hash}`}>
{JSON.stringify(stringified, null, '\t')}
<CopyToClipboard content={JSON.stringify(stringified, null, '\t')} />
<CopyToClipboard content={JSON.stringify(opts.logs.raw || '0')} />
<CopyToClipboard content={JSON.stringify(opts.logs.raw || '0', null, 2)} />
</td>
</tr>
) : null}
{opts.logs ? (
<tr className="remix_ui_terminal_tr">
<td className="remix_ui_terminal_td" data-shared={`key_${opts.hash}`}>
<FormattedMessage id="terminal.rawlogs" />
</td>
<td className="remix_ui_terminal_td" data-id={`txLoggerTableHash${opts.hash}`} data-shared={`pair_${opts.hash}`}>
<pre>{JSON.stringify(opts.logs.raw || '0', null, 2)}</pre>
<CopyToClipboard content={JSON.stringify(opts.logs.raw || '0', null, 2)} />
</td>
</tr>
) : null}

@ -52,7 +52,7 @@ export function HamburgerMenu(props: HamburgerMenuProps) {
></HamburgerMenuItem>
<HamburgerMenuItem
kind="clone"
fa="fab fa-github"
fa="fa-brands fa-github-alt"
hideOption={hideWorkspaceOptions}
actionOnClick={() => {
props.cloneGitRepository()

Loading…
Cancel
Save