Skip to content

Commit

Permalink
Fixed layout of script type selection
Browse files Browse the repository at this point in the history
  • Loading branch information
klein0r committed Dec 10, 2023
1 parent 21a1ddd commit d6e8998
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Since v5.5.0 of the JavaScript adapter the following locations (relative to the
### **WORK IN PROGRESS**

* (klein0r) Day of week as number always returns 1 (monday) to 7 (sunday)
* (klein0r) Fixed layout of script type selection

### 7.4.0 (2023-12-08)

Expand Down
17 changes: 9 additions & 8 deletions src/src/Dialogs/AddNewScript.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { I18n } from '@iobroker/adapter-react-v5';
const styles = theme => ({
card: {
maxWidth: 345,
minWidth: 250,
display: 'inline-block',
margin: '0 10px 0 10px',
},
Expand Down Expand Up @@ -73,8 +74,8 @@ class DialogAddNew extends React.Component {
</CardContent>
</CardActionArea>
<CardActions>
<Button size="small" color="primary" onClick={() => this.props.onClose && this.props.onClose('Javascript/js')}>{I18n.t('Add')}</Button>
<Button size="small" color="primary" onClick={() => this.openHtml('https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md')}>{I18n.t('Learn More')}</Button>
<Button size="small" color="primary" variant="contained" onClick={() => this.props.onClose && this.props.onClose('Javascript/js')}>{I18n.t('Add')}</Button>
<Button size="small" color="secondary" onClick={() => this.openHtml('https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md')}>{I18n.t('Learn More')}</Button>
</CardActions>
</Card>;
}
Expand All @@ -94,8 +95,8 @@ class DialogAddNew extends React.Component {
</CardContent>
</CardActionArea>
<CardActions>
<Button size="small" color="primary" onClick={() => this.props.onClose && this.props.onClose('TypeScript/ts')}>{I18n.t('Add')}</Button>
<Button size="small" color="primary" onClick={() => this.openHtml('https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md')}>{I18n.t('Learn More')}</Button>
<Button size="small" color="primary" variant="contained" onClick={() => this.props.onClose && this.props.onClose('TypeScript/ts')}>{I18n.t('Add')}</Button>
<Button size="small" color="secondary" onClick={() => this.openHtml('https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md')}>{I18n.t('Learn More')}</Button>
</CardActions>
</Card>;
}
Expand All @@ -115,8 +116,8 @@ class DialogAddNew extends React.Component {
</CardContent>
</CardActionArea>
<CardActions>
<Button size="small" color="primary" onClick={() => this.props.onClose && this.props.onClose('Blockly')}>{I18n.t('Add')}</Button>
<Button size="small" color="primary" onClick={() => this.openHtml('https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/blockly.md')}>{I18n.t('Learn More')}</Button>
<Button size="small" color="primary" variant="contained" onClick={() => this.props.onClose && this.props.onClose('Blockly')}>{I18n.t('Add')}</Button>
<Button size="small" color="secondary" onClick={() => this.openHtml('https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/blockly.md')}>{I18n.t('Learn More')}</Button>
</CardActions>
</Card>;
}
Expand All @@ -136,8 +137,8 @@ class DialogAddNew extends React.Component {
</CardContent>
</CardActionArea>
<CardActions>
<Button size="small" color="primary" onClick={() => this.props.onClose && this.props.onClose('Rules')}>{I18n.t('Add')}</Button>
<Button size="small" color="primary" onClick={() => this.openHtml('https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md')}>{I18n.t('Learn More')}</Button>
<Button size="small" color="primary" variant="contained" onClick={() => this.props.onClose && this.props.onClose('Rules')}>{I18n.t('Add')}</Button>
<Button size="small" color="secondary" onClick={() => this.openHtml('https://github.com/ioBroker/ioBroker.javascript/blob/master/docs/en/javascript.md')}>{I18n.t('Learn More')}</Button>
</CardActions>
</Card>;
}
Expand Down

0 comments on commit d6e8998

Please sign in to comment.