diff --git a/README.md b/README.md index 288607d..1fe6ac9 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,6 @@ Use id.remote.\* to control the mower Placeholder for the next version (at the beginning of the line): ### **WORK IN PROGRESS** --> -### **WORK IN PROGRESS** -- (mcm1957) jsonConfig which has been adapteed for responsive design has been restored. - ### 1.3.6 (2025-01-03) - (TA2k) Fix for login. If settings are not loading, delete the instance and create a new instance. diff --git a/admin/.DS_Store b/admin/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/admin/.DS_Store differ diff --git a/admin/admin.d.ts b/admin/admin.d.ts new file mode 100644 index 0000000..2524e0a --- /dev/null +++ b/admin/admin.d.ts @@ -0,0 +1,93 @@ +declare let systemDictionary: Record>; + +declare let load: (settings: Record, onChange: (hasChanges: boolean) => void) => void; +declare let save: (callback: (settings: Record) => void) => void; + +// make load and save exist on the window object +interface Window { + load: typeof load; + save: typeof save; +} + +declare const instance: number; +declare const adapter: string; +/** Translates text */ +declare function _(text: string, arg1?: string, arg2?: string, arg3?: string): string; +declare const socket: ioBrokerSocket; +declare function sendTo( + instance: any | null, + command: string, + message: any, + callback: (result: SendToResult) => void | Promise, +): void; + +interface SendToResult { + error?: string | Error; + result?: any; +} + +// tslint:disable-next-line:class-name +interface ioBrokerSocket { + emit( + command: "subscribeObjects", + pattern: string, + callback?: (err?: string) => void | Promise, + ): void; + emit( + command: "subscribeStates", + pattern: string, + callback?: (err?: string) => void | Promise, + ): void; + emit( + command: "unsubscribeObjects", + pattern: string, + callback?: (err?: string) => void | Promise, + ): void; + emit( + command: "unsubscribeStates", + pattern: string, + callback?: (err?: string) => void | Promise, + ): void; + + emit( + event: "getObjectView", + view: "system", + type: "device", + options: ioBroker.GetObjectViewParams, + callback: ( + err: string | undefined, + result?: any, + ) => void | Promise, + ): void; + emit( + event: "getStates", + callback: ( + err: string | undefined, + result?: Record, + ) => void, + ): void; + emit( + event: "getState", + id: string, + callback: (err: string | undefined, result?: ioBroker.State) => void, + ): void; + emit( + event: "setState", + id: string, + state: unknown, + callback: (err: string | undefined, result?: any) => void, + ): void; + + on(event: "objectChange", handler: ioBroker.ObjectChangeHandler): void; + on(event: "stateChange", handler: ioBroker.StateChangeHandler): void; + removeEventHandler( + event: "objectChange", + handler: ioBroker.ObjectChangeHandler, + ): void; + removeEventHandler( + event: "stateChange", + handler: ioBroker.StateChangeHandler, + ): void; + + // TODO: other events +} diff --git a/admin/index_m.html b/admin/index_m.html new file mode 100644 index 0000000..32802ab --- /dev/null +++ b/admin/index_m.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+ + + + +
+
+ + +
+
+
+
+ + +
+
+
+
+ Check Captcha Box and press Submit. Save the form. +

+ If this is not working use the IP of the ioBroker instance in the browser and try again. +

+ +

+
+
+ +
+
+ +
+ + + +
+
+

+ + + + +
+ +
+
+ + +
+
+
+
+ + +
+
+
+ + diff --git a/admin/jsonConfig.json b/admin/jsonConfig.json deleted file mode 100644 index 5990700..0000000 --- a/admin/jsonConfig.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "i18n": false, - "items": { - "username": { - "type": "text", - "label": { - "en": "App Email", - "de": "App-E-Mail", - "ru": "Электронная почта приложения", - "pt": "Email do aplicativo", - "nl": "App-e-mail", - "fr": "Courriel de l'application", - "it": "E-mail dell'app", - "es": "Correo electrónico de la aplicación", - "pl": "E-mail aplikacji", - "uk": "Електронна пошта додатка", - "zh-cn": "应用电子邮件" - }, - "newLine": true, - "xs": 12, - "sm": 12, - "md": 6, - "lg": 4, - "xl": 4 - }, - "password": { - "type": "password", - "repeat": false, - "visible": true, - "xs": 12, - "sm": 12, - "md": 6, - "lg": 4, - "xl": 4, - "label": { - "en": "App Password", - "de": "App-Passwort", - "ru": "Пароль приложения", - "pt": "Senha de app", - "nl": "App-wachtwoord", - "fr": "Mot de passe de l'application", - "it": "Password dell'app", - "es": "Contraseña de la aplicación", - "pl": "Hasło do aplikacji", - "uk": "Пароль додатка", - "zh-cn": "应用密码" - } - }, - "getMap": { - "type": "checkbox", - "newLine": true, - "xs": 12, - "sm": 12, - "md": 6, - "lg": 4, - "xl": 4, - "label": { - "en": "Get Map", - "de": "Karte abrufen", - "ru": "Получить карту", - "pt": "Obter mapa", - "nl": "Kaart ophalen", - "fr": "Obtenir la carte", - "it": "Ottieni mappa", - "es": "Obtener mapa", - "pl": "Pobierz mapę", - "uk": "Отримати карту", - "zh-cn": "获取地图" - } - }, - - "interval": { - "type": "number", - "min": 1, - "xs": 12, - "sm": 12, - "md": 6, - "lg": 4, - "xl": 4, - "label": { - "en": "Update interval (in minutes)", - "de": "Aktualisierungsintervall (in Minuten)", - "ru": "Интервал обновления (в минутах)", - "pt": "Intervalo de atualização (em minutos)", - "nl": "Update-interval (in minuten)", - "fr": "Intervalle de mise à jour (en minutes)", - "it": "Intervallo di aggiornamento (in minuti)", - "es": "Intervalo de actualización (en minutos)", - "pl": "Interwał aktualizacji (w minutach)", - "uk": "Інтервал оновлення (в хвилинах)", - "zh-cn": "更新间隔(分钟)" - } - } - } -} diff --git a/admin/style.css b/admin/style.css new file mode 100644 index 0000000..09007d0 --- /dev/null +++ b/admin/style.css @@ -0,0 +1,43 @@ +/* You can delete those if you want. I just found them very helpful */ +* { + box-sizing: border-box +} + +body { + overflow: hidden; +} + +.adapter-body { + overflow: auto; +} + +.m { + /* Don't cut off dropdowns! */ + overflow: initial; +} + +.m.adapter-container, +.m.adapter-container>div.App { + /* Fix layout/scrolling issues with tabs */ + height: 100%; + width: 100%; + position: relative; +} + +.m .select-wrapper+label { + /* The positioning for dropdown labels is messed up */ + transform: none !important; +} + +label>i[title] { + /* Display the help cursor for the tooltip icons and fix their positioning */ + cursor: help; + margin-left: 0.25em; +} + +.dropdown-content { + /* Don't wrap text in dropdowns */ + white-space: nowrap; +} + +/* Add your styles here */ \ No newline at end of file diff --git a/admin/tsconfig.json b/admin/tsconfig.json new file mode 100644 index 0000000..31f5ea0 --- /dev/null +++ b/admin/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.json", + "include": [ + "./admin.d.ts", + "./**/*.js", + // include the adapter-config definition if it exists + "../src/lib/adapter-config.d.ts", + ] +} diff --git a/io-package.json b/io-package.json index c082960..8ddde84 100644 --- a/io-package.json +++ b/io-package.json @@ -113,9 +113,7 @@ "compact": true, "connectionType": "cloud", "dataSource": "poll", - "adminUI": { - "config": "json" - }, + "materialize": true, "dependencies": [ { "js-controller": ">=5.0.19"