Merge pull request #2412 from ethereum/homeiconColor

fixed icons' colors for light theme
pull/2449/head
yann300 3 years ago committed by GitHub
commit 677dd0166f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 19
      apps/remix-ide/src/app/panels/tab-proxy.js
  2. 1
      libs/remix-ui/home-tab/src/lib/remix-ui-home-tab.tsx
  3. 2
      libs/remix-ui/tabs/src/lib/remix-ui-tabs.tsx

@ -24,7 +24,7 @@ export class TabProxy extends Plugin {
this.themeQuality = 'dark'
}
onActivation () {
async onActivation () {
this.on('theme', 'themeChanged', (theme) => {
this.themeQuality = theme.quality
// update invert for all icons
@ -169,6 +169,13 @@ export class TabProxy extends Plugin {
this.on('manager', 'pluginDeactivated', (profile) => {
this.removeTab(profile.name)
})
try {
this.themeQuality = (await this.call('theme', 'currentTheme') ).quality
} catch (e) {
console.log('theme plugin has an issue: ', e)
}
this.renderComponent()
}
focus (name) {
@ -292,7 +299,15 @@ export class TabProxy extends Plugin {
}
updateComponent(state) {
return <TabsUI tabs={state.loadedTabs} onSelect={state.onSelect} onClose={state.onClose} onZoomIn={state.onZoomIn} onZoomOut={state.onZoomOut} onReady={state.onReady} themeQuality={state.themeQuality} />
return <TabsUI
tabs={state.loadedTabs}
onSelect={state.onSelect}
onClose={state.onClose}
onZoomIn={state.onZoomIn}
onZoomOut={state.onZoomOut}
onReady={state.onReady}
themeQuality={state.themeQuality}
/>
}
renderComponent () {

@ -4,7 +4,6 @@ import './remix-ui-home-tab.css'
import { ModalDialog } from '@remix-ui/modal-dialog' // eslint-disable-line
import { Toaster } from '@remix-ui/toaster' // eslint-disable-line
import PluginButton from './components/pluginButton' // eslint-disable-line
import { QueryParams } from '@remix-project/remix-lib'
import { ThemeContext, themes } from './themeContext'
declare global {
interface Window {

@ -10,7 +10,7 @@ export interface TabsUIProps {
onZoomOut: () => void
onZoomIn: () => void
onReady: (api: any) => void
themeQuality: "dark"
themeQuality: string
}
export interface TabsUIApi {

Loading…
Cancel
Save