Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Dec 12, 2023
2 parents a61610a + 6869944 commit d42fec0
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 941 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG_OLD.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
## 6.12.1 (2023-10-29)
* (foxriver76) optimzied the notificaiton popup (auto-extend first entry per category, respect line breaks, respect severity for icons)
* (theimo1221) #2178 Stabilize onObjectChange handling during creation of new objects in WebUi, to directly show new element.
## 6.12.4 (2023-11-16)
* (foxriver76) custom settings icon has no a brighter color in dark mode
* (foxriver76) fixed color of host selector in dark mode
* (foxriver76) fixed problem with a JSON config language component

## 6.12.1 (2023-10-29)
* (foxriver76) optimzied the notificaiton popup (auto-extend first entry per category, respect line breaks, respect severity for icons)
* (theimo1221) #2178 Stabilize onObjectChange handling during creation of new objects in WebUi, to directly show new element.

## 6.12.3 (2023-11-15)
* (foxriver76) fixed problem that disabled checkbox is still clickable
* (foxriver76) no longer replace valid `common.adminUI.tab` values of adapters
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ The icons may not be reused in other projects without the proper flaticon licens
## Changelog
### **WORK IN PROGRESS**
* (foxriver76) prevent strict schema validation being logged to syslog
* (foxriver76) fixed problems with ObjectCustomEditor

### 6.12.9 (2023-12-12)
* (foxriver76) prevented the strict schema validation being logged to syslog
* (bluefox) corrected the displaying of news with the new lines

### 6.12.8 (2023-12-06)
* (bluefox) corrected ACL for files
Expand All @@ -106,11 +111,6 @@ The icons may not be reused in other projects without the proper flaticon licens
* (foxriver76) fixed json config ConfigFileSelector
* (klein0r) fixed title bar layout with username and icon

### 6.12.4 (2023-11-16)
* (foxriver76) custom settings icon has no a brighter color in dark mode
* (foxriver76) fixed color of host selector in dark mode
* (foxriver76) fixed problem with a JSON config language component

## License
The MIT License (MIT)

