-
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 completion_enabled_default
- Loading branch information
Showing
45 changed files
with
1,013 additions
and
172 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ parameters: | |
orbs: | ||
browser-tools: circleci/[email protected] | ||
win: circleci/[email protected] | ||
node: circleci/[email protected] | ||
jobs: | ||
build: | ||
docker: | ||
|
@@ -107,23 +108,25 @@ jobs: | |
|
||
test-remixdesktop-linux: | ||
machine: | ||
image: ubuntu-2004:current | ||
image: ubuntu-2204:current | ||
resource_class: | ||
xlarge | ||
working_directory: ~/remix-project | ||
parallelism: 15 | ||
steps: | ||
- run: ldd --version | ||
|
||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- run: unzip ./persist/desktopbuild.zip | ||
- node/install: | ||
install-yarn: true | ||
node-version: '20.2' | ||
- run: | ||
command: | | ||
nvm install 20.2 | ||
nvm use 20.2 | ||
node -v | ||
npm install --global yarn node-gyp | ||
yarn global add node-gyp@10.2.0 | ||
python -m pip install --upgrade pip | ||
pip install setuptools | ||
mkdir apps/remixdesktop/build | ||
|
@@ -136,13 +139,11 @@ jobs: | |
- run: | ||
name: "Run tests" | ||
command: | | ||
nvm use 20.2 | ||
cd apps/remixdesktop/ | ||
./run_ci_test.sh | ||
- run: | ||
name: "Run isogit tests" | ||
command: | | ||
nvm use 20.2 | ||
cd apps/remixdesktop/ | ||
./run_git_ui_isogit_tests.sh | ||
- store_test_results: | ||
|
@@ -521,6 +522,7 @@ jobs: | |
ls -la dist/apps/remix-ide | ||
nvm install 20.2 | ||
nvm use 20.2 | ||
/usr/sbin/softwareupdate --install-rosetta --agree-to-license | ||
- restore_cache: | ||
keys: | ||
- remixdesktop-deps-mac-{{ checksum "apps/remixdesktop/yarn.lock" }} | ||
|
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
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 |
---|---|---|
@@ -1,26 +1,96 @@ | ||
import { RenderIf } from "@remix-ui/helper"; | ||
import { AppState } from "../types"; | ||
import { AppState } from "../types" | ||
import { Dropdown } from "react-bootstrap" | ||
import React, { Ref } from "react" | ||
import isElectron from 'is-electron' | ||
|
||
export function VersionList ({ currentVersion, versionList, setVersion }: { versionList: AppState['versionList'], currentVersion: string, setVersion: (version: string) => void }) { | ||
export function VersionList ({ currentVersion, versionList, downloadList, setVersion }: { versionList: AppState['versionList'], currentVersion: string, setVersion: (version: string) => void , downloadList: string[]}) { | ||
const versionListKeys = Object.keys(versionList) | ||
|
||
return ( | ||
<select | ||
value={currentVersion} | ||
onChange={(e) => setVersion(e.target.value)} | ||
className="custom-select" | ||
> | ||
<RenderIf condition={versionListKeys.length > 0}> | ||
<> | ||
{ | ||
versionListKeys.map((version, index) => ( | ||
<option value={version} key={index}> | ||
{ versionList[version].name } | ||
</option> | ||
)) | ||
} | ||
</> | ||
</RenderIf> | ||
</select> | ||
<Dropdown> | ||
<Dropdown.Toggle as={CircomVersionMenuToggle} id="circomVersionList" className="btn btn-light btn-block w-100 d-inline-block border border-dark form-control"> | ||
<div style={{ flexGrow: 1, overflow: 'hidden', display:'flex', justifyContent:'left' }}> | ||
{ versionList[currentVersion].name } | ||
</div> | ||
</Dropdown.Toggle> | ||
|
||
<Dropdown.Menu as={CircomVersionMenu} className="w-100 custom-dropdown-items overflow-hidden"> | ||
{ | ||
versionListKeys.reverse().map((version, index) => ( | ||
<Dropdown.Item key={index} onClick={() => { | ||
setVersion(version) | ||
}}> | ||
<div className='d-flex w-100 justify-content-between'> | ||
<div> | ||
<span className={`fas fa-check text-success mr-2 ${currentVersion === version ? 'visible' : 'invisible'}`}></span> | ||
<span> | ||
{ isElectron() ? versionList[version].name.replace('wasm', '') : versionList[version].name } | ||
</span> | ||
</div> | ||
{ isElectron() ? downloadList.includes(version) ? <div className='far fa-arrow-circle-down'></div> : <div className='fas fa-arrow-circle-down text-success ml-auto'></div> : null } | ||
</div> | ||
</Dropdown.Item> | ||
)) | ||
} | ||
</Dropdown.Menu> | ||
</Dropdown> | ||
) | ||
} | ||
|
||
const CircomVersionMenuToggle = React.forwardRef( | ||
( | ||
{ | ||
children, | ||
onClick, | ||
className = '' | ||
}: { | ||
children: React.ReactNode | ||
onClick: (e) => void | ||
className: string | ||
}, | ||
ref: Ref<HTMLButtonElement> | ||
) => ( | ||
<button | ||
ref={ref} | ||
onClick={(e) => { | ||
e.preventDefault() | ||
onClick(e) | ||
}} | ||
className={className.replace('dropdown-toggle', '')} | ||
> | ||
<div className="d-flex"> | ||
{children} | ||
<div> | ||
<i className="fad fa-sort-circle"></i> | ||
</div> | ||
</div> | ||
</button> | ||
) | ||
) | ||
|
||
const CircomVersionMenu = React.forwardRef( | ||
( | ||
{ | ||
children, | ||
style, | ||
'data-id': dataId, | ||
className, | ||
'aria-labelledby': labeledBy | ||
}: { | ||
'children': React.ReactNode | ||
'style'?: React.CSSProperties | ||
'data-id'?: string | ||
'className': string | ||
'aria-labelledby'?: string | ||
}, | ||
ref: Ref<HTMLDivElement> | ||
) => { | ||
const height = window.innerHeight * 0.6 | ||
return ( | ||
<div ref={ref} style={style} className={className} aria-labelledby={labeledBy} data-id={dataId}> | ||
<ul className="list-unstyled mb-0" style={{ maxHeight: height + 'px',overflowY:'auto' }}> | ||
{children} | ||
</ul> | ||
</div> | ||
) | ||
} | ||
) |
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
Oops, something went wrong.