restore some files

pull/5370/head
filip mertens 3 years ago
parent 8be5e0ac32
commit 81d2fdd3f1
  1. 2
      libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
  2. 2
      libs/remix-ui/solidity-compiler/src/lib/compiler-container.tsx
  3. 2
      libs/remix-ui/solidity-compiler/src/lib/logic/compileTabLogic.ts
  4. 6
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -86,7 +86,6 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
const rightPanel = useRef(null) const rightPanel = useRef(null)
useEffect(() => { useEffect(() => {
plugin.call('theme', 'currentTheme').then((theme) => { plugin.call('theme', 'currentTheme').then((theme) => {
// update theme quality. To be used for for images // update theme quality. To be used for for images
setState(prevState => { setState(prevState => {
@ -99,7 +98,6 @@ export const RemixUiHomeTab = (props: RemixUiHomeTabProps) => {
return { ...prevState, themeQuality: theme.quality === 'dark' ? themes.dark : themes.light } return { ...prevState, themeQuality: theme.quality === 'dark' ? themes.dark : themes.light }
}) })
}) })
window.addEventListener('click', (event) => { window.addEventListener('click', (event) => {
const target = event.target as Element const target = event.target as Element
const id = target.id const id = target.id

@ -510,10 +510,8 @@ export const CompilerContainer = (props: CompilerContainerProps) => {
// Workers cannot load js on "file:"-URLs and we get a // Workers cannot load js on "file:"-URLs and we get a
// "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium, // "Uncaught RangeError: Maximum call stack size exceeded" error on Chromium,
// resort to non-worker version in that case. // resort to non-worker version in that case.
console.log('VERSION', selectedVersion)
if (selectedVersion === 'builtin') selectedVersion = state.defaultVersion if (selectedVersion === 'builtin') selectedVersion = state.defaultVersion
if (selectedVersion !== 'builtin' && canUseWorker(selectedVersion)) { if (selectedVersion !== 'builtin' && canUseWorker(selectedVersion)) {
console.log('loading ' + url + ' with worker')
compileTabLogic.compiler.loadVersion(true, url) compileTabLogic.compiler.loadVersion(true, url)
} else { } else {
compileTabLogic.compiler.loadVersion(false, url) compileTabLogic.compiler.loadVersion(false, url)

@ -99,7 +99,7 @@ export class CompileTabLogic {
* Compile a specific file of the file manager * Compile a specific file of the file manager
* @param {string} target the path to the file to compile * @param {string} target the path to the file to compile
*/ */
compileFile (target: string) { compileFile (target) {
if (!target) throw new Error('No target provided for compiliation') if (!target) throw new Error('No target provided for compiliation')
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.api.readFile(target).then((content) => { this.api.readFile(target).then((content) => {

@ -33,12 +33,6 @@ export const TabsUI = (props: TabsUIProps) => {
} }
}, [selectedIndex]) }, [selectedIndex])
useEffect(() => {
console.log(props.themeQuality)
}, [props.themeQuality])
const renderTab = (tab, index) => { const renderTab = (tab, index) => {
const classNameImg = 'my-1 mr-1 text-dark ' + tab.iconClass const classNameImg = 'my-1 mr-1 text-dark ' + tab.iconClass
const classNameTab = 'nav-item nav-link d-flex justify-content-center align-items-center px-2 py-1 tab' + (index === currentIndexRef.current ? ' active' : '') const classNameTab = 'nav-item nav-link d-flex justify-content-center align-items-center px-2 py-1 tab' + (index === currentIndexRef.current ? ' active' : '')

Loading…
Cancel
Save