Expand Down
28 changes: 14 additions & 14 deletions io-package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"common": {
"name": "admin",
"version": "6.12.8",
"version": "6.12.9",
"titleLang": {
"en": "Admin",
"de": "Admin",
Expand All @@ -18,6 +18,19 @@
"connectionType": "local",
"dataSource": "push",
"news": {
"6.12.9": {
"en": "prevented the strict schema validation being logged to syslog\ncorrected the displaying of news with the new lines",
"de": "verhindert, dass die strenge schemavalidierung bei syslog angemeldet wird\ndie anzeige von nachrichten mit den neuen zeilen korrigiert",
"ru": "предотвратить строгую схему валидации, входя в syslog\nисправили отображение новостей с новыми линиями",
"pt": "impediu a validação rigorosa de esquemas sendo logado para syslog\ncorrigiu a exibição de notícias com as novas linhas",
"nl": "verhinderde dat de strikte schema-betaling werd ingelogd aan syslog\nvertaling:",
"fr": "empêché la validation stricte du schéma de syslog\na corrigé l'affichage des nouvelles avec les nouvelles lignes",
"it": "impedire che la validazione rigorosa dello schema venga collegata a syslog\ncorretto la visualizzazione di notizie con le nuove linee",
"es": "impidió que la validación estricta de esquema se registrara para syslog\ncorregido el despliegue de noticias con las nuevas líneas",
"pl": "zapobiegło to ścisłej walidacji syslogii\nzrekomendowano wyświetlanie wiadomości z nowymi liniami",
"uk": "запобігла суворій перевірці схеми, що підлягають списанню\nвиправлено відображення новин новими лініями",
"zh-cn": "防止严格辨认药\n修改了新线新闻的展示"
},
"6.12.8": {
"en": "corrected ACL for files\nallowed changing color of the menu item\ncorrected the user/group icon selector",
"de": "aCL für Dateien korrigiert\nerlaubte änderung der farbe des menüpunkts\nkorrigierte den benutzer/gruppen-icon-selektor",
Expand Down Expand Up @@ -95,19 +108,6 @@
"pl": "stabilny problem, w jaki sposób uszkodzenie skrzynki jest nadal clickowalne\nnie zastępuje już wartości adminUI.tab\nwolny Opcja Solo w autokompletnych częściach\nprawdziwy problem z jsonConfig wysyła na rynek. Przyjmowaniu możliwości rodzimej, gdy wracamy do wielu własności\nuruchomiony spadek po wybraniu języka `system' w JsonConfig",
"uk": "виправлена проблема, яка відключена прапорець все ще клацається\nне замінює дійсний загальний.adminUI.tab значення адаптерів\nбезкоштовно Індивідуальний варіант для автоматичних компонентів\nвиправлено проблему з jsonConfig відправити Щоб при поверненні декількох властивостей\nвиправлений вибір порожніх випадань після вибору `system language` в JsonConfig",
"zh-cn": "残疾检查箱的固定问题仍然难以预测。\n不再取代有效共同的、adminUI\n定期存款 汽车单元的选择\njson Config发送的固定问题 在归还多种财产时,采用当地办法\n在选择“JsonConfig”的“系统语言”之后,定期撤退。"
},
"6.12.2": {
"en": "fixed issue with jsonConfig `sendTo` with `native` option when returning multiple properties\nfixed crash case when schema cannot be read\nFixed noDelete attribute of JSON config accordion",
"de": "problem mit jsonConfig senden Mit nativer Option bei der Rückgabe mehrerer Eigenschaften\nfester crashfall, wenn schema nicht gelesen werden kann\nFixed noDelete Attribut von JSON config Akkordeon",
"ru": "фиксированная проблема с jsonConfig отправить С родным вариантом при возврате нескольких свойств\nфиксированный случай аварии, когда схема не может быть прочитана\nФиксированный noDelete атрибут JSON config аккордеон",
"pt": "problema fixo com jsonConfig enviar Para com opção nativa ao retornar várias propriedades\ncaso de acidente fixo quando o esquema não pode ser lido\nAtributo noDelete fixo de acordeão de configuração JSON",
"nl": "_ Met inheemse optie als je meerdere eigenschappen terugbrengt\nvertaling:\n_",
"fr": "problème fixe avec jsonConfig envoyer À l'option native lorsque vous retournez plusieurs propriétés\ncas de crash fixe lorsque le schéma ne peut pas être lu\nCorrection de l'attribut noDelete de JSON config accordéion",
"it": "problema fisso con jsonConfig inviare A con opzione nativo quando si ritorna più proprietà\ncaso di crash fisso quando lo schema non può essere letto\nAttributo noDelete fisso della fisarmonica di configurazione JSON",
"es": "edición fija con jsonConfig enviar A con opción nativa al devolver múltiples propiedades\ncaso de accidente fijo cuando el esquema no se puede leer\nAtributo fijo no único del acordeón de config JSON",
"pl": "prawdziwy problem z jsonConfig wysyła na rynek. Przyjmowaniu możliwości rodzimej, gdy wracamy do wielu własności\nsprawa rozbłysku, gdy schema nie może być odczytana\nFixed noDelete attributes",
"uk": "виправлено проблему з jsonConfig відправити Щоб при поверненні декількох властивостей\nвиправлений випадок аварії, коли не можна читати\nФіксований атрибут налаштування JSON",
"zh-cn": "json Config发送的固定问题 在归还多种财产时,采用当地办法\n无法阅读shiema的固定事故案件\n九. 未确定联合协商会的名称"
}
},
"desc": {
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "iobroker.admin",
"description": "The adapter opens a webserver for the ioBroker admin UI.",
"version": "6.12.8",
"version": "6.12.9",
"contributors": [
"bluefox <[email protected]>",
"apollon77",
Expand Down Expand Up @@ -42,7 +42,7 @@
"passport": "^0.7.0",
"passport-local": "^1.0.0",
"semver": "^7.5.4",
"ws": "^8.14.2"
"ws": "^8.15.0"
},
"devDependencies": {
"@alcalzone/release-script": "^3.7.0",
Expand All @@ -51,8 +51,8 @@
"@iobroker/legacy-testing": "^1.0.3",
"@iobroker/testing": "^4.1.0",
"@tsconfig/node16": "^16.1.1",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"chai": "^4.3.10",
"colorette": "^2.0.20",
"eslint": "^8.55.0",
Expand All @@ -66,9 +66,9 @@
"gulp-replace": "^1.1.4",
"gulp-sourcemaps": "^3.0.0",
"mocha": "^10.2.0",
"prettier": "^3.1.0",
"puppeteer": "^21.5.2",
"typescript": "^5.3.2"
"prettier": "^3.1.1",
"puppeteer": "^21.6.0",
"typescript": "^5.3.3"
},
"bugs": {
"url": "https://github.com/ioBroker/ioBroker.admin/issues"
Expand Down
16 changes: 10 additions & 6 deletions src/craco.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
const { ProvidePlugin} = require('webpack');
const { ProvidePlugin } = require('webpack');
const cracoModuleFederation = require('@iobroker/adapter-react-v5/craco-module-federation');
const path = require('path');

module.exports = {
plugins: [
// { plugin: CracoEsbuildPlugin },
{ plugin: cracoModuleFederation }
{ plugin: cracoModuleFederation },
],
devServer: {
proxy: {
'/files': 'http://127.0.0.1:8081',
'/adapter': 'http://127.0.0.1:8081',
'/session': 'http://127.0.0.1:8081',
'/log': 'http://127.0.0.1:8081',
'/lib/js/crypto-js': 'http://127.0.0.1:8081'
}
'/lib/js/crypto-js': 'http://127.0.0.1:8081',
},
},
webpack: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
output: {
publicPath: './',
},
Expand All @@ -26,8 +30,8 @@ module.exports = {
}),
],
configure: webpackConfig => {
webpackConfig.resolve.fallback = webpackConfig.resolve.fallback || {}
webpackConfig.resolve.fallback.util = false;//webpackConfig.resolve.fallback.util || require.resolve('util');
webpackConfig.resolve.fallback = webpackConfig.resolve.fallback || {};
webpackConfig.resolve.fallback.util = false;// webpackConfig.resolve.fallback.util || require.resolve('util');
return webpackConfig;
},
},
Expand Down
22 changes: 11 additions & 11 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"name": "src-rx",
"version": "6.12.8",
"version": "6.12.9",
"private": true,
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.23.5",
"@babel/plugin-proposal-decorators": "^7.23.6",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@craco/craco": "^7.1.0",
"@dilesoft/vite-plugin-federation-dynamic": "^1.1.9",
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@fnando/sparkline": "^0.3.10",
"@honkhonk/vite-plugin-svgr": "^1.1.0",
"@iobroker/adapter-react-v5": "^4.7.11",
"@iobroker/adapter-react-v5": "^4.7.15",
"@iobroker/admin-component-easy-access": "^0.3.2",
"@iobroker/socket-client": "^2.3.12",
"@mui/icons-material": "^5.14.19",
"@mui/lab": "^5.0.0-alpha.154",
"@mui/material": "^5.14.19",
"@mui/lab": "^5.0.0-alpha.155",
"@mui/material": "^5.14.20",
"@mui/styles": "5.14.14",
"@mui/x-data-grid": "^6.18.3",
"@mui/x-date-pickers": "^6.18.3",
"@mui/x-data-grid": "^6.18.4",
"@mui/x-date-pickers": "^6.18.4",
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@react-leaflet/core": "^2.1.0",
"@sentry/browser": "^7.84.0",
"@sentry/integrations": "^7.84.0",
"@sentry/browser": "^7.86.0",
"@sentry/integrations": "^7.86.0",
"@testing-library/jest-dom": "^6.1.5",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.5.1",
Expand Down Expand Up @@ -68,7 +68,7 @@
"react-inlinesvg": "^4.1.0",
"react-leaflet": "^4.2.1",
"react-markdown": "^9.0.1",
"react-monaco-editor": "^0.54.0",
"react-monaco-editor": "^0.55.0",
"react-scripts": "^5.0.1",
"react-showdown": "^2.3.1",
"react-sortable-hoc": "^2.0.0",
Expand Down Expand Up @@ -110,6 +110,6 @@
"devDependencies": {
"@types/crypto-js": "^4.2.1",
"i": "^0.3.7",
"npm": "^10.2.4"
"npm": "^10.2.5"
}
}
34 changes: 23 additions & 11 deletions src/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ import SystemSettingsDialog from './dialogs/SystemSettingsDialog';
import Login from './login/Login';
import HostSelectors from './components/HostSelectors';
import ExpertModeDialog from './dialogs/ExpertModeDialog';
import { checkMessages, newsAdminDialogFunc } from './dialogs/NewsAdminDialog';
import NewsAdminDialog, { checkMessages } from './dialogs/NewsAdminDialog';
import HostWarningDialog from './dialogs/HostWarningDialog';
import LogsWorker from './Workers/LogsWorker';
import InstancesWorker from './Workers/InstancesWorker';
Expand Down Expand Up @@ -1329,16 +1329,13 @@ class App extends Router {
});

