Refactor
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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}`,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -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": [
|
||||||
|
|||||||
Reference in New Issue
Block a user