mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-07-29 10:02:48 +00:00
added application setting 'disable factory' Feature request->Button anti tampering mode
Fixes #3150
This commit is contained in:
@@ -54,6 +54,7 @@ export interface Settings {
|
||||
email_recp: string;
|
||||
email_subject: string;
|
||||
developer_mode: boolean;
|
||||
disable_reset: boolean;
|
||||
}
|
||||
|
||||
export enum busConnectionStatus {
|
||||
|
||||
@@ -903,6 +903,16 @@ const ApplicationSettings = () => {
|
||||
}
|
||||
label={LL.DEVELOPER_MODE()}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
checked={data.disable_reset}
|
||||
onChange={updateFormValue}
|
||||
name="disable_reset"
|
||||
/>
|
||||
}
|
||||
label={LL.DISABLE_RESET()}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
control={
|
||||
<Checkbox
|
||||
|
||||
@@ -71,6 +71,7 @@ interface VersionData {
|
||||
partition: string;
|
||||
partitions: PartitionData[];
|
||||
developer_mode: boolean;
|
||||
disable_reset: boolean;
|
||||
}
|
||||
|
||||
// Memoized components for better performance
|
||||
@@ -923,7 +924,7 @@ const Version = () => {
|
||||
>
|
||||
{LL.RESTART()}
|
||||
</Button>
|
||||
{data.developer_mode && (
|
||||
{!data.disable_reset && (
|
||||
<Button
|
||||
startIcon={<SettingsBackupRestoreIcon />}
|
||||
variant="outlined"
|
||||
|
||||
@@ -340,6 +340,7 @@ const cs: Translation = {
|
||||
AUTO_SCROLL: 'Automatické rolování',
|
||||
DASHBOARD: 'Dashboard',
|
||||
DEVELOPER_MODE: 'Režim vývojáře',
|
||||
DISABLE_RESET: 'Zakázat obnovení továrního nastavení',
|
||||
BYTES: 'Bajty',
|
||||
BITMASK: 'Bit Mask',
|
||||
DUPLICATE: 'Duplikát',
|
||||
|
||||
@@ -340,6 +340,7 @@ const de: Translation = {
|
||||
AUTO_SCROLL: 'Automatisches Scrollen',
|
||||
DASHBOARD: 'Dashboard',
|
||||
DEVELOPER_MODE: 'Entwicklermodus',
|
||||
DISABLE_RESET: 'Werkseinstellungen deaktivieren',
|
||||
BYTES: 'Bytes',
|
||||
BITMASK: 'Bit Maske',
|
||||
DUPLICATE: 'Kopieren',
|
||||
|
||||
@@ -340,6 +340,7 @@ const en: Translation = {
|
||||
AUTO_SCROLL: 'Auto Scroll',
|
||||
DASHBOARD: 'Dashboard',
|
||||
DEVELOPER_MODE: 'Developer Mode',
|
||||
DISABLE_RESET: 'Disable Factory Reset',
|
||||
BYTES: 'Bytes',
|
||||
BITMASK: 'Bit Mask',
|
||||
DUPLICATE: 'Duplicate',
|
||||
|
||||
@@ -340,6 +340,7 @@ const fr: Translation = {
|
||||
AUTO_SCROLL: 'Défilement automatique',
|
||||
DASHBOARD: 'Tableau de bord',
|
||||
DEVELOPER_MODE: 'Mode développeur',
|
||||
DISABLE_RESET: 'Désactiver la réinitialisation de fabrique',
|
||||
BYTES: 'Octets',
|
||||
BITMASK: 'Masque de bits',
|
||||
DUPLICATE: 'Dupliquer',
|
||||
|
||||
@@ -340,6 +340,7 @@ const it: Translation = {
|
||||
AUTO_SCROLL: 'Scorrimento automatico',
|
||||
DASHBOARD: 'Pannello di controllo',
|
||||
DEVELOPER_MODE: 'Modalità sviluppatore',
|
||||
DISABLE_RESET: 'Disabilita la ripristino di fabbrica',
|
||||
BYTES: 'Byte',
|
||||
BITMASK: 'Bitmask',
|
||||
DUPLICATE: 'Duplicato',
|
||||
|
||||
@@ -340,6 +340,7 @@ const nl: Translation = {
|
||||
AUTO_SCROLL: 'Automatisch Scrollen',
|
||||
DASHBOARD: 'Dashboard',
|
||||
DEVELOPER_MODE: 'Ontwikkelaarsmodus',
|
||||
DISABLE_RESET: 'Fabrieksinstellingen uitschakelen',
|
||||
BYTES: 'Bytes',
|
||||
BITMASK: 'Bit Mask',
|
||||
DUPLICATE: 'Duplicaat',
|
||||
|
||||
@@ -340,6 +340,7 @@ const no: Translation = {
|
||||
AUTO_SCROLL: 'Automatisk rulling',
|
||||
DASHBOARD: 'Dashboard',
|
||||
DEVELOPER_MODE: 'Utvikler modus',
|
||||
DISABLE_RESET: 'Deaktiver fabrikkinnstillinger',
|
||||
BYTES: 'Bytes',
|
||||
BITMASK: 'Bitmask',
|
||||
DUPLICATE: 'Duplikat',
|
||||
|
||||
@@ -340,6 +340,7 @@ const pl: BaseTranslation = {
|
||||
AUTO_SCROLL: 'Auto Scroll',
|
||||
DASHBOARD: 'Pulpit',
|
||||
DEVELOPER_MODE: 'Tryb programisty',
|
||||
DISABLE_RESET: 'Wyłącz reset fabryczny',
|
||||
BYTES: 'Bajty',
|
||||
BITMASK: 'Bit Mask',
|
||||
DUPLICATE: 'Duplicate',
|
||||
|
||||
@@ -340,6 +340,7 @@ const sk: Translation = {
|
||||
AUTO_SCROLL: 'Automatické rolovanie',
|
||||
DASHBOARD: 'Panel',
|
||||
DEVELOPER_MODE: 'Režim vývojára',
|
||||
DISABLE_RESET: 'Zakázať továrenské nastavenia',
|
||||
BYTES: 'Bytov',
|
||||
BITMASK: 'Bitová maska',
|
||||
DUPLICATE: 'Duplicitné',
|
||||
|
||||
@@ -340,6 +340,7 @@ const sv: Translation = {
|
||||
AUTO_SCROLL: 'Autoskrolla',
|
||||
DASHBOARD: 'Kontrollpanel',
|
||||
DEVELOPER_MODE: 'Utvecklarläge',
|
||||
DISABLE_RESET: 'Inaktivera fabriksåterställning',
|
||||
BYTES: 'Bytes',
|
||||
BITMASK: 'Bitmask',
|
||||
DUPLICATE: 'Dublett',
|
||||
|
||||
@@ -340,6 +340,7 @@ const tr: Translation = {
|
||||
AUTO_SCROLL: 'Otomatik kaydırma',
|
||||
DASHBOARD: 'Kontrol Paneli',
|
||||
DEVELOPER_MODE: 'Geliştirici Modu',
|
||||
DISABLE_RESET: 'Fabrika ayarlarını devre dışı bırak',
|
||||
BYTES: 'Bayt',
|
||||
BITMASK: 'Bit Maskesi',
|
||||
DUPLICATE: 'Çift',
|
||||
|
||||
@@ -61,6 +61,7 @@ export interface SystemStatus {
|
||||
}[];
|
||||
status: number; // System Status Codes which matches SYSTEM_STATUS in System.h
|
||||
developer_mode: boolean;
|
||||
disable_reset: boolean;
|
||||
temperature?: number;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user