@electerm/electerm-react 1.80.2 → 1.80.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,10 +52,10 @@ export default class CssOverwrite extends Component {
52
52
 
53
53
  componentDidUpdate (prevProps) {
54
54
  if (!prevProps.wsInited && this.props.wsInited) {
55
- this.writeCss()
55
+ setTimeout(this.writeCss, 1500)
56
56
  return
57
57
  }
58
- this.updateCss()
58
+ setTimeout(this.updateCss, 1000)
59
59
  }
60
60
 
61
61
  // Common function to handle background image style creation
@@ -587,30 +587,32 @@ export default class SettingCommon extends Component {
587
587
  value={theme}
588
588
  >
589
589
  {
590
- terminalThemes.map(l => {
591
- const { id, name, uiThemeConfig } = l
592
- const { main, text } = uiThemeConfig
593
- const isDark = isColorDark(main)
594
- const txt = isDark ? <MoonOutlined /> : <SunOutlined />
595
- const tag = (
596
- <Tag
597
- color={main}
598
- className='mg1l'
599
- style={
600
- {
601
- color: text
590
+ terminalThemes
591
+ .filter(d => d.id && d.name && d.uiThemeConfig)
592
+ .map(l => {
593
+ const { id, name, uiThemeConfig } = l
594
+ const { main, text } = uiThemeConfig
595
+ const isDark = isColorDark(main)
596
+ const txt = isDark ? <MoonOutlined /> : <SunOutlined />
597
+ const tag = (
598
+ <Tag
599
+ color={main}
600
+ className='mg1l'
601
+ style={
602
+ {
603
+ color: text
604
+ }
602
605
  }
603
- }
604
- >
605
- {txt}
606
- </Tag>
607
- )
608
- return (
609
- <Option key={id} value={id}>
610
- {tag} {name}
611
- </Option>
612
- )
613
- })
606
+ >
607
+ {txt}
608
+ </Tag>
609
+ )
610
+ return (
611
+ <Option key={id} value={id}>
612
+ {tag} {name}
613
+ </Option>
614
+ )
615
+ })
614
616
  }
615
617
  </Select>
616
618
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.80.2",
3
+ "version": "1.80.5",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",