From f25262c191ac1de07d908d74d6d289948032fcb5 Mon Sep 17 00:00:00 2001 From: pswid <78219494+pswid@users.noreply.github.com> Date: Mon, 7 Nov 2022 10:41:57 +0100 Subject: [PATCH 1/2] fix: cosmetic webUI improvements mainly in custom board profile and analog sensors settings. Now it looks more consistent with other settings pages. --- .../src/framework/mqtt/MqttSettingsForm.tsx | 4 +- interface/src/project/DashboardData.tsx | 59 ++++++++++--------- interface/src/project/SettingsApplication.tsx | 52 ++++++++-------- 3 files changed, 61 insertions(+), 54 deletions(-) diff --git a/interface/src/framework/mqtt/MqttSettingsForm.tsx b/interface/src/framework/mqtt/MqttSettingsForm.tsx index 8de9f71fc..b013bf276 100644 --- a/interface/src/framework/mqtt/MqttSettingsForm.tsx +++ b/interface/src/framework/mqtt/MqttSettingsForm.tsx @@ -219,7 +219,7 @@ const MqttSettingsForm: FC = () => { /> {data.ha_enabled && ( - + { variant="outlined" value={data.discovery_prefix} onChange={updateFormValue} - margin="normal" + size="small" /> )} diff --git a/interface/src/project/DashboardData.tsx b/interface/src/project/DashboardData.tsx index 4f4e00c6f..7fcf237df 100644 --- a/interface/src/project/DashboardData.tsx +++ b/interface/src/project/DashboardData.tsx @@ -172,7 +172,7 @@ const DashboardData: FC = () => { common_theme, { Table: ` - --data-table-library_grid-template-columns: repeat(1, minmax(0, 1fr)) 140px 40px; + --data-table-library_grid-template-columns: repeat(1, minmax(0, 1fr)) minmax(140px, max-content) 40px; `, BaseRow: ` .td { @@ -1038,32 +1038,34 @@ const DashboardData: FC = () => { - + - + - + @@ -1076,11 +1078,12 @@ const DashboardData: FC = () => { {analog.t >= AnalogType.COUNTER && analog.t <= AnalogType.RATE && ( <> - + @@ -1092,12 +1095,12 @@ const DashboardData: FC = () => { {analog.t === AnalogType.ADC && ( - + { )} {analog.t === AnalogType.COUNTER && ( - + { /> )} - + { )} {analog.t === AnalogType.DIGITAL_OUT && (analog.id === '25' || analog.id === '26') && ( <> - + { )} {analog.t === AnalogType.DIGITAL_OUT && analog.id !== '25' && analog.id !== '26' && ( <> - + { )} {analog.t >= AnalogType.PWM_0 && ( <> - + { }} /> - + { label={LL.BOARD_PROFILE()} value={data.board_profile} disabled={processingBoard} + fullWidth variant="outlined" onChange={changeBoardProfile} margin="normal" @@ -183,7 +184,7 @@ const SettingsApplication: FC = () => { disabled={saving} /> - + { disabled={saving} /> - + { disabled={saving} /> - - - - {LL.DISABLED(1)} - LAN8720 - TLK110 - + + + {LL.DISABLED(1)} + LAN8720 + TLK110 + + {data.phy_type !== 0 && ( - + { disabled={saving} /> - + { disabled={saving} /> - + { )} )} - + {LL.SETTINGS_OF(LL.EMS_BUS(0))} @@ -404,7 +405,7 @@ const SettingsApplication: FC = () => { /> {data.shower_alert && ( <> - + { value={data.shower_alert_trigger} type="number" onChange={updateFormValue} + size="small" disabled={!data.shower_timer} /> +    { value={data.shower_alert_coldshot} type="number" onChange={updateFormValue} + size="small" disabled={!data.shower_timer} /> From dfd7647838072731ec73ed392a0142924a878a11 Mon Sep 17 00:00:00 2001 From: pswid <78219494+pswid@users.noreply.github.com> Date: Sun, 13 Nov 2022 13:46:52 +0100 Subject: [PATCH 2/2] improved webUI display on narrow screens - unified vertical spacing (settings page) - auto switching from 3 to 2 boxes displayed in row on narrow screens - displaying (at least a part off) names of entities names on dashboard - fixes MQTT discovery field too small --- .../src/framework/mqtt/MqttSettingsForm.tsx | 17 ++++----- interface/src/project/DashboardData.tsx | 2 +- interface/src/project/SettingsApplication.tsx | 36 +++++++++---------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/interface/src/framework/mqtt/MqttSettingsForm.tsx b/interface/src/framework/mqtt/MqttSettingsForm.tsx index b013bf276..88b8b2c62 100644 --- a/interface/src/framework/mqtt/MqttSettingsForm.tsx +++ b/interface/src/framework/mqtt/MqttSettingsForm.tsx @@ -214,12 +214,13 @@ const MqttSettingsForm: FC = () => { } label={LL.MQTT_PUBLISH_TEXT_3()} /> {data.ha_enabled && ( - + { )} )} - + {LL.MQTT_PUBLISH_INTERVALS()} (0=auto) - + { margin="normal" /> - + { margin="normal" /> - + { margin="normal" /> - + { margin="normal" /> - + { margin="normal" /> - + { common_theme, { Table: ` - --data-table-library_grid-template-columns: repeat(1, minmax(0, 1fr)) minmax(140px, max-content) 40px; + --data-table-library_grid-template-columns: minmax(0, 1fr) 35% 40px; `, BaseRow: ` .td { diff --git a/interface/src/project/SettingsApplication.tsx b/interface/src/project/SettingsApplication.tsx index ab906a814..a181130f8 100644 --- a/interface/src/project/SettingsApplication.tsx +++ b/interface/src/project/SettingsApplication.tsx @@ -141,8 +141,8 @@ const SettingsApplication: FC = () => { {data.board_profile === 'CUSTOM' && ( <> - - + + { disabled={saving} /> - + { disabled={saving} /> - + { disabled={saving} /> - + { disabled={saving} /> - + { disabled={saving} /> - + { {data.phy_type !== 0 && ( - - + + { disabled={saving} /> - + { disabled={saving} /> - + { disabled={saving} /> } label={LL.ENABLE_SHOWER_ALERT()} disabled={!data.shower_timer} /> {data.shower_alert && ( <> - + { disabled={!data.shower_timer} /> -    - + { )} - + {LL.FORMATTING_OPTIONS()} - + { 1/0 - + { 1/0 - +