if (checkNews?.length) {
newsAdminDialogFunc(
checkNews,
lastNewsId?.val,
this.state.theme,
id =>
this.socket.setState(`admin.${instance}.info.newsLastId`, {
val: id,
ack: true,
}),
);
this.setState({
showNews: {
instance,
checkNews,
lastNewsId: lastNewsId?.val,
},
});
}
}
}
Expand All @@ -1348,6 +1345,20 @@ class App extends Router {
}
};

renderNewsDialog() {
if (!this.state.showNews) {
return null;
}
return <NewsAdminDialog
newsArr={this.state.showNews.checkNews}
current={this.state.showNews.lastNewsId}
onSetLastNewsId={async id => {
id && (await this.socket.setState(`admin.${this.state.showNews.instance}.info.newsLastId`, { val: id, ack: true }));
this.setState({ showNews: null });
}}
/>;
}

renderSlowConnectionWarning() {
if (!this.state.showSlowConnectionWarning) {
return null;
Expand Down Expand Up @@ -2629,6 +2640,7 @@ class App extends Router {
{this.renderWizardDialog()}
{this.showRedirectDialog()}
{this.renderSlowConnectionWarning()}
{this.renderNewsDialog()}
{this.renderHostWarningDialog()}
{!this.state.connected && !this.state.redirectCountDown && !this.state.updating ? (
<Connecting />
Expand Down
9 changes: 9 additions & 0 deletions src/src/Utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ const STYLES: Record<string, Style> = {
};

class Utils {
/**
* Perform JSON parse/stringify with type inference
*
* @param obj the object to clone
*/
static deepClone<T extends Record<string, any>>(obj: T): T {
return JSON.parse(JSON.stringify(obj));
}

/**
* Format bytes to MB or GB
* @param bytes
Expand Down
Loading

0 comments on commit d42fec0

Please sign in to comment.