mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
Merge branch 'dev' of https://github.com/emsesp/EMS-ESP32 into dev
This commit is contained in:
@@ -57,7 +57,7 @@ const MqttSettingsForm: FC = () => {
|
||||
label={LL.ENABLE_MQTT()}
|
||||
/>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="host"
|
||||
@@ -69,7 +69,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="port"
|
||||
@@ -82,9 +82,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="base"
|
||||
@@ -96,7 +94,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
name="client_id"
|
||||
label={LL.ID_OF(LL.CLIENT()) + ' (' + LL.OPTIONAL() + ')'}
|
||||
@@ -107,9 +105,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
name="username"
|
||||
label={LL.USERNAME(0)}
|
||||
@@ -120,7 +116,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedPasswordField
|
||||
name="password"
|
||||
label={LL.PASSWORD()}
|
||||
@@ -131,9 +127,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="keep_alive"
|
||||
@@ -149,7 +143,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
name="mqtt_qos"
|
||||
label="QoS"
|
||||
@@ -196,7 +190,7 @@ const MqttSettingsForm: FC = () => {
|
||||
label={LL.MQTT_RESPONSE()}
|
||||
/>
|
||||
{!data.ha_enabled && (
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid container rowSpacing={-1} spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox name="publish_single" checked={data.publish_single} onChange={updateFormValue} />}
|
||||
@@ -219,58 +213,55 @@ const MqttSettingsForm: FC = () => {
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item>
|
||||
<BlockFormControlLabel
|
||||
sx={{ pb: 1 }}
|
||||
control={<Checkbox name="ha_enabled" checked={data.ha_enabled} onChange={updateFormValue} />}
|
||||
label={LL.MQTT_PUBLISH_TEXT_3()}
|
||||
/>
|
||||
</Grid>
|
||||
{data.ha_enabled && (
|
||||
<>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="discovery_type"
|
||||
label={LL.MQTT_PUBLISH_TEXT_5()}
|
||||
value={data.discovery_type}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
onChange={updateFormValue}
|
||||
margin="normal"
|
||||
select
|
||||
>
|
||||
<MenuItem value={0}>Home Assistant</MenuItem>
|
||||
<MenuItem value={1}>Domoticz</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="discovery_prefix"
|
||||
label={LL.MQTT_PUBLISH_TEXT_4()}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
value={data.discovery_prefix}
|
||||
onChange={updateFormValue}
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="entity_format"
|
||||
label={LL.MQTT_ENTITY_FORMAT()}
|
||||
value={data.entity_format}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
onChange={updateFormValue}
|
||||
margin="normal"
|
||||
select
|
||||
>
|
||||
<MenuItem value={0}>{LL.MQTT_ENTITY_FORMAT_0()}</MenuItem>
|
||||
<MenuItem value={1}>{LL.MQTT_ENTITY_FORMAT_1()}</MenuItem>
|
||||
<MenuItem value={2}>{LL.MQTT_ENTITY_FORMAT_2()}</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
<Grid container sx={{ pl: 1 }} spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="discovery_type"
|
||||
label={LL.MQTT_PUBLISH_TEXT_5()}
|
||||
value={data.discovery_type}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
onChange={updateFormValue}
|
||||
margin="normal"
|
||||
select
|
||||
>
|
||||
<MenuItem value={0}>Home Assistant</MenuItem>
|
||||
<MenuItem value={1}>Domoticz</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
</>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="discovery_prefix"
|
||||
label={LL.MQTT_PUBLISH_TEXT_4()}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
value={data.discovery_prefix}
|
||||
onChange={updateFormValue}
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="entity_format"
|
||||
label={LL.MQTT_ENTITY_FORMAT()}
|
||||
value={data.entity_format}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
onChange={updateFormValue}
|
||||
margin="normal"
|
||||
select
|
||||
>
|
||||
<MenuItem value={0}>{LL.MQTT_ENTITY_FORMAT_0()}</MenuItem>
|
||||
<MenuItem value={1}>{LL.MQTT_ENTITY_FORMAT_1()}</MenuItem>
|
||||
<MenuItem value={2}>{LL.MQTT_ENTITY_FORMAT_2()}</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
</Grid>
|
||||
)}
|
||||
</Grid>
|
||||
)}
|
||||
@@ -278,7 +269,7 @@ const MqttSettingsForm: FC = () => {
|
||||
{LL.MQTT_PUBLISH_INTERVALS()} (0=auto)
|
||||
</Typography>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="publish_time_heartbeat"
|
||||
@@ -294,7 +285,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="publish_time_boiler"
|
||||
@@ -310,7 +301,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="publish_time_thermostat"
|
||||
@@ -326,7 +317,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="publish_time_solar"
|
||||
@@ -342,7 +333,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="publish_time_mixer"
|
||||
@@ -358,7 +349,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="publish_time_sensor"
|
||||
@@ -374,7 +365,7 @@ const MqttSettingsForm: FC = () => {
|
||||
margin="normal"
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="publish_time_other"
|
||||
|
||||
@@ -16,11 +16,11 @@ const no: Translation = {
|
||||
SETTINGS_OF: '{0} Innstillinger',
|
||||
HELP_OF: '{0} Hjelp',
|
||||
LOGGED_IN: 'Logget in som {name}',
|
||||
PLEASE_SIGNIN: 'Venligst logge inn for å fortsette',
|
||||
PLEASE_SIGNIN: 'Venligst logge inn for å fortsetta',
|
||||
UPLOAD_SUCCESSFUL: 'Opplasting lykkes',
|
||||
DOWNLOAD_SUCCESSFUL: 'Nedlasting lykkes',
|
||||
INVALID_LOGIN: 'Ugyldig innlogging',
|
||||
NETWORK: 'Nettverk1',
|
||||
NETWORK: 'Nettverk',
|
||||
SECURITY: 'Sikkerhet',
|
||||
ONOFF_CAP: 'PÅ/AV',
|
||||
ONOFF: 'på/av',
|
||||
@@ -46,7 +46,7 @@ const no: Translation = {
|
||||
CANCEL: 'Avbryt',
|
||||
RESET: 'Nullstill',
|
||||
SEND: 'Send',
|
||||
APPLY_CHANGES: 'Bruk endringer ({0})',
|
||||
APPLY_CHANGES: 'Utfør endringer({0})',
|
||||
UPDATE: 'Oppdater',
|
||||
REMOVE: 'Fjern',
|
||||
PROBLEM_UPDATING: 'Problem med oppdatering',
|
||||
@@ -70,13 +70,13 @@ const no: Translation = {
|
||||
TEMP_SENSOR: 'Temperatursensor',
|
||||
TEMP_SENSORS: 'Temperaturesensorer',
|
||||
WRITE_CMD_SENT: 'Skriv kommando sent',
|
||||
WRITE_CMD_FAILED: 'Skriv kommando failed',
|
||||
EMS_BUS_WARNING: 'EMS bussen koblet ned. Hvis denne advarselen fortsetter etter noen få sekunder sjekk instillinger og prosessorkort',
|
||||
WRITE_CMD_FAILED: 'Skriv kommando som har feilet',
|
||||
EMS_BUS_WARNING: 'EMS bussen koblet ned. Hvis denne advarselen fortsetter etter noen f¨sekunder sjekk instillinger og prosessorkort',
|
||||
EMS_BUS_SCANNING: 'Søker etter EMS enheter...',
|
||||
CONNECTED: 'Tilkoblet',
|
||||
TX_ISSUES: 'Tx problemer - prøv en annen Tx Modus',
|
||||
DISCONNECTED: 'Frakoblet',
|
||||
EMS_SCAN: 'Er du sikker på du vil starte full søking av EMS bussen ?',
|
||||
EMS_SCAN: 'Er du sikker på du vil starte full søking av EMS bussen?',
|
||||
EMS_BUS_STATUS: 'EMS Buss Status',
|
||||
ACTIVE_DEVICES: 'Aktive Enheter og Sensorer',
|
||||
EMS_DEVICE: 'EMS Enhet',
|
||||
@@ -99,7 +99,7 @@ const no: Translation = {
|
||||
NUM_DEVICES: '{num} Enhet{{er}}',
|
||||
NUM_TEMP_SENSORS: '{num} Temperatursensor{{er}}',
|
||||
NUM_ANALOG_SENSORS: '{num} Analogsensor{{er}}',
|
||||
NUM_DAYS: '{num} sag{{er}}',
|
||||
NUM_DAYS: '{num} Dag{{er}}',
|
||||
NUM_SECONDS: '{num} Sekund{{er}}',
|
||||
NUM_HOURS: '{num} Time{{r}}',
|
||||
NUM_MINUTES: '{num} Minutt{{er}}',
|
||||
@@ -157,7 +157,7 @@ const no: Translation = {
|
||||
CUSTOMIZATIONS_HELP_3: 'inaktiviser skriving',
|
||||
CUSTOMIZATIONS_HELP_4: 'ekskludere fra MQTT og API',
|
||||
CUSTOMIZATIONS_HELP_5: 'gjemme fra Dashboard',
|
||||
CUSTOMIZATIONS_HELP_6: 'fjern fra minne',
|
||||
CUSTOMIZATIONS_HELP_6: 'fjern fra minnet',
|
||||
SELECT_DEVICE: 'Velg en enhet',
|
||||
SET_ALL: 'sett alle',
|
||||
OPTIONS: 'Alternativ',
|
||||
@@ -208,7 +208,7 @@ const no: Translation = {
|
||||
COMPACT: 'Komprimere',
|
||||
ENABLE_OTA: 'Aktiviser OTA oppdateringer',
|
||||
DOWNLOAD_CUSTOMIZATION_TEXT: 'Last ned objektstilpasninger',
|
||||
DOWNLOAD_SCHEDULE_TEXT: 'Last ned tidsplan',
|
||||
DOWNLOAD_SCHEDULE_TEXT: 'Last ned planlagte oppgaver',
|
||||
DOWNLOAD_SETTINGS_TEXT: 'Last ned applikasjonskonfigurasjon. Vær varsom med å dele fila da den inneholder passord og annen sensitiv system informasjon',
|
||||
UPLOAD_TEXT: 'Last opp en ny firmware (.bin) fil, innstillinger eller tilpassninger (.json) fil nedenfor',
|
||||
UPLOADING: 'Opplasting',
|
||||
@@ -242,7 +242,7 @@ const no: Translation = {
|
||||
MQTT_PUBLISH_TEXT_2: 'Publiser til kommando topics (ioBroker)',
|
||||
MQTT_PUBLISH_TEXT_3: 'Aktiver MQTT Discovery',
|
||||
MQTT_PUBLISH_TEXT_4: 'Prefiks for Discovery topics',
|
||||
MQTT_PUBLISH_TEXT_5: 'Oppdagelsestype',
|
||||
MQTT_PUBLISH_TEXT_5: 'Discovery type',
|
||||
MQTT_PUBLISH_INTERVALS: 'Publiseringsintervall',
|
||||
MQTT_INT_BOILER: 'Fyr/Varmepumpe',
|
||||
MQTT_INT_THERMOSTATS: 'Termostat',
|
||||
@@ -252,11 +252,11 @@ const no: Translation = {
|
||||
MQTT_QUEUE: 'MQTT Queue',
|
||||
DEFAULT: 'Standard',
|
||||
MQTT_ENTITY_FORMAT: 'Enhets ID format',
|
||||
MQTT_ENTITY_FORMAT_0: 'Enkelt forekomst, langt navn (v3.4)',
|
||||
MQTT_ENTITY_FORMAT_1: 'Enkelt forekomst, kort navn',
|
||||
MQTT_ENTITY_FORMAT_2: 'Flere forekomster, kort navn',
|
||||
MQTT_ENTITY_FORMAT_0: 'Enkel instans, fullt nane (v3.4)',
|
||||
MQTT_ENTITY_FORMAT_1: 'Enkel instans, kort nave',
|
||||
MQTT_ENTITY_FORMAT_2: 'Multiple instanser, kort name',
|
||||
MQTT_CLEAN_SESSION: 'Benytt Clean Session',
|
||||
MQTT_RETAIN_FLAG: 'Alltid sett behold flagg',
|
||||
MQTT_RETAIN_FLAG: 'Alltid sett Retain flag',
|
||||
INACTIVE: 'Innaktiv',
|
||||
ACTIVE: 'Aktiv',
|
||||
UNKNOWN: 'Ukjent',
|
||||
@@ -305,20 +305,20 @@ const no: Translation = {
|
||||
ENTITY: 'Entitet',
|
||||
MIN: 'min',
|
||||
MAX: 'max',
|
||||
BLOCK_NAVIGATE_1: 'du har ulagrede endringer',
|
||||
BLOCK_NAVIGATE_2: 'If you navigate to a different page, your unsaved changes will be lost. Are you sure you want to leave this page?', // TODO translate
|
||||
STAY: 'Bli værende',
|
||||
LEAVE: 'Logg ut',
|
||||
BLOCK_NAVIGATE_1: 'You har ulagrede endringer',
|
||||
BLOCK_NAVIGATE_2: 'Hvis du navigerer til en annen side blir dine ikke lagrede endringer gå tapt. Are du sikker på at du vil forlate denne siden ?',
|
||||
STAY: 'Bli her',
|
||||
LEAVE: 'Forlat',
|
||||
SCHEDULER: 'Planlegger',
|
||||
SCHEDULER_HELP_1: 'Automatiser kommandoer ved å legge til planlagte hendelser nedenfor. Angi et unikt navn for å aktivere/deaktivere aktivering via API/MQTT',
|
||||
SCHEDULER_HELP_2: 'Bruk 00:00 for å utløse én gang ved oppstart',
|
||||
SCHEDULER_HELP_1: 'Automatiser kommandoer ved å legge til skedulerte hendelser nedenfor. Sett et unikt navn for å slå på/av aktivering via API/MQTT.',
|
||||
SCHEDULER_HELP_2: 'Bruk 00:00 for å kjøre en gang ved oppstart',
|
||||
SCHEDULE: 'Planlegg',
|
||||
TIME: 'Tid',
|
||||
TIMER: 'Timer',
|
||||
SCHEDULE_SAVED: 'Tidsplanen er oppdatert',
|
||||
SCHEDULE_SAVED: 'Planlegger er oppdatert',
|
||||
SCHEDULE_TIMER_1: 'ved oppstart',
|
||||
SCHEDULE_TIMER_2: 'hvert minutt',
|
||||
SCHEDULE_TIMER_3: 'hver time',
|
||||
SCHEDULE_TIMER_3: 'hver time'
|
||||
};
|
||||
|
||||
export default no;
|
||||
|
||||
@@ -162,7 +162,7 @@ const SettingsApplication: FC = () => {
|
||||
justifyContent="flex-start"
|
||||
alignItems="flex-start"
|
||||
>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="rx_gpio"
|
||||
@@ -176,7 +176,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="tx_gpio"
|
||||
@@ -190,7 +190,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="pbutton_gpio"
|
||||
@@ -204,7 +204,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="dallas_gpio"
|
||||
@@ -218,7 +218,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="led_gpio"
|
||||
@@ -232,7 +232,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="phy_type"
|
||||
label={LL.PHY_TYPE()}
|
||||
@@ -259,7 +259,7 @@ const SettingsApplication: FC = () => {
|
||||
justifyContent="flex-start"
|
||||
alignItems="flex-start"
|
||||
>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="eth_power"
|
||||
label={LL.GPIO_OF('PHY Power') + ' (-1=' + LL.DISABLED(1) + ')'}
|
||||
@@ -272,7 +272,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="eth_phy_addr"
|
||||
label={LL.ADDRESS_OF('PHY I²C')}
|
||||
@@ -285,7 +285,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="eth_clock_mode"
|
||||
label="PHY Clk"
|
||||
@@ -311,7 +311,7 @@ const SettingsApplication: FC = () => {
|
||||
{LL.SETTINGS_OF(LL.EMS_BUS(0))}
|
||||
</Typography>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
name="tx_mode"
|
||||
label={LL.TX_MODE()}
|
||||
@@ -329,7 +329,7 @@ const SettingsApplication: FC = () => {
|
||||
<MenuItem value={4}>{LL.HARDWARE()}</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
name="ems_bus_id"
|
||||
label={LL.ID_OF(LL.EMS_BUS(1))}
|
||||
@@ -358,20 +358,16 @@ const SettingsApplication: FC = () => {
|
||||
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
|
||||
{LL.GENERAL_OPTIONS()}
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
'& .MuiTextField-root': { width: '25ch' }
|
||||
}}
|
||||
>
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="locale"
|
||||
label={LL.LANGUAGE_ENTITIES()}
|
||||
disabled={saving}
|
||||
value={data.locale}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
onChange={updateFormValue}
|
||||
margin="normal"
|
||||
size="small"
|
||||
select
|
||||
>
|
||||
<MenuItem value="en">English (EN)</MenuItem>
|
||||
@@ -384,7 +380,7 @@ const SettingsApplication: FC = () => {
|
||||
<MenuItem value="sv">Svenska (SV)</MenuItem>
|
||||
<MenuItem value="tr">Türk (TR)</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Box>
|
||||
</Grid>
|
||||
{data.led_gpio !== 0 && (
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.hide_led} onChange={updateFormValue} name="hide_led" />}
|
||||
@@ -429,14 +425,15 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
sx={{ pb: 2 }}
|
||||
control={<Checkbox checked={data.shower_alert} onChange={updateFormValue} name="shower_alert" />}
|
||||
label={LL.ENABLE_SHOWER_ALERT()}
|
||||
disabled={!data.shower_timer}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid container sx={{ pt: 2 }} rowSpacing={3} spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
{data.shower_alert && (
|
||||
<>
|
||||
<Grid item sx={{ pr: 1, pb: 2 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="shower_alert_trigger"
|
||||
@@ -446,13 +443,13 @@ const SettingsApplication: FC = () => {
|
||||
}}
|
||||
variant="outlined"
|
||||
value={numberValue(data.shower_alert_trigger)}
|
||||
fullWidth
|
||||
type="number"
|
||||
onChange={updateFormValue}
|
||||
size="small"
|
||||
disabled={!data.shower_timer}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item sx={{ pb: 3 }}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="shower_alert_coldshot"
|
||||
@@ -462,20 +459,20 @@ const SettingsApplication: FC = () => {
|
||||
}}
|
||||
variant="outlined"
|
||||
value={numberValue(data.shower_alert_coldshot)}
|
||||
fullWidth
|
||||
type="number"
|
||||
onChange={updateFormValue}
|
||||
size="small"
|
||||
disabled={!data.shower_timer}
|
||||
/>
|
||||
</Grid>
|
||||
</>
|
||||
)}
|
||||
</Grid>
|
||||
<Typography variant="h6" color="primary">
|
||||
<Typography sx={{ pt: 3 }} variant="h6" color="primary">
|
||||
{LL.FORMATTING_OPTIONS()}
|
||||
</Typography>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="bool_dashboard"
|
||||
label={LL.BOOLEAN_FORMAT_DASHBOARD()}
|
||||
@@ -492,7 +489,7 @@ const SettingsApplication: FC = () => {
|
||||
<MenuItem value={5}>1/0</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="bool_format"
|
||||
label={LL.BOOLEAN_FORMAT_API()}
|
||||
@@ -511,7 +508,7 @@ const SettingsApplication: FC = () => {
|
||||
<MenuItem value={6}>1/0</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
<Grid item xs={6} sm={4}>
|
||||
<Grid item xs={12} sm={6} md={4}>
|
||||
<ValidatedTextField
|
||||
name="enum_format"
|
||||
label={LL.ENUM_FORMAT()}
|
||||
@@ -560,7 +557,7 @@ const SettingsApplication: FC = () => {
|
||||
/>
|
||||
{data.syslog_enabled && (
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="syslog_host"
|
||||
@@ -573,7 +570,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="syslog_port"
|
||||
@@ -587,7 +584,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
name="syslog_level"
|
||||
label={LL.LOG_LEVEL()}
|
||||
@@ -607,7 +604,7 @@ const SettingsApplication: FC = () => {
|
||||
<MenuItem value={9}>ALL</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
<Grid item xs={4}>
|
||||
<Grid item xs={12} sm={6}>
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="syslog_mark_interval"
|
||||
|
||||
@@ -52,15 +52,7 @@ import { useI18nContext } from 'i18n/i18n-react';
|
||||
import * as EMSESP from './api';
|
||||
|
||||
function makeid() {
|
||||
let result = '';
|
||||
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||
const charactersLength = characters.length;
|
||||
let counter = 0;
|
||||
while (counter < 4) {
|
||||
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
||||
counter += 1;
|
||||
}
|
||||
return result;
|
||||
return Math.floor(Math.random() * (Math.floor(200) - 100) + 100);
|
||||
}
|
||||
|
||||
const SettingsScheduler: FC = () => {
|
||||
@@ -70,7 +62,7 @@ const SettingsScheduler: FC = () => {
|
||||
const blocker = useBlocker(numChanges !== 0);
|
||||
|
||||
const emptySchedule = {
|
||||
id: '0',
|
||||
id: 0,
|
||||
active: false,
|
||||
deleted: false,
|
||||
flags: 0,
|
||||
|
||||
@@ -43,7 +43,7 @@ export enum busConnectionStatus {
|
||||
}
|
||||
|
||||
export interface Stat {
|
||||
id: string; // id - needs to be a string
|
||||
id: number; // id
|
||||
s: number; // success
|
||||
f: number; // fail
|
||||
q: number; // quality
|
||||
@@ -305,7 +305,7 @@ export enum DeviceEntityMask {
|
||||
}
|
||||
|
||||
export interface ScheduleItem {
|
||||
id: string; // unique index
|
||||
id: number; // unique index
|
||||
active: boolean;
|
||||
deleted?: boolean; // optional
|
||||
flags: number;
|
||||
@@ -313,7 +313,7 @@ export interface ScheduleItem {
|
||||
cmd: string;
|
||||
value: string;
|
||||
name?: string; // optional
|
||||
o_id?: string;
|
||||
o_id?: number;
|
||||
o_active?: boolean;
|
||||
o_deleted?: boolean;
|
||||
o_flags?: number;
|
||||
|
||||
Reference in New Issue
Block a user