This commit is contained in:
Thomas Nordquist
2019-01-11 19:07:56 +01:00
parent b52b2d7696
commit a8e082f084
3 changed files with 13 additions and 8 deletions

View File

@@ -84,14 +84,14 @@ class Settings extends React.Component<Props, {}> {
} }
private renderAutoExpand() { private renderAutoExpand() {
const { classes, actions, autoExpandLimit } = this.props const { classes, autoExpandLimit } = this.props
return ( return (
<div style={{ padding: '8px' }}> <div style={{ padding: '8px' }}>
<InputLabel htmlFor="auto-expand">Auto Expand</InputLabel> <InputLabel htmlFor="auto-expand">Auto Expand</InputLabel>
<Select <Select
value={autoExpandLimit} value={autoExpandLimit}
onChange={(e: React.ChangeEvent<HTMLSelectElement>) => actions.setAutoExpandLimit(e.target.value)} onChange={this.onChangeAutoExpand}
input={<Input name="auto-expand" id="auto-expand-label-placeholder" />} input={<Input name="auto-expand" id="auto-expand-label-placeholder" />}
displayEmpty={true} displayEmpty={true}
name="auto-expand" name="auto-expand"
@@ -107,6 +107,10 @@ class Settings extends React.Component<Props, {}> {
) )
} }
private onChangeAutoExpand = (e: React.ChangeEvent<HTMLSelectElement>) => {
this.props.actions.setAutoExpandLimit(e.target.value)
}
private renderNodeOrder() { private renderNodeOrder() {
const { classes, nodeOrder } = this.props const { classes, nodeOrder } = this.props

View File

@@ -28,14 +28,14 @@ export interface Message {
payload: any payload: any
} }
export function makeConnectionMessageEvent(connectionId: string): Event<Message> {
return {
topic: `conn/${connectionId}`,
}
}
export function makePublishEvent(connectionId: string): Event<Message> { export function makePublishEvent(connectionId: string): Event<Message> {
return { return {
topic: `conn/publish/${connectionId}`, topic: `conn/publish/${connectionId}`,
} }
} }
export function makeConnectionMessageEvent(connectionId: string): Event<Message> {
return {
topic: `conn/${connectionId}`,
}
}

View File

@@ -16,6 +16,7 @@
}, },
"build": { "build": {
"appId": "mqtt-explorer", "appId": "mqtt-explorer",
"nodeGypRebuild": true,
"mac": { "mac": {
"category": "de.t7n.apps.mq-explorer", "category": "de.t7n.apps.mq-explorer",
"publish": [ "publish": [