From b392a452a52ec59a02a0d623442d22bce1ff75de Mon Sep 17 00:00:00 2001 From: Sylvain Dangin Date: Fri, 24 Jan 2020 09:18:30 +0100 Subject: [PATCH] Native notifications Fix gen_assets --- assets/config/default.config.ini | 1 - assets/config/dist/default.config.ini.dev | 1 - assets/config/dist/default.config.ini.dist | 1 - assets/img/icon-error.png | Bin 0 -> 15520 bytes assets/js/desktop/utils.js | 135 +++++++------------- package-lock.json | 5 - package.json | 1 - scripts/gen_assets.sh | 2 - src/Controller/Pages/FirstUseController.php | 2 - src/Helpers/PrepareView.php | 15 +-- views/desktop/params/profils.html.twig | 14 -- 11 files changed, 54 insertions(+), 123 deletions(-) create mode 100644 assets/img/icon-error.png diff --git a/assets/config/default.config.ini b/assets/config/default.config.ini index 598a6c270..95040725f 100644 --- a/assets/config/default.config.ini +++ b/assets/config/default.config.ini @@ -173,7 +173,6 @@ developer::exceptionhandler = 0 ;Notification notify::status = 1 -notify::position = bottomCenter notify::timeout = 5 ;Api diff --git a/assets/config/dist/default.config.ini.dev b/assets/config/dist/default.config.ini.dev index b3db69a00..85950f24d 100644 --- a/assets/config/dist/default.config.ini.dev +++ b/assets/config/dist/default.config.ini.dev @@ -173,7 +173,6 @@ developer::exceptionhandler = 1 ;Notification notify::status = 1 -notify::position = bottomCenter notify::timeout = 5 ;Api diff --git a/assets/config/dist/default.config.ini.dist b/assets/config/dist/default.config.ini.dist index 598a6c270..95040725f 100644 --- a/assets/config/dist/default.config.ini.dist +++ b/assets/config/dist/default.config.ini.dist @@ -173,7 +173,6 @@ developer::exceptionhandler = 0 ;Notification notify::status = 1 -notify::position = bottomCenter notify::timeout = 5 ;Api diff --git a/assets/img/icon-error.png b/assets/img/icon-error.png new file mode 100644 index 0000000000000000000000000000000000000000..8455a07662230b3f6c40dc2c908a25a2ec4d4da9 GIT binary patch literal 15520 zcmV;RJYU0!P)K7;R%NNIS-ph+qi!0U0 z7%&n=0wg5SR1lyxsv~JMGty`@?bdS6dH-H#?{A-bM+iGM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18L5wYIiI zV{vX85N6+FMsUg(Iu+dT-KuNkb6LN)rw50P?K`k@=gwy~ys&A_LG-PGC_^&PD~&~y zKTZHGCdA2PGU=sDmdu_%ckad0rcApKf#Fh|U^*$0Oh)7JL=0tJn~2!lSIVXG;NW2O zL{E3m(XOst2XHj|_MJPoAL;5k3gCyO#uv}7KyUnGL86d`rpAVu3+K&y--;`jfA-@a z`p`E%`^iuK#pgbA%irF5%V+-?<3D`-gCG2#mo8m;Yx~rx*F-JrJR)j`OoXH%k<;y@ z9=8BzmqoCpIFN{(TOljxNvTLFOEd4v`!r5~vtLFZ2dD|)Lp&w#PBT9)<1#MeGA`pX iF5@yT<1#MepZ^Egiz}g_dg?j=0000]+)>)/ig, ''), + icon: icon + }); + if (typeof(notify_timeout) !== 'undefined') { + setTimeout(notification.close.bind(notification), notify_timeout); + } +} - iziToast.show({ - id: null, - class: '', - title: _title, - titleColor: 'white', - titleSize: '1.5em', - titleLineHeight: '30px', - message: _text, - messageColor: 'white', - messageSize: '', - messageLineHeight: '', - theme: 'dark', // dark - iconText: '', - backgroundColor: _backgroundColor, - icon: _icon, - iconColor: 'white', - iconUrl: null, - image: '', - imageWidth: 50, - maxWidth: jQuery(window).width() - 500, - zindex: null, - layout: 2, - balloon: false, - close: true, - closeOnEscape: false, - closeOnClick: false, - displayMode: 0, // once, replace - position: notify_position, // bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center - target: '', - targetFirst: true, - timeout: notify_timeout * 1000, - rtl: false, - animateInside: true, - drag: true, - pauseOnHover: true, - resetOnHover: false, - progressBar: true, - progressBarColor: '', - progressBarEasing: 'linear', - overlay: false, - overlayClose: false, - overlayColor: 'rgba(0, 0, 0, 0.6)', - transitionIn: 'fadeInUp', - transitionOut: 'fadeOut', - transitionInMobile: 'fadeInUp', - transitionOutMobile: 'fadeOutDown', - buttons: {}, - inputs: {}, - onOpening: function () { - }, - onOpened: function () { - }, - onClosing: function () { - }, - onClosed: function () { +/** + * Check notification permission and show if granted + * @param title Title of the notification + * @param message Message of the notification + * @param type Type of notification (success, error) + */ +function notify(title, message, type) { + var currentDate = new Date(); + if (!window.Notification) { + console.error('You\'re browser doesn\'t support notifications'); + } + else { + if (!(typeof(notify_status) !== 'undefined' && notify_status == 0)) { + if (Notification.permission === 'granted') { + showNotification(title, message, type); } - }); + else { + var lastRequest = parseInt(localStorage.getItem('notification')); + // 2 weeks + if (lastRequest + 1209600000 > currentDate.getTime()) { + Notification.requestPermission().then(function(result) { + if (result === 'granted') { + showNotification(title, message, type); + } + else { + localStorage.setItem('notification', currentDate.getTime().toString()); + } + }); + } + } + } } } @@ -235,7 +197,6 @@ function saveWidgetDisplay(_params){ } var cmds = []; var eqLogics = []; - var scenarios = []; $('.eqLogic-widget:not(.eqLogic_layout_table)').each(function(){ var eqLogic = $(this); order = 1; @@ -709,7 +670,7 @@ function passwordScore(password, progressbar=null, spanLevel=null) { /** * Decode HTML entities in string like é - * @param string message + * @param message Message to decode */ function decodeHtmlEntities(message) { diff --git a/package-lock.json b/package-lock.json index 2ce80a59c..b653cddfd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -911,11 +911,6 @@ "outlayer": "^2.1.0" } }, - "izitoast": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/izitoast/-/izitoast-1.4.0.tgz", - "integrity": "sha512-Oc1X2wiQtPp39i5VpIjf3GJf5sfCtHKXZ5szx7RareyEeFLUlcEW0FSfBni28+Ul6KNKZRKzhVuWzSP4Xngh0w==" - }, "jquery": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.0.tgz", diff --git a/package.json b/package.json index 694399ffc..36153cd0e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "highcharts": "^7.0.1", "inputmask": "^4.0.2", "isotope-layout": "^3.0.6", - "izitoast": "^1.4.0", "jquery-contextmenu": "^2.5.0", "jquery-cron": "^1.0.0", "jquery-datetimepicker": "^2.5.20", diff --git a/scripts/gen_assets.sh b/scripts/gen_assets.sh index 8c3b40478..92fe163db 100755 --- a/scripts/gen_assets.sh +++ b/scripts/gen_assets.sh @@ -58,7 +58,6 @@ function gen_css { vendor/node_modules/jquery-contextmenu/dist/jquery.contextMenu.css \ vendor/node_modules/tablesorter/dist/css/theme.bootstrap.min.css \ vendor/node_modules/codemirror/lib/codemirror.css \ - vendor/node_modules/izitoast/dist/css/iziToast.css \ vendor/node_modules/@fortawesome/fontawesome-free/css/all.css \ vendor/node_modules/font-awesome/css/font-awesome.css \ vendor/node_modules/jquery-datetimepicker/jquery.datetimepicker.css \ @@ -116,7 +115,6 @@ function gen_js { vendor/node_modules/bootstrap/dist/js/bootstrap.min.js \ vendor/node_modules/pace-js/pace.min.js \ vendor/node_modules/admin-lte/dist/js/adminlte.min.js \ - vendor/node_modules/izitoast/dist/js/iziToast.min.js \ assets/3rdparty/jquery.utils/jquery.utils.js \ assets/3rdparty/jquery.at.caret/jquery.at.caret.min.js \ assets/3rdparty/jquery.multi-column-select/multi-column-select.js \ diff --git a/src/Controller/Pages/FirstUseController.php b/src/Controller/Pages/FirstUseController.php index d36f5e4ec..fb1a67e15 100644 --- a/src/Controller/Pages/FirstUseController.php +++ b/src/Controller/Pages/FirstUseController.php @@ -47,7 +47,6 @@ public static function get(&$pageData): string { $configs = ConfigManager::byKeys([ 'notify::status', - 'notify::position', 'notify::timeout', 'nextdom::firstUse']); if ($configs['nextdom::firstUse'] == 0) { @@ -59,7 +58,6 @@ public static function get(&$pageData): string $pageData[ControllerData::TITLE] = '1ère Connexion'; $pageData[ControllerData::JS_VARS] = [ 'notify_status' => $configs['notify::status'], - 'notify_position' => $configs['notify::position'], 'notify_timeout' => $configs['notify::timeout'], 'serverTZoffsetMin' => Utils::getTZoffsetMin(), 'serverDatetime' => Utils::getMicrotime() diff --git a/src/Helpers/PrepareView.php b/src/Helpers/PrepareView.php index 2c612af58..97a2a5a6e 100755 --- a/src/Helpers/PrepareView.php +++ b/src/Helpers/PrepareView.php @@ -55,7 +55,6 @@ public function initConfig() 'nextdom::firstUse', 'nextdom::Welcome', 'notify::status', - 'notify::position', 'notify::timeout', 'widget::size', 'widget::margin', @@ -139,7 +138,6 @@ private function initJsPool(&$pageData) $pageData[ControllerData::JS_POOL][] = '/vendor/node_modules/bootstrap/dist/js/bootstrap.min.js'; $pageData[ControllerData::JS_POOL][] = '/vendor/node_modules/admin-lte/dist/js/adminlte.min.js'; $pageData[ControllerData::JS_POOL][] = '/vendor/node_modules/pace-js/pace.min.js'; - $pageData[ControllerData::JS_POOL][] = '/vendor/node_modules/izitoast/dist/js/iziToast.min.js'; $pageData[ControllerData::JS_POOL][] = '/assets/3rdparty/jquery.utils/jquery.utils.js'; $pageData[ControllerData::JS_POOL][] = '/assets/3rdparty/jquery.at.caret/jquery.at.caret.min.js'; $pageData[ControllerData::JS_POOL][] = '/assets/3rdparty/jquery.multi-column-select/multi-column-select.js'; @@ -178,12 +176,12 @@ private function initJsPool(&$pageData) $pageData[ControllerData::JS_POOL][] = '/assets/js/core/jeedom.class.js'; // Then NextDom JS files - $pageData[ControllerData::JS_POOL][] = '/public/js/desktop/conflicts.js'; - $pageData[ControllerData::JS_POOL][] = '/public/js/desktop/loads.js'; - $pageData[ControllerData::JS_POOL][] = '/public/js/desktop/inits.js'; - $pageData[ControllerData::JS_POOL][] = '/public/js/desktop/gui.js'; - $pageData[ControllerData::JS_POOL][] = '/public/js/desktop/utils.js'; - $pageData[ControllerData::JS_POOL][] = '/public/js/desktop/search.js'; + $pageData[ControllerData::JS_POOL][] = '/assets/js/desktop/conflicts.js'; + $pageData[ControllerData::JS_POOL][] = '/assets/js/desktop/loads.js'; + $pageData[ControllerData::JS_POOL][] = '/assets/js/desktop/inits.js'; + $pageData[ControllerData::JS_POOL][] = '/assets/js/desktop/gui.js'; + $pageData[ControllerData::JS_POOL][] = '/assets/js/desktop/utils.js'; + $pageData[ControllerData::JS_POOL][] = '/assets/js/desktop/search.js'; $pageData[ControllerData::JS_POOL][] = '/assets/js/desktop/jeedomCompatibility.js'; // And libraries JS @@ -439,7 +437,6 @@ public function showContent() 'user_login' => UserManager::getStoredUser()->getLogin(), 'nextdom_Welcome' => $this->currentConfig['nextdom::Welcome'], 'notify_status' => $this->currentConfig['notify::status'], - 'notify_position' => $this->currentConfig['notify::position'], 'notify_timeout' => $this->currentConfig['notify::timeout'], 'widget_size' => $this->currentConfig['widget::size'], 'widget_margin' => $this->currentConfig['widget::margin'], diff --git a/views/desktop/params/profils.html.twig b/views/desktop/params/profils.html.twig index 71c32f29a..d6d5ac3d9 100644 --- a/views/desktop/params/profils.html.twig +++ b/views/desktop/params/profils.html.twig @@ -323,20 +323,6 @@
{{ 'Notifications système' }}
-
- -
- - -
-