From 582373ea0af6acfed1563fea5985f7e232603700 Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Fri, 9 Aug 2024 22:55:23 +0200 Subject: [PATCH 001/135] rework jeeasyV2, with fullScreen wizard --- core/img/arrow.svg | 97 ++++++++++++++++++++++ desktop/js/jeeasy.js | 11 +++ desktop/modal/welcome.php | 169 +++++++++++++++++++++++++++++++++----- desktop/php/jeeasy.php | 6 ++ 4 files changed, 261 insertions(+), 22 deletions(-) create mode 100644 core/img/arrow.svg diff --git a/core/img/arrow.svg b/core/img/arrow.svg new file mode 100644 index 0000000..abddc04 --- /dev/null +++ b/core/img/arrow.svg @@ -0,0 +1,97 @@ + + + + + + + + diff --git a/desktop/js/jeeasy.js b/desktop/js/jeeasy.js index c5f6fa2..2692f67 100755 --- a/desktop/js/jeeasy.js +++ b/desktop/js/jeeasy.js @@ -51,6 +51,17 @@ $('#bt_jeeasyEqLogicConfiguration').on('click', function() { }) }) + + + + +document.getElementById('bt_jeeasyWizardV2').addEventListener('click', function() { + var url = 'index.php?v=d&p=modaldisplay&loadmodal=welcome&plugin=jeeasy'; + window.open(url).focus() +}) + + + $('#bt_jeeasyIncludeConfiguration').on('click', function() { bootbox.prompt({ title: "{{Très bien ajoutons un module à votre domotique. Quelle est sa technologie}} ?", diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 50d4cda..7f49afe 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -1,29 +1,154 @@ -jeeasy::initStartBox(); + + +
+ +

{{Assistant de configuration}}

+ Product Image +

{{Ce guide va vous aider à configurer votre}} {{en quelques étapes.}}

+ +
+

{{IL EST IMPORTANT DE TERMINER CETTE CONFIGURATION}}

+

{{Plusieurs plugins essentiels seront installés durant le processus.}}

+
+

{{Cliquez sur la flèche pour commencer la configuration.}}

+ +
+ + + -
-
-

{{Guide de démarrage}}

-
-
-
-


{{Ce guide va vous aider à configurer votre}} {{en quelques étapes.}}

-


{{Cliquez sur la flèche pour commencer la configuration.}}

-
-
-

{{IL EST IMPORTANT DE TERMINER CETTE CONFIGURATION : plusieurs plugins essentiels seront installés durant le processus.}}

-

{{Ne fermez pas cette fenetre jusqu'a son terme.}}

-
-
- - - \ No newline at end of file diff --git a/desktop/php/jeeasy.php b/desktop/php/jeeasy.php index 5a9a361..407a793 100755 --- a/desktop/php/jeeasy.php +++ b/desktop/php/jeeasy.php @@ -11,6 +11,12 @@
{{Bienvenue sur la configuration facile avec Jeeasy}} +
+ +
+ {{Jeeasy V2}} +
+

From a948c2364815fe5223b3b0d3da0313d2d41680b7 Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Fri, 9 Aug 2024 23:30:18 +0200 Subject: [PATCH 002/135] add carousel --- desktop/modal/load_page.php | 22 ++++++++++++++ desktop/modal/welcome.php | 57 +++++++++++++++++++++++++++++++++---- 2 files changed, 73 insertions(+), 6 deletions(-) create mode 100644 desktop/modal/load_page.php diff --git a/desktop/modal/load_page.php b/desktop/modal/load_page.php new file mode 100644 index 0000000..bbc08d2 --- /dev/null +++ b/desktop/modal/load_page.php @@ -0,0 +1,22 @@ + \ No newline at end of file diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 7f49afe..110b8fb 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -114,14 +114,29 @@ background-color: transparent !important; } - /* #div_mainContainer{ - background-color: white !important; - } + .carousel-dots { + display: flex; + justify-content: center; + margin-top: 20px; + } - #div_pageContainer{ - background-color: white !important; - } */ + .dot { + width: 20px; + height: 20px; + margin: 0 5px; + background-color: #007bff; + border-radius: 50%; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + color: white; + font-size: 14px; + } + .dot:hover { + background-color: #0056b3; + } @@ -140,6 +155,7 @@
-->
+ From 69abb88a2554103341bd1c0a37d9bcd774277cdd Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Sat, 10 Aug 2024 12:33:38 +0200 Subject: [PATCH 003/135] fid carouselDots with fetch page data --- desktop/modal/welcome.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 110b8fb..9186ea7 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -36,6 +36,9 @@ } .container { height: 100%; + min-height: 500px; + /* height: 1200px; + width: 570px; */ text-align: center; background: white; padding: 20px; @@ -124,7 +127,7 @@ width: 20px; height: 20px; margin: 0 5px; - background-color: #007bff; + background-color: #94CA02; border-radius: 50%; cursor: pointer; display: flex; @@ -186,10 +189,22 @@ }); function loadPageContent(page) { + const initialWidth = contentContainer.offsetWidth; + const initialHeight = contentContainer.offsetHeight; + fetch(page) .then(response => response.text()) .then(data => { - contentContainer.innerHTML = data; + if (page === 'index.php?v=d&plugin=jeeasy&modal=welcome') { + const parser = new DOMParser(); + const doc = parser.parseFromString(data, 'text/html'); + const newContent = doc.querySelector('.container').innerHTML; + contentContainer.innerHTML = newContent; + } else { + contentContainer.innerHTML = data; + contentContainer.style.width = initialWidth + 'px'; + contentContainer.style.height = initialHeight + 'px'; + } }) .catch(error => console.error('Erreur sur le chargement de la page:', error)); } From 8902212f24e54d60c2ff385dc28d3c83a8a923c3 Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Sat, 10 Aug 2024 12:38:49 +0200 Subject: [PATCH 004/135] add event propagation, and exit button on loaded pages --- desktop/modal/welcome.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 9186ea7..8cc8db3 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -164,10 +164,13 @@ \ No newline at end of file + diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index b6d713b..09b8aec 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -1,259 +1,108 @@ - - -
- -

{{Assistant de configuration}}

- Product Image -

{{Ce guide va vous aider à configurer votre}} {{en quelques étapes.}}

- -
-

{{IL EST IMPORTANT DE TERMINER CETTE CONFIGURATION}}

-

{{Plusieurs plugins essentiels seront installés durant le processus.}}

-
-

{{Cliquez sur la flèche pour commencer la configuration.}}

- -
+ - - - - - + }) + .catch(error => console.error('{{Erreur au chargement de la page}}:', error)); + } + From c2ea75c4357b1e6cdbed1e742c69d7cee0f5f7ca Mon Sep 17 00:00:00 2001 From: Salvialf Date: Sun, 11 Aug 2024 13:32:45 +0200 Subject: [PATCH 009/135] remove unused changeBoxName --- core/ajax/jeeasy.ajax.php | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/core/ajax/jeeasy.ajax.php b/core/ajax/jeeasy.ajax.php index 9aea823..e7a843c 100755 --- a/core/ajax/jeeasy.ajax.php +++ b/core/ajax/jeeasy.ajax.php @@ -34,8 +34,6 @@ ajax::success(jeeasy::sendObjects(init('objects'))); } - - if (init('action') == 'choiceLanguageJeeasy') { ajax::success(jeeasy::changeLanguage(init('choice'))); } @@ -44,27 +42,14 @@ ajax::success(jeeasy::dns_Go()); } - - - - - if (init('action') == 'changeBoxName') { - if (init('choice') != '') { - $sanitizeString = htmlspecialchars(init('choice'), ENT_NOQUOTES, 'UTF-8'); - config::save('name', $sanitizeString); - } - ajax::success(); - } - - if (init('action') == 'installPlugin') { if (init('branch')) { $checkInstall = jeeasy::checkInstallPlugin(init('id'), init('branch')); } else { - if(config::byKey('core::branch') == 'beta' || config::byKey('core::branch') == 'alpha'){ - $checkInstall = jeeasy::checkInstallPlugin(init('id'), 'beta'); - }else{ - $checkInstall = jeeasy::checkInstallPlugin(init('id')); + if (config::byKey('core::branch') == 'beta' || config::byKey('core::branch') == 'alpha') { + $checkInstall = jeeasy::checkInstallPlugin(init('id'), 'beta'); + } else { + $checkInstall = jeeasy::checkInstallPlugin(init('id')); } } if ($checkInstall == 'OK') { From bba86d3fb7d1b353c899742dbb4d0ea1630188cc Mon Sep 17 00:00:00 2001 From: Salvialf Date: Sun, 11 Aug 2024 13:58:37 +0200 Subject: [PATCH 010/135] quit btn outside container --- desktop/css/jeeasy.welcome.css | 6 ++++++ desktop/modal/boxName.php | 2 +- desktop/modal/welcome.php | 10 +++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/desktop/css/jeeasy.welcome.css b/desktop/css/jeeasy.welcome.css index 688b08a..dc70ce0 100644 --- a/desktop/css/jeeasy.welcome.css +++ b/desktop/css/jeeasy.welcome.css @@ -16,6 +16,12 @@ border-radius: 8px; } +#bt_quitJeeasyWizard { + position: absolute; + top: 5%; + right: 5%; +} + #jeeasy_container { min-height: 500px; } diff --git a/desktop/modal/boxName.php b/desktop/modal/boxName.php index 093a406..fdc8f05 100755 --- a/desktop/modal/boxName.php +++ b/desktop/modal/boxName.php @@ -16,7 +16,7 @@ ?>

{{Nom de l'installation}}

-Product Image +Product Image

{{Le nom de votre box est}} :

{{Vous pouvez changer le nom de votre box ou passer à l'étape suivante.}}

diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 09b8aec..a8f79cf 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -10,22 +10,22 @@ ?>
- +

{{Assistant de configuration}}

- Product Image + Product Image

{{Bienvenue dans l'assistant de configuration}} .

{{Configurez facilement votre installation domotique en suivant les étapes de cet assistant.}}

{{Cliquez sur la flèche pour commencer...}}

+ +
-->
- -
-
-
-

-

{{Langage Systeme}}

-

-

-

-

- - -
- -
- - -
- - -
-

{{Cliquez sur la flèche pour ignorer}}

-
+

{{Choix de la langue}}

+Product Image +

+ {{Vous pouvez changer la langue de votre box ou passer à l'étape suivante}} +

+
+ + + +
- - - \ No newline at end of file + From 68e6efc88ccae73df20d85aee2d2466ddc564862 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Sun, 11 Aug 2024 17:56:26 +0200 Subject: [PATCH 019/135] remove unused changeLanguage --- core/ajax/jeeasy.ajax.php | 4 --- core/class/jeeasy.class.php | 51 ++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 33 deletions(-) diff --git a/core/ajax/jeeasy.ajax.php b/core/ajax/jeeasy.ajax.php index e7a843c..bc44a95 100755 --- a/core/ajax/jeeasy.ajax.php +++ b/core/ajax/jeeasy.ajax.php @@ -34,10 +34,6 @@ ajax::success(jeeasy::sendObjects(init('objects'))); } - if (init('action') == 'choiceLanguageJeeasy') { - ajax::success(jeeasy::changeLanguage(init('choice'))); - } - if (init('action') == 'dnsInstall') { ajax::success(jeeasy::dns_Go()); } diff --git a/core/class/jeeasy.class.php b/core/class/jeeasy.class.php index 9728e65..c7a8fd2 100755 --- a/core/class/jeeasy.class.php +++ b/core/class/jeeasy.class.php @@ -45,10 +45,10 @@ public static function discoverNetwork() { continue; } if (strpos($line, 'MAC Address') !== false) { - $name = substr($line, ($p = strpos($line, '(')+1), strrpos($line, ')')-$p); + $name = substr($line, ($p = strpos($line, '(') + 1), strrpos($line, ')') - $p); preg_match('/MAC Address: (.*?) \((.*?)\)/', $line, $matches); $return[$matches[1]] = array('name' => $matches[2], 'ip' => $previous); - // $name = $matches[2]; + // $name = $matches[2]; $mac = $matches[1]; $ip = $previous; $arrayTemp = array('mac' => $mac, 'ip' => $ip); @@ -88,12 +88,6 @@ public static function generateScenario($_name, $_replace = array()) { return json_decode(str_replace(array_keys($_replace), $_replace, json_encode(json_decode(file_get_contents(__DIR__ . '/../config/' . $_name . '.json'), true))), true); } - public static function changeLanguage($choice) { - if ($choice != '') { - config::save('language', $choice); - } - } - public static function saveJson($_json) { $jsonFile = __DIR__ . '/../../../../data/custom/wizard.json'; if (!$fh = fopen($jsonFile, 'w')) { @@ -180,13 +174,13 @@ public static function sendObjects($_objects) { 'name' => 'Travail', 'image' => 'core/img/object_background/bureau/bureau_1.jpg', 'icon' => '' - ), + ), 'basement' => array( 'name' => 'Batiment', 'image' => 'core/img/object_background/batiment/industrial_building.jpg', 'icon' => '' ) - + ); $_objects = json_decode($_objects, true); @@ -290,20 +284,20 @@ public static function generateObject() { } public static function checkPlugin($_plugin) { - if($_plugin == 'openvpn'){ - $plugin = $_plugin; - }else{ - $plugin = plugin::byId($_plugin); + if ($_plugin == 'openvpn') { + $plugin = $_plugin; + } else { + $plugin = plugin::byId($_plugin); } if (!is_object($plugin)) { $plugin = $_plugin; } - if(config::byKey('core::branch') == 'beta' || config::byKey('core::branch') == 'alpha'){ - self::checkInstallPlugin($plugin, 'beta'); - }else{ - self::checkInstallPlugin($plugin); - } + if (config::byKey('core::branch') == 'beta' || config::byKey('core::branch') == 'alpha') { + self::checkInstallPlugin($plugin, 'beta'); + } else { + self::checkInstallPlugin($plugin); + } self::checkDependancyPlugin($plugin); self::checkDeamonPlugin($plugin); } @@ -382,10 +376,10 @@ public static function configInternalPlugin($typeConfig, $key, $plugin) { } } - public static function initStartBox(){ + public static function initStartBox() { log::removeAll(); log::add('jeeasy', 'debug', 'initStartBox'); - if(config::byKey('jeedom::firstUse') == 1){ + if (config::byKey('jeedom::firstUse') == 1) { config::save('api', config::genKey()); config::save('apimarket', config::genKey()); config::save('apipro', config::genKey()); @@ -397,14 +391,13 @@ public static function initStartBox(){ public static function dns_Go() { repo_market::test(); - try{ - jeeasy::checkPlugin('openvpn'); - sleep(10); - config::save('market::allowDNS',1); - network::dns_start(); - }catch (Exception $e) { - log::add('jeeasy', 'debug', 'erreur DNS > '.$e); - + try { + jeeasy::checkPlugin('openvpn'); + sleep(10); + config::save('market::allowDNS', 1); + network::dns_start(); + } catch (Exception $e) { + log::add('jeeasy', 'debug', 'erreur DNS > ' . $e); } sleep(2); repo_market::test(); From 9cda6c1df22342d5f8e4407363c3c1d6a6c76d51 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Sun, 11 Aug 2024 17:56:47 +0200 Subject: [PATCH 020/135] typo wizard --- core/data/wizard.json | 88 ++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 56 deletions(-) diff --git a/core/data/wizard.json b/core/data/wizard.json index d692f59..cb05fe2 100755 --- a/core/data/wizard.json +++ b/core/data/wizard.json @@ -1,113 +1,89 @@ { -"trame": { - "welcome" : - { - "title": "Bienvenue", + "trame": { + "welcome": { + "title": "{{Accueil}}", "wizard": "welcome", "order": 0, "custom": "", "visible": 1 - } - , - "language" : - { - "title": "Choix de la langue", + }, + "language": { + "title": "{{Choix de la langue}}", "wizard": "language", "order": 1, "custom": "", "visible": 1 - } - , - "boxName" : - { - "title": "Nommez votre box", + }, + "boxName": { + "title": "{{Nom de l'installation}}", "wizard": "boxName", "order": 2, "custom": "", "visible": 1 }, - - "objects" : { - + "objects": { "title": "Pièces", "wizard": "objects", "order": 3, "custom": "", "visible": 1 - - }, - "dnsGo" : { - + }, + "dnsGo": { "title": "OpenVPN", "wizard": "dnsGo", "order": 4, "custom": "", "visible": 1 - - }, - "pack" : - { + }, + "pack": { "title": "Service pack", "wizard": "pack", "order": 5, "custom": "", "visible": 1 - } - , - "pluginsConfigs" : - { + }, + "pluginsConfigs": { "title": "Configuration des plugins", "wizard": "pluginsConfigs", "order": 6, "custom": "", "visible": 1 - } - , - "services" : - { + }, + "services": { "title": "Services", "wizard": "services", "order": 7, "custom": "", "visible": 1 - } - , - "backupCloud" : - { - "title": "BackupCloud", - "wizard": "backupCloud", - "order": 8, - "custom": "", - "visible": 1 - } -, - "assistants" : - { + }, + "backupCloud": { + "title": "BackupCloud", + "wizard": "backupCloud", + "order": 8, + "custom": "", + "visible": 1 + }, + "assistants": { "title": "Assistants Vocaux", "wizard": "assistants", "order": 9, "custom": "", "visible": 1 - } - , - "atlas" : - { - "title": "Options Atlas", + }, + "atlas": { + "title": "Options Atlas", "wizard": "atlas", "order": 10, "custom": "", "visible": 1 - } - , - "ready" : - { + }, + "ready": { "title": "Prêt à démarrer", "wizard": "ready", "order": 11, "custom": "", "visible": 1 } - }, "update": 1 } From eb21388337972f5acc8b9688bba3f89f224fd3f1 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Sun, 11 Aug 2024 18:06:52 +0200 Subject: [PATCH 021/135] box == installation --- desktop/modal/boxName.php | 6 +++--- desktop/modal/language.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/modal/boxName.php b/desktop/modal/boxName.php index 3f4a510..f6f7d71 100755 --- a/desktop/modal/boxName.php +++ b/desktop/modal/boxName.php @@ -18,9 +18,9 @@

{{Nom de l'installation}}

Product Image

- {{Vous pouvez changer le nom de votre box ou passer à l'étape suivante}} + {{Vous pouvez changer le nom de votre installation ou passer à l'étape suivante}}

-

{{Le nom de votre box est}} :

+

{{Le nom de votre installation est}} :

@@ -43,7 +43,7 @@ }, success: function() { jeedomUtils.showAlert({ - message: '{{Le nouveau nom de votre box est}} : ' + newBoxName + '', + message: '{{Le nouveau nom de votre installation est}} : ' + newBoxName + '', level: 'success', timeOut: 3000 }) diff --git a/desktop/modal/language.php b/desktop/modal/language.php index 8a17b94..4bae925 100755 --- a/desktop/modal/language.php +++ b/desktop/modal/language.php @@ -9,7 +9,7 @@

{{Choix de la langue}}

Product Image

- {{Vous pouvez changer la langue de votre box ou passer à l'étape suivante}} + {{Vous pouvez changer la langue de votre installation ou passer à l'étape suivante}}

+
+

{{Nom actuel de votre installation}} :

diff --git a/desktop/modal/personnalInfos.php b/desktop/modal/personnalInfos.php index dc430d9..d19e728 100644 --- a/desktop/modal/personnalInfos.php +++ b/desktop/modal/personnalInfos.php @@ -4,25 +4,18 @@ } ?> - - - - - - Informations Personnelles - - +
diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 85d84fe..71b5be8 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -3,11 +3,51 @@ throw new Exception('{{401 - Accès non autorisé}}'); } include_file('desktop', 'jeeasy.welcome', 'css', 'jeeasy'); -if (file_exists(config::byKey('path_wizard'))) { - $wizard = json_decode(file_get_contents(config::byKey('path_wizard')), true); -} else { - $wizard = json_decode(file_get_contents('plugins/jeeasy/core/data/wizard.json'), true); -} + +// On utilise le wizard du plugin, celui du core sautera, et ca sera plus simple a maintenir ^^ + +// if (file_exists(config::byKey('path_wizard'))) { +// $wizard = json_decode(file_get_contents(config::byKey('path_wizard')), true); +// } else { +// $wizard = json_decode(file_get_contents('plugins/jeeasy/core/data/wizard.json'), true); +// } + +$productName = jeedom::getHardwareName(); +$wizard = json_decode(file_get_contents('plugins/jeeasy/core/data/wizard.json'), true); + +switch($productName) { + case 'Atlas': + $wizard['trame']['atlas'] = [ + 'title' => 'Options Atlas', + 'wizard' => 'atlas', + 'order' => 11, + 'custom' => '', + 'visible' => 1 + ]; + break; + case 'Luna': + unset($wizard['trame']['atlas']); + $wizard['trame']['luna'] = [ + 'title' => 'Options Luna', + 'wizard' => 'luna', + 'order' => 11, + 'custom' => '', + 'visible' => 1 + ]; + break; + default: + // prevoir screen pour DIY + unset($wizard['trame']['atlas']); + $wizard['trame']['diy'] = [ + 'title' => 'Options Diy', + 'wizard' => 'diy', + 'order' => 11, + 'custom' => '', + 'visible' => 1 + ]; + break; +}; + $steps = $wizard['trame']; usort($steps, function ($step1, $step2) { return $step1['order'] <=> $step2['order']; @@ -135,7 +175,7 @@ function loadPageContent(_page) { newScript.textContent = script.textContent; } document.getElementById('jeeasy_wizard').appendChild(newScript) - document.getElementById('jeeasy_wizard').removeChild(newScript) // Optionnel : pour éviter d'encombrer le DOM + document.getElementById('jeeasy_wizard').removeChild(newScript) }); }) .catch(error => console.error('{{Erreur au chargement de la page}}:', error)); From ce32960ab9e96f8fc45bbcd6c4f2ac3e335687f0 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Mon, 12 Aug 2024 11:19:53 +0200 Subject: [PATCH 032/135] static getWizard --- core/class/jeeasy.class.php | 14 ++++++++ desktop/modal/welcome.php | 69 ++++++++----------------------------- 2 files changed, 29 insertions(+), 54 deletions(-) diff --git a/core/class/jeeasy.class.php b/core/class/jeeasy.class.php index c7a8fd2..10591e0 100755 --- a/core/class/jeeasy.class.php +++ b/core/class/jeeasy.class.php @@ -22,6 +22,20 @@ class jeeasy extends eqLogic { + public static function getWizard() { + if (file_exists(config::byKey('path_wizard'))) { + $wizard = json_decode(file_get_contents(config::byKey('path_wizard')), true); + } else { + $wizard = json_decode(file_get_contents('plugins/jeeasy/core/data/wizard.json'), true); + } + + $steps = $wizard['trame']; + usort($steps, function ($step1, $step2) { + return $step1['order'] <=> $step2['order']; + }); + return $steps; + } + public static function discoverNetwork() { global $JEEDOM_JEEASY_DISCOVER; $gw = shell_exec("ip route show default | awk '/default/ {print $3}'"); diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 71b5be8..5c199cd 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -3,58 +3,10 @@ throw new Exception('{{401 - Accès non autorisé}}'); } include_file('desktop', 'jeeasy.welcome', 'css', 'jeeasy'); - -// On utilise le wizard du plugin, celui du core sautera, et ca sera plus simple a maintenir ^^ - -// if (file_exists(config::byKey('path_wizard'))) { -// $wizard = json_decode(file_get_contents(config::byKey('path_wizard')), true); -// } else { -// $wizard = json_decode(file_get_contents('plugins/jeeasy/core/data/wizard.json'), true); -// } - -$productName = jeedom::getHardwareName(); -$wizard = json_decode(file_get_contents('plugins/jeeasy/core/data/wizard.json'), true); - -switch($productName) { - case 'Atlas': - $wizard['trame']['atlas'] = [ - 'title' => 'Options Atlas', - 'wizard' => 'atlas', - 'order' => 11, - 'custom' => '', - 'visible' => 1 - ]; - break; - case 'Luna': - unset($wizard['trame']['atlas']); - $wizard['trame']['luna'] = [ - 'title' => 'Options Luna', - 'wizard' => 'luna', - 'order' => 11, - 'custom' => '', - 'visible' => 1 - ]; - break; - default: - // prevoir screen pour DIY - unset($wizard['trame']['atlas']); - $wizard['trame']['diy'] = [ - 'title' => 'Options Diy', - 'wizard' => 'diy', - 'order' => 11, - 'custom' => '', - 'visible' => 1 - ]; - break; -}; - -$steps = $wizard['trame']; -usort($steps, function ($step1, $step2) { - return $step1['order'] <=> $step2['order']; -}); +$steps = jeeasy::getWizard(); ?> - +
@@ -126,19 +78,28 @@ }) document.getElementById('bt_quitJeeasyWizard').addEventListener('click', function() { - let confirm = "{{Voulez-vous vraiment quitter l'assistant de configuration?}}" + let confirm = "{{Voulez-vous vraiment annuler l'assistant de configuration?}}" confirm += '

' confirm += '
{{Certaines configurations ne seront pas effectuées et plusieurs plugins essentiels ne seront pas installés!}}
' bootbox.confirm(confirm, function(result) { if (result) { + jeedom.config.save({ + configuration: { + 'jeedom::firstUse': 0 + } + }) loadPage('index.php?v=d&p=dashboard') } }) }) document.getElementById('bt_jeedom_ready').addEventListener('click', function() { - // set jeedomm::firstUse to 0 - // load dashboard + jeedom.config.save({ + configuration: { + 'jeedom::firstUse': 0 + } + }) + loadPage('index.php?v=d&p=dashboard') }) function loadPageContent(_page) { @@ -175,7 +136,7 @@ function loadPageContent(_page) { newScript.textContent = script.textContent; } document.getElementById('jeeasy_wizard').appendChild(newScript) - document.getElementById('jeeasy_wizard').removeChild(newScript) + document.getElementById('jeeasy_wizard').removeChild(newScript) }); }) .catch(error => console.error('{{Erreur au chargement de la page}}:', error)); From 2ad8d2e4648d876975cb3a3fcb7761f0647882e6 Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Mon, 12 Aug 2024 11:23:27 +0200 Subject: [PATCH 033/135] update misc.php --- desktop/modal/misc.php | 107 +++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/desktop/modal/misc.php b/desktop/modal/misc.php index 868c913..61b72c5 100644 --- a/desktop/modal/misc.php +++ b/desktop/modal/misc.php @@ -3,6 +3,7 @@ throw new Exception('{{401 - Accès non autorisé}}'); } +$jeedomTheme = config::byKey('jeedom_theme_main'); ?> @@ -75,76 +76,78 @@ From 6499b0d4aa41025acc8bfe143de2369e0ecc3abe Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Mon, 12 Aug 2024 11:29:46 +0200 Subject: [PATCH 034/135] update misc --- desktop/modal/misc.php | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) diff --git a/desktop/modal/misc.php b/desktop/modal/misc.php index 61b72c5..3a5fee2 100644 --- a/desktop/modal/misc.php +++ b/desktop/modal/misc.php @@ -7,18 +7,16 @@ ?> -

{{Parametres optionnels}}

+ Product Image
-
+

-
- -


@@ -27,36 +25,11 @@
- -
- - +

{{Choix du thème}}

+Product Image +

+ {{Vous pouvez changer le thème de votre installation ou passer à l'étape suivante}} +

+
+
+ {{Thème actuel}} + +
diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 5c199cd..c05474b 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -8,10 +8,10 @@ -
+

{{Assistant de configuration}}

- Product Image + Product Image

{{Bienvenue dans l'assistant de configuration}} .

{{Configurez facilement votre installation en suivant les étapes de cet assistant interactif.}}


From 6e9ff84a2278326c543181aa007906887bf2745f Mon Sep 17 00:00:00 2001 From: Salvialf Date: Mon, 12 Aug 2024 12:53:59 +0200 Subject: [PATCH 037/135] no success alert --- desktop/modal/boxName.php | 5 ----- desktop/modal/language.php | 5 ----- desktop/modal/theme.php | 1 - 3 files changed, 11 deletions(-) diff --git a/desktop/modal/boxName.php b/desktop/modal/boxName.php index ef1c364..ff54318 100755 --- a/desktop/modal/boxName.php +++ b/desktop/modal/boxName.php @@ -43,11 +43,6 @@ }) }, success: function() { - jeedomUtils.showAlert({ - message: '{{Le nouveau nom de votre installation est}} : ' + newBoxName + '', - level: 'success', - timeOut: 3000 - }) document.getElementById('boxName').innerText = newBoxName document.getElementById('in_boxName').value = '' } diff --git a/desktop/modal/language.php b/desktop/modal/language.php index a244fc9..d5df68e 100755 --- a/desktop/modal/language.php +++ b/desktop/modal/language.php @@ -40,11 +40,6 @@ }) }, success: function() { - jeedomUtils.showAlert({ - message: '{{La langue a été changée}}', - level: 'success', - timeOut: 3000 - }) document.getElementById('in_language').value = newLanguage } }) diff --git a/desktop/modal/theme.php b/desktop/modal/theme.php index e24f859..83ec140 100644 --- a/desktop/modal/theme.php +++ b/desktop/modal/theme.php @@ -23,7 +23,6 @@ From 358470713d2cf7b3d5f27b0ca117cb407b9a3900 Mon Sep 17 00:00:00 2001 From: "Julien C." Date: Mon, 12 Aug 2024 15:24:22 +0200 Subject: [PATCH 039/135] new interfacesPage --- core/data/wizard.json | 29 +++++++++++------- desktop/modal/interface.php | 59 +++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 11 deletions(-) create mode 100644 desktop/modal/interface.php diff --git a/core/data/wizard.json b/core/data/wizard.json index ba6a395..bc0e1ef 100755 --- a/core/data/wizard.json +++ b/core/data/wizard.json @@ -21,73 +21,80 @@ "custom": "", "visible": 1 }, + "interface": { + "title": "{{Personnalisation de l'interface}}", + "wizard": "interface", + "order": 3, + "custom": "", + "visible": 1 + }, "boxName": { "title": "{{Nom de l'installation}}", "wizard": "boxName", - "order": 3, + "order": 4, "custom": "", "visible": 1 }, "objects": { "title": "Pièces", "wizard": "objects", - "order": 4, + "order": 5, "custom": "", "visible": 1 }, "dnsGo": { "title": "OpenVPN", "wizard": "dnsGo", - "order": 5, + "order": 6, "custom": "", "visible": 1 }, "pack": { - "title": "Service pack", + "title": "Installation de plugins", "wizard": "pack", - "order": 6, + "order": 7, "custom": "", "visible": 1 }, "pluginsConfigs": { "title": "Configuration des plugins", "wizard": "pluginsConfigs", - "order": 7, + "order": 8, "custom": "", "visible": 1 }, "services": { "title": "Services", "wizard": "services", - "order": 8, + "order": 9, "custom": "", "visible": 1 }, "backupCloud": { "title": "BackupCloud", "wizard": "backupCloud", - "order": 9, + "order": 10, "custom": "", "visible": 1 }, "assistants": { "title": "Assistants Vocaux", "wizard": "assistants", - "order": 10, + "order": 11, "custom": "", "visible": 1 }, "atlas": { "title": "Options Atlas", "wizard": "atlas", - "order": 11, + "order": 12, "custom": "", "visible": 1 }, "ready": { "title": "Prêt à démarrer", "wizard": "ready", - "order": 12, + "order": 13, "custom": "", "visible": 1 } diff --git a/desktop/modal/interface.php b/desktop/modal/interface.php new file mode 100644 index 0000000..4a42959 --- /dev/null +++ b/desktop/modal/interface.php @@ -0,0 +1,59 @@ + + +

{{Personnalisation de l'interface}}

+ Product Image +
+ + + + + + + From e3fe60b2d81b6c594cf9a2ce2073921a17436f67 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Mon, 12 Aug 2024 16:19:29 +0200 Subject: [PATCH 040/135] display grid --- desktop/css/jeeasy.welcome.css | 20 ++++++++++++++------ desktop/modal/boxName.php | 22 ++++++++++++---------- desktop/modal/language.php | 34 ++++++++++++++++++---------------- desktop/modal/ready.php | 2 +- desktop/modal/theme.php | 22 ++++++++++++---------- desktop/modal/welcome.php | 10 ++++++---- 6 files changed, 63 insertions(+), 47 deletions(-) diff --git a/desktop/css/jeeasy.welcome.css b/desktop/css/jeeasy.welcome.css index 37ba4eb..da016da 100644 --- a/desktop/css/jeeasy.welcome.css +++ b/desktop/css/jeeasy.welcome.css @@ -24,17 +24,25 @@ #jeeasy_container { min-height: 600px; - display: flex; - flex-direction: column; - align-items: center; + display: grid; + justify-items: center; + grid-template-columns: 100%; + grid-template-rows: 75px auto max-content; } -#jeeasy_container .input-group { - max-width: 350px; +#jeeasy_container>h3 { + grid-row-start: 1 } -#jeeasy_container img { +#jeeasy_container>img { max-width: 400px; + max-height: 250px; + grid-row-start: 2 +} + +#jeeasy_container .input-group { + max-width: 350px; + margin: auto; } #jeeasy_navigation { diff --git a/desktop/modal/boxName.php b/desktop/modal/boxName.php index ff54318..0b2837f 100755 --- a/desktop/modal/boxName.php +++ b/desktop/modal/boxName.php @@ -17,17 +17,19 @@

{{Nom de l'installation}}

Product Image -

- {{Vous pouvez changer le nom de votre installation ou passer à l'étape suivante}} -

-
-
- - - - +
+

+ {{Vous pouvez changer le nom de votre installation ou passer à l'étape suivante}} +

+
+
+ + + + +
+

{{Nom actuel}} :

-

{{Nom actuel}} :

diff --git a/desktop/modal/language.php b/desktop/modal/language.php index aaa51b8..00a6a32 100755 --- a/desktop/modal/language.php +++ b/desktop/modal/language.php @@ -26,21 +26,8 @@ diff --git a/desktop/modal/theme.php b/desktop/modal/theme.php index 858fd82..5f843ea 100644 --- a/desktop/modal/theme.php +++ b/desktop/modal/theme.php @@ -21,22 +21,8 @@ diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 5054881..b251947 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -135,10 +135,8 @@ confirm += '
{{Certaines configurations ne seront pas effectuées et plusieurs plugins essentiels ne seront pas installés!}}
' bootbox.confirm(confirm, function(result) { if (result) { - jeedom.config.save({ - configuration: { - 'jeedom::firstUse': 0 - } + configSave({ + 'jeedom::firstUse': 0 }) loadPage('index.php?v=d&p=dashboard') } @@ -146,10 +144,8 @@ }) document.getElementById('bt_jeedom_ready').addEventListener('click', function() { - jeedom.config.save({ - configuration: { - 'jeedom::firstUse': 0 - } + configSave({ + 'jeedom::firstUse': 0 }) loadPage('index.php?v=d&p=dashboard') }) @@ -195,4 +191,24 @@ function loadPageContent(_step) { }) .catch(error => console.error('{{Erreur au chargement de la page}}:', error)) } + + function configSave(_configuration) { + jeedom.config.save({ + configuration: _configuration, + error: function(_error) { + jeedomUtils.showAlert({ + message: _error.message, + level: 'danger' + }) + }, + success: function() { + let step = getUrlVars('step') + switch (step) { + case 'language': + loadPageContent(step) + break; + } + } + }) + } From 4c95c5def6444da6b58ba7e98c4d9365c542cc0e Mon Sep 17 00:00:00 2001 From: Salvialf Date: Mon, 12 Aug 2024 20:28:16 +0200 Subject: [PATCH 047/135] exitJeeasy function --- desktop/modal/welcome.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index b251947..a55c7a9 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -135,19 +135,13 @@ confirm += '
{{Certaines configurations ne seront pas effectuées et plusieurs plugins essentiels ne seront pas installés!}}
' bootbox.confirm(confirm, function(result) { if (result) { - configSave({ - 'jeedom::firstUse': 0 - }) - loadPage('index.php?v=d&p=dashboard') + exitJeeasy() } }) }) document.getElementById('bt_jeedom_ready').addEventListener('click', function() { - configSave({ - 'jeedom::firstUse': 0 - }) - loadPage('index.php?v=d&p=dashboard') + exitJeeasy() }) function loadPageContent(_step) { @@ -211,4 +205,11 @@ function configSave(_configuration) { } }) } + + function exitJeeasy() { + configSave({ + 'jeedom::firstUse': 0 + }) + loadPage('index.php?v=d&p=dashboard') + } From 5c25555f4bd1e2e2b3aacb515649b99c67f89002 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Mon, 12 Aug 2024 20:36:15 +0200 Subject: [PATCH 048/135] dedicated js file --- desktop/js/modal.welcome.js | 169 ++++++++++++++++++++++++++++++++++ desktop/modal/welcome.php | 174 +----------------------------------- 2 files changed, 170 insertions(+), 173 deletions(-) create mode 100644 desktop/js/modal.welcome.js diff --git a/desktop/js/modal.welcome.js b/desktop/js/modal.welcome.js new file mode 100644 index 0000000..b7b318e --- /dev/null +++ b/desktop/js/modal.welcome.js @@ -0,0 +1,169 @@ +var contentContainer = document.getElementById('jeeasy_container') + +let currentStep = getUrlVars('step') +if (currentStep && currentStep != 'welcome') { + contentContainer.empty() + document.querySelectorAll('.navDot.active').removeClass('active') + document.querySelector('.navDot[data-step="' + currentStep + '"]').addClass('active') + loadPageContent(currentStep) +} + +var slideOut = { + opacity: [1, 0], + transform: ['translateX(0)', 'translateX(-10%)'] +} +var slideIn = { + opacity: [0, 1], + transform: ['translateX(10%)', 'translateX(0)'] +} +var slideOutReverse = { + opacity: [1, 0], + transform: ['translateX(0)', 'translateX(10%)'] +} +var slideInReverse = { + opacity: [0, 1], + transform: ['translateX(-10%)', 'translateX(0)'] +} + +var tooltip = document.getElementById('div_dots_tooltip') + +document.querySelectorAll('.navDot').forEach(_dot => { + _dot.addEventListener('mouseover', function(_event) { + tooltip.innerText = this.dataset.title + tooltip.style.display = 'block' + tooltip.style.left = _event.pageX + 'px' + tooltip.style.top = (_event.pageY + 20) + 'px' + }) + + _dot.addEventListener('mouseout', function() { + tooltip.style.display = 'none' + }) + + _dot.addEventListener('mousemove', function(_event) { + tooltip.style.left = _event.pageX + 'px' + tooltip.style.top = (_event.pageY + 20) + 'px' + }) + + _dot.addEventListener('click', function() { + let currentStep = document.querySelector('.navDot.active') + + if (this == currentStep) { + return loadPageContent(this.dataset.step) + } + + let outAnimation = slideOut + let inAnimation = slideIn + if (Number(this.innerText) < Number(currentStep.innerText)) { + outAnimation = slideOutReverse + inAnimation = slideInReverse + } + + contentContainer.animate(outAnimation, { + duration: 500 + }) + setTimeout(() => { + contentContainer.empty() + document.querySelectorAll('.navDot.active').removeClass('active') + this.addClass('active') + loadPageContent(this.dataset.step) + contentContainer.animate(inAnimation, { + duration: 500 + }) + }, 450) + }) +}) + +document.querySelectorAll('.navBtn').forEach(_navBtn => { + _navBtn.addEventListener('click', function() { + let activeNavDot = document.querySelector('.navDot.active') + if (this.classList.value.includes('bt_next')) { + activeNavDot.nextElementSibling.triggerEvent('click') + } else if (this.classList.value.includes('bt_prev')) { + activeNavDot.previousElementSibling.triggerEvent('click') + } + }) +}) + +document.getElementById('bt_quitJeeasyWizard').addEventListener('click', function() { + let confirm = "{{Voulez-vous vraiment annuler l'assistant de configuration?}}" + confirm += '

' + confirm += '
{{Certaines configurations ne seront pas effectuées et plusieurs plugins essentiels ne seront pas installés!}}
' + bootbox.confirm(confirm, function(result) { + if (result) { + exitJeeasy() + } + }) +}) + +document.getElementById('bt_jeedom_ready').addEventListener('click', function() { + exitJeeasy() +}) + +function loadPageContent(_step) { + fetch('index.php?v=d&plugin=jeeasy&modal=' + _step) + .then(response => response.text()) + .then(data => { + if (_step === 'ready') { + document.querySelector('.navBtn.bt_next').addClass('hidden') + document.getElementById('bt_jeedom_ready').removeClass('hidden') + } else { + document.getElementById('bt_jeedom_ready').addClass('hidden') + document.querySelector('.navBtn.bt_next').removeClass('hidden') + } + + if (_step === 'welcome') { + document.querySelector('.navBtn.bt_prev').addClass('hidden') + const parser = new DOMParser() + const doc = parser.parseFromString(data, 'text/html') + const newContent = doc.querySelector('.container').innerHTML + contentContainer.innerHTML = newContent + } else { + document.querySelector('.navBtn.bt_prev.hidden')?.removeClass('hidden') + contentContainer.innerHTML = data + } + jeedomUtils.addOrUpdateUrl('step', _step) + + // Rechargement des scripts + const scripts = contentContainer.querySelectorAll('script') + scripts.forEach(script => { + console.log('script', script) + const newScript = document.createElement('script') + if (script.src) { + newScript.src = script.src + } else { + newScript.textContent = script.textContent + } + document.getElementById('jeeasy_wizard').appendChild(newScript) + document.getElementById('jeeasy_wizard').removeChild(newScript) + }) + + }) + .catch(error => console.error('{{Erreur au chargement de la page}}:', error)) +} + +function configSave(_configuration) { + jeedom.config.save({ + configuration: _configuration, + error: function(_error) { + jeedomUtils.showAlert({ + message: _error.message, + level: 'danger' + }) + }, + success: function() { + let step = getUrlVars('step') + switch (step) { + case 'language': + loadPageContent(step) + break + } + } + }) +} + +function exitJeeasy() { + configSave({ + 'jeedom::firstUse': 0 + }) + loadPage('index.php?v=d&p=dashboard') +} diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index a55c7a9..d404ca2 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -40,176 +40,4 @@
- + From 491a4ae42269a0243360d85315dfa6d1a3e4e52b Mon Sep 17 00:00:00 2001 From: Salvialf Date: Mon, 12 Aug 2024 20:44:22 +0200 Subject: [PATCH 049/135] rename welcome css file --- desktop/css/{jeeasy.welcome.css => modal.welcome.css} | 0 desktop/modal/welcome.php | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename desktop/css/{jeeasy.welcome.css => modal.welcome.css} (100%) diff --git a/desktop/css/jeeasy.welcome.css b/desktop/css/modal.welcome.css similarity index 100% rename from desktop/css/jeeasy.welcome.css rename to desktop/css/modal.welcome.css diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index d404ca2..0f25bd3 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -2,7 +2,7 @@ if (!isConnect()) { throw new Exception('{{401 - Accès non autorisé}}'); } -include_file('desktop', 'jeeasy.welcome', 'css', 'jeeasy'); +include_file('desktop', 'modal.welcome', 'css', 'jeeasy'); $steps = jeeasy::getWizard(); ?> From ac944d762ae3762fbc40cad9263d69c14d55fd13 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Mon, 12 Aug 2024 20:54:47 +0200 Subject: [PATCH 050/135] theme configSave callback --- desktop/js/modal.welcome.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop/js/modal.welcome.js b/desktop/js/modal.welcome.js index b7b318e..ed3778e 100644 --- a/desktop/js/modal.welcome.js +++ b/desktop/js/modal.welcome.js @@ -156,6 +156,9 @@ function configSave(_configuration) { case 'language': loadPageContent(step) break + case 'theme': + jeedomUtils.changeTheme(_configuration.jeedom_theme_main) + break } } }) From 9a3c6a2e923c280d540c0c5795a78b38bb7a99bd Mon Sep 17 00:00:00 2001 From: Salvialf Date: Mon, 12 Aug 2024 21:22:31 +0200 Subject: [PATCH 051/135] css + typo --- desktop/css/modal.welcome.css | 9 ++++++++- desktop/modal/ready.php | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/desktop/css/modal.welcome.css b/desktop/css/modal.welcome.css index 5e58b04..df0884e 100644 --- a/desktop/css/modal.welcome.css +++ b/desktop/css/modal.welcome.css @@ -1,10 +1,13 @@ +body { + padding-top: unset; +} + #jeedomMenuBar, #modalTitle { display: none; } #div_mainContainer { - margin-top: -25px; display: flex; justify-content: center; align-items: center; @@ -13,6 +16,7 @@ #modalDisplay { margin-top: unset !important; + padding-bottom: 10px; border-radius: 8px; } @@ -80,6 +84,9 @@ .navDot:hover, .navDot.active { transform: scale(1.5); +} + +.navDot.active { margin: 0 10px; } diff --git a/desktop/modal/ready.php b/desktop/modal/ready.php index 58b668b..88c43e8 100755 --- a/desktop/modal/ready.php +++ b/desktop/modal/ready.php @@ -36,8 +36,8 @@ ?>
-

{{Retrouvez la documentation Jeedom complète à cette adresse}} : {{Documentation}}

-

{{Vous pouvez également rejoindre notre communauté}} : {{Communauté Jeedom}}

+

{{Retrouvez la documentation complète}} : {{Documentation}}

+

{{Rejoignez la communauté}} : {{Forum}}

From 335212f8aea41043b95e6e3fd560df01e3ae15e2 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Tue, 13 Aug 2024 09:05:58 +0200 Subject: [PATCH 052/135] move wizard to own page --- desktop/css/{modal.welcome.css => wizard.css} | 10 +---- desktop/js/{modal.welcome.js => wizard.js} | 30 ++++++------- desktop/modal/welcome.php | 43 +++---------------- desktop/php/wizard.php | 35 +++++++++++++++ 4 files changed, 56 insertions(+), 62 deletions(-) rename desktop/css/{modal.welcome.css => wizard.css} (90%) rename desktop/js/{modal.welcome.js => wizard.js} (87%) create mode 100644 desktop/php/wizard.php diff --git a/desktop/css/modal.welcome.css b/desktop/css/wizard.css similarity index 90% rename from desktop/css/modal.welcome.css rename to desktop/css/wizard.css index df0884e..4568794 100644 --- a/desktop/css/modal.welcome.css +++ b/desktop/css/wizard.css @@ -2,8 +2,7 @@ body { padding-top: unset; } -#jeedomMenuBar, -#modalTitle { +#jeedomMenuBar { display: none; } @@ -11,13 +10,6 @@ body { display: flex; justify-content: center; align-items: center; - overflow-y: hidden; -} - -#modalDisplay { - margin-top: unset !important; - padding-bottom: 10px; - border-radius: 8px; } #bt_quitJeeasyWizard { diff --git a/desktop/js/modal.welcome.js b/desktop/js/wizard.js similarity index 87% rename from desktop/js/modal.welcome.js rename to desktop/js/wizard.js index ed3778e..141e471 100644 --- a/desktop/js/modal.welcome.js +++ b/desktop/js/wizard.js @@ -1,12 +1,11 @@ var contentContainer = document.getElementById('jeeasy_container') let currentStep = getUrlVars('step') -if (currentStep && currentStep != 'welcome') { - contentContainer.empty() - document.querySelectorAll('.navDot.active').removeClass('active') - document.querySelector('.navDot[data-step="' + currentStep + '"]').addClass('active') - loadPageContent(currentStep) +if (!currentStep) { + currentStep = document.querySelector('.navDot').dataset.step } +document.querySelector('.navDot[data-step="' + currentStep + '"]').addClass('active') +loadPageContent(currentStep) var slideOut = { opacity: [1, 0], @@ -103,24 +102,21 @@ function loadPageContent(_step) { fetch('index.php?v=d&plugin=jeeasy&modal=' + _step) .then(response => response.text()) .then(data => { - if (_step === 'ready') { + let currentStep = document.querySelector('.navDot[data-step="' + _step + '"]') + if (!currentStep.previousElementSibling) { + document.querySelector('.navBtn.bt_prev').addClass('hidden') + } else { + document.querySelector('.navBtn.bt_prev.hidden')?.removeClass('hidden') + } + if (currentStep.nextElementSibling.tagName == 'DIV') { document.querySelector('.navBtn.bt_next').addClass('hidden') document.getElementById('bt_jeedom_ready').removeClass('hidden') } else { document.getElementById('bt_jeedom_ready').addClass('hidden') - document.querySelector('.navBtn.bt_next').removeClass('hidden') + document.querySelector('.navBtn.bt_next.hidden')?.removeClass('hidden') } - if (_step === 'welcome') { - document.querySelector('.navBtn.bt_prev').addClass('hidden') - const parser = new DOMParser() - const doc = parser.parseFromString(data, 'text/html') - const newContent = doc.querySelector('.container').innerHTML - contentContainer.innerHTML = newContent - } else { - document.querySelector('.navBtn.bt_prev.hidden')?.removeClass('hidden') - contentContainer.innerHTML = data - } + contentContainer.innerHTML = data jeedomUtils.addOrUpdateUrl('step', _step) // Rechargement des scripts diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 0f25bd3..68ed1e6 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -2,42 +2,13 @@ if (!isConnect()) { throw new Exception('{{401 - Accès non autorisé}}'); } -include_file('desktop', 'modal.welcome', 'css', 'jeeasy'); -$steps = jeeasy::getWizard(); ?> - - -
-
-

{{Assistant de configuration}}

- Product Image -
-

{{Bienvenue dans l'assistant de configuration}} .

-

{{Configurez facilement votre installation en suivant les étapes de cet assistant interactif.}}

-
- {{Cliquez sur la flèche en bas à droite pour commencer}} -
-
-
-
- -
-
- $step) { - echo ''; - echo $index + 1; - echo ''; - } - ?> -
-
-
- - -
-
+

{{Assistant de configuration}}

+Product Image +
+

{{Bienvenue dans l'assistant de configuration}} .

+

{{Configurez facilement votre installation en suivant les étapes de cet assistant interactif.}}

+
+ {{Cliquez sur la flèche en bas à droite pour commencer}}
- - diff --git a/desktop/php/wizard.php b/desktop/php/wizard.php new file mode 100644 index 0000000..735300e --- /dev/null +++ b/desktop/php/wizard.php @@ -0,0 +1,35 @@ + + + + +
+
+
+
+
+ +
+
+ $step) { + echo ''; + echo $index + 1; + echo ''; + } + ?> +
+
+
+ + +
+
+
+ + From b0fb0ed81aa8f24757e5981c5af07404d6d72c3d Mon Sep 17 00:00:00 2001 From: Salvialf Date: Tue, 13 Aug 2024 09:08:47 +0200 Subject: [PATCH 053/135] load wizard page --- desktop/js/jeeasy.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/desktop/js/jeeasy.js b/desktop/js/jeeasy.js index 2692f67..f8177df 100755 --- a/desktop/js/jeeasy.js +++ b/desktop/js/jeeasy.js @@ -56,8 +56,7 @@ $('#bt_jeeasyEqLogicConfiguration').on('click', function() { document.getElementById('bt_jeeasyWizardV2').addEventListener('click', function() { - var url = 'index.php?v=d&p=modaldisplay&loadmodal=welcome&plugin=jeeasy'; - window.open(url).focus() + jeedomUtils.loadPage('index.php?v=d&m=jeeasy&p=wizard') }) From 7790440836b8c9b4162b9329277201285c77d2ba Mon Sep 17 00:00:00 2001 From: Salvialf Date: Tue, 13 Aug 2024 09:28:08 +0200 Subject: [PATCH 054/135] wait for page to be loaded --- desktop/js/wizard.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/desktop/js/wizard.js b/desktop/js/wizard.js index 141e471..fcab978 100644 --- a/desktop/js/wizard.js +++ b/desktop/js/wizard.js @@ -1,11 +1,14 @@ -var contentContainer = document.getElementById('jeeasy_container') - -let currentStep = getUrlVars('step') -if (!currentStep) { - currentStep = document.querySelector('.navDot').dataset.step -} -document.querySelector('.navDot[data-step="' + currentStep + '"]').addClass('active') -loadPageContent(currentStep) +var contentContainer + +(function() { + contentContainer = document.getElementById('jeeasy_container') + let currentStep = getUrlVars('step') + if (!currentStep) { + currentStep = document.querySelector('.navDot').dataset.step + } + document.querySelector('.navDot[data-step="' + currentStep + '"]').addClass('active') + loadPageContent(currentStep) +})() var slideOut = { opacity: [1, 0], From 7231b4425d87238eef2a0a5a8b72d1f0f904067c Mon Sep 17 00:00:00 2001 From: Salvialf Date: Tue, 13 Aug 2024 16:18:39 +0200 Subject: [PATCH 055/135] generate wizard and wizardMode --- core/class/jeeasy.class.php | 39 ++++++++++++++----- desktop/modal/ready.php | 78 ++++++++++++++++++++----------------- desktop/modal/welcome.php | 31 ++++++++++----- desktop/php/wizard.php | 9 +++-- 4 files changed, 100 insertions(+), 57 deletions(-) diff --git a/core/class/jeeasy.class.php b/core/class/jeeasy.class.php index 10591e0..8b1dd66 100755 --- a/core/class/jeeasy.class.php +++ b/core/class/jeeasy.class.php @@ -22,18 +22,39 @@ class jeeasy extends eqLogic { - public static function getWizard() { - if (file_exists(config::byKey('path_wizard'))) { - $wizard = json_decode(file_get_contents(config::byKey('path_wizard')), true); + public static function getWizardSteps($_mode = 'default'): array { + $wizard['welcome'] = __('Accueil', __FILE__); + + if ($_mode == 'recovery') { + $wizard['pack'] = __('Installation plugins', __FILE__); } else { - $wizard = json_decode(file_get_contents('plugins/jeeasy/core/data/wizard.json'), true); + $wizard['language'] = __('Choix de la langue', __FILE__); + $wizard['theme'] = __('Choix du thème', __FILE__); + $wizard['interface'] = __('Interface', __FILE__); + $wizard['boxName'] = __("Nom de l'installation", __FILE__); + $wizard['objects'] = __("Type d'installaton", __FILE__); + $wizard['dnsGo'] = __('Accès externe', __FILE__); + if ($_mode == 'default') { + $wizard['pack'] = __('Installation plugins', __FILE__); + } + $wizard['pluginsConfigs'] = __('Configuration plugins', __FILE__); + if ($_mode == 'default') { + $wizard['services'] = __('Services', __FILE__); + $wizard['backupCloud'] = __('Sauvegarde Cloud', __FILE__); + $wizard['assistants'] = __('Assistants vocaux', __FILE__); + } } + $wizard['ready'] = __('Prêt à démarrer', __FILE__); + return $wizard; + } - $steps = $wizard['trame']; - usort($steps, function ($step1, $step2) { - return $step1['order'] <=> $step2['order']; - }); - return $steps; + public static function getWizardMode(): string { + if (strtolower(trim(gethostname())) == 'jeedomatlasrecovery') { + return 'recovery'; + } else if (config::byKey('mbState', 'core', 0) == 1) { + return 'mb'; + } + return 'default'; } public static function discoverNetwork() { diff --git a/desktop/modal/ready.php b/desktop/modal/ready.php index 88c43e8..b56b83e 100755 --- a/desktop/modal/ready.php +++ b/desktop/modal/ready.php @@ -2,47 +2,55 @@ if (!isConnect()) { throw new Exception('401 - {{Accès non autorisé}}'); } +$wizardMode = jeeasy::getWizardMode(); +if ($wizardMode == 'recovery') { +?> +

{{Félicitations}} !

+ {{pouce de validation}} +

{{Vous avez terminé la phase de préparation}}

-$jsonrpc = repo_market::getJsonRpc(); -$servicePack = ''; -if ($jsonrpc->sendRequest('servicepack::info')) { - $servicePack = $jsonrpc->getResult()['licenceName']; -} +sendRequest('servicepack::info')) { + $servicePack = $jsonrpc->getResult()['licenceName']; + } ?> +

{{Félicitations}} !

+ {{pouce de validation}} +

{{Vous avez terminé la phase de configuration}}

+

+ {{Vous pouvez commencer à naviguer dans}} {{pendant que les plugins finissent de s'installer. Cette opération peut prendre jusqu'à 30 minutes.}} +

-

{{Félicitations}} !

-{{pouce de validation}} -

{{Vous avez terminé la phase de configuration}}

-

- {{Vous pouvez commencer à naviguer dans}} {{pendant que les plugins finissent de s'installer. Cette opération peut prendre jusqu'à 30 minutes.}} -

+
-
+
+ + +
+
+ + + + +
-
- - -
-
- - - - -
+ +
- -
+

{{Retrouvez la documentation complète}} : {{Documentation}}

+

{{Rejoignez la communauté}} : {{Forum}}

+ -

{{Retrouvez la documentation complète}} : {{Documentation}}

-

{{Rejoignez la communauté}} : {{Forum}}

+
+ + {{Cliquez sur la coche en bas à droite}} {{pour valider la configuration de votre installation.}} + - -
- - {{Cliquez sur la coche en bas à droite}} {{pour valider la configuration de votre installation.}} - diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 68ed1e6..eb7684e 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -2,13 +2,26 @@ if (!isConnect()) { throw new Exception('{{401 - Accès non autorisé}}'); } +if (jeeasy::getWizardMode() == 'recovery') { ?> - -

{{Assistant de configuration}}

-Product Image -
-

{{Bienvenue dans l'assistant de configuration}} .

-

{{Configurez facilement votre installation en suivant les étapes de cet assistant interactif.}}

-
- {{Cliquez sur la flèche en bas à droite pour commencer}} -
+

{{Assistant de restauration}}

+ Product Image +
+

{{Bienvenue dans l'assistant de restauration système}} .

+ + {{Cliquez sur la flèche en bas à droite pour commencer}} +
+ +

{{Assistant de configuration}}

+ Product Image +
+

{{Bienvenue dans l'assistant de configuration}} .

+

{{Configurez facilement votre installation en suivant les étapes de cet assistant interactif.}}

+
+ {{Cliquez sur la flèche en bas à droite pour commencer}} +
+ @@ -17,10 +16,12 @@
$step) { - echo ''; - echo $index + 1; + $i = 1; + foreach (jeeasy::getWizardSteps(jeeasy::getWizardMode()) as $step => $title) { + echo ''; + echo $i; echo ''; + $i++; } ?>
From a043e670b4510a8b678378da577ee234f1210b21 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Tue, 13 Aug 2024 16:41:19 +0200 Subject: [PATCH 056/135] choose language on welcome --- core/class/jeeasy.class.php | 1 - desktop/css/wizard.css | 7 +++++-- desktop/js/wizard.js | 2 +- desktop/modal/language.php | 33 --------------------------------- desktop/modal/welcome.php | 28 +++++++++++++++++++++++----- 5 files changed, 29 insertions(+), 42 deletions(-) delete mode 100755 desktop/modal/language.php diff --git a/core/class/jeeasy.class.php b/core/class/jeeasy.class.php index 8b1dd66..045c9b6 100755 --- a/core/class/jeeasy.class.php +++ b/core/class/jeeasy.class.php @@ -28,7 +28,6 @@ public static function getWizardSteps($_mode = 'default'): array { if ($_mode == 'recovery') { $wizard['pack'] = __('Installation plugins', __FILE__); } else { - $wizard['language'] = __('Choix de la langue', __FILE__); $wizard['theme'] = __('Choix du thème', __FILE__); $wizard['interface'] = __('Interface', __FILE__); $wizard['boxName'] = __("Nom de l'installation", __FILE__); diff --git a/desktop/css/wizard.css b/desktop/css/wizard.css index 4568794..1b4beec 100644 --- a/desktop/css/wizard.css +++ b/desktop/css/wizard.css @@ -36,9 +36,12 @@ body { grid-row-start: 2 } -#jeeasy_container .form-control { - max-width: 300px; +#jeeasy_container .input-group { + max-width: 350px; margin: auto; +} + +#jeeasy_container .form-control { text-align-last: center; } diff --git a/desktop/js/wizard.js b/desktop/js/wizard.js index fcab978..250dd16 100644 --- a/desktop/js/wizard.js +++ b/desktop/js/wizard.js @@ -152,7 +152,7 @@ function configSave(_configuration) { success: function() { let step = getUrlVars('step') switch (step) { - case 'language': + case 'welcome': loadPageContent(step) break case 'theme': diff --git a/desktop/modal/language.php b/desktop/modal/language.php deleted file mode 100755 index 00a6a32..0000000 --- a/desktop/modal/language.php +++ /dev/null @@ -1,33 +0,0 @@ - - -

{{Choix de la langue}}

-Product Image -
-

- {{Vous pouvez changer la langue de votre installation ou passer à l'étape suivante}} -

-
- -
-
- - diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index eb7684e..6c0f306 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -8,9 +8,6 @@ Product Image

{{Bienvenue dans l'assistant de restauration système}} .

- - {{Cliquez sur la flèche en bas à droite pour commencer}}

{{Bienvenue dans l'assistant de configuration}} .

{{Configurez facilement votre installation en suivant les étapes de cet assistant interactif.}}

-
- {{Cliquez sur la flèche en bas à droite pour commencer}}
+ +
+ {{Langue}} + +
+{{Cliquez sur la flèche en bas à droite pour commencer}} + + From 1c60e52fd0ea98dd80f2fdd79ef3fff250fee474 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Tue, 13 Aug 2024 17:15:19 +0200 Subject: [PATCH 057/135] init general & removed theme for interface --- core/class/jeeasy.class.php | 3 +-- desktop/css/wizard.css | 2 +- desktop/js/wizard.js | 2 +- desktop/modal/{boxName.php => general.php} | 22 ++++++++-------- desktop/modal/interface.php | 29 +++++++++++++++++++--- desktop/modal/theme.php | 28 --------------------- desktop/modal/welcome.php | 4 ++- 7 files changed, 43 insertions(+), 47 deletions(-) rename desktop/modal/{boxName.php => general.php} (54%) mode change 100755 => 100644 delete mode 100644 desktop/modal/theme.php diff --git a/core/class/jeeasy.class.php b/core/class/jeeasy.class.php index 045c9b6..2280d45 100755 --- a/core/class/jeeasy.class.php +++ b/core/class/jeeasy.class.php @@ -28,9 +28,8 @@ public static function getWizardSteps($_mode = 'default'): array { if ($_mode == 'recovery') { $wizard['pack'] = __('Installation plugins', __FILE__); } else { - $wizard['theme'] = __('Choix du thème', __FILE__); + $wizard['general'] = __('Général', __FILE__); $wizard['interface'] = __('Interface', __FILE__); - $wizard['boxName'] = __("Nom de l'installation", __FILE__); $wizard['objects'] = __("Type d'installaton", __FILE__); $wizard['dnsGo'] = __('Accès externe', __FILE__); if ($_mode == 'default') { diff --git a/desktop/css/wizard.css b/desktop/css/wizard.css index 1b4beec..efa2421 100644 --- a/desktop/css/wizard.css +++ b/desktop/css/wizard.css @@ -46,7 +46,7 @@ body { } #jeeasy_navigation { - margin-top: 15px; + margin: 15px auto; display: flex; justify-content: space-around; align-items: center; diff --git a/desktop/js/wizard.js b/desktop/js/wizard.js index 250dd16..d3a9341 100644 --- a/desktop/js/wizard.js +++ b/desktop/js/wizard.js @@ -155,7 +155,7 @@ function configSave(_configuration) { case 'welcome': loadPageContent(step) break - case 'theme': + case 'interface': jeedomUtils.changeTheme(_configuration.jeedom_theme_main) break } diff --git a/desktop/modal/boxName.php b/desktop/modal/general.php old mode 100755 new mode 100644 similarity index 54% rename from desktop/modal/boxName.php rename to desktop/modal/general.php index 8cc2ecf..b4c542a --- a/desktop/modal/boxName.php +++ b/desktop/modal/general.php @@ -8,21 +8,21 @@ } $productName = jeedom::getHardwareName(); -$nameBox = config::byKey('name'); -if ($nameBox == '') { - $nameBox = 'Jeedom ' . ucfirst($productName); - config::save('name', $nameBox); +$boxName = config::byKey('name'); +if ($boxName == '') { + $boxName = 'Jeedom ' . ucfirst($productName); + config::save('name', $boxName); } ?> -

{{Nom de l'installation}}

+

{{Paramètres généraux}}

Product Image -
-

- {{Vous pouvez changer le nom de votre installation ou passer à l'étape suivante}} -

-
- +

+ {{Vous pouvez modifier certains paramètres généraux de votre installation et passer à l'étape suivante}} +

+
+ {{Nom}} +
+ + + diff --git a/desktop/modal/theme.php b/desktop/modal/theme.php deleted file mode 100644 index 5f843ea..0000000 --- a/desktop/modal/theme.php +++ /dev/null @@ -1,28 +0,0 @@ - - -

{{Choix du thème}}

-Product Image -
-

- {{Vous pouvez changer le thème de votre installation ou passer à l'étape suivante}} -

-
- -
- - diff --git a/desktop/modal/welcome.php b/desktop/modal/welcome.php index 6c0f306..c21a2c4 100755 --- a/desktop/modal/welcome.php +++ b/desktop/modal/welcome.php @@ -8,6 +8,7 @@ Product Image

{{Bienvenue dans l'assistant de restauration système}} .

+

{{Préparez facilement la restauration système de votre installation en suivant les étapes de cet assistant interactif.}}

>Português (sem apoio)
-{{Cliquez sur la flèche en bas à droite pour commencer}} + +{{Cliquez sur la flèche en bas à droite pour commencer}} diff --git a/desktop/modal/interface.php b/desktop/modal/interface.php index 032a1cd..4a55e91 100644 --- a/desktop/modal/interface.php +++ b/desktop/modal/interface.php @@ -8,11 +8,13 @@

{{Paramètres d'interface}}

Product Image -

- {{Vous pouvez modifier certains paramètres d'interface de votre installation et passer à l'étape suivante}} -

+
{{Vous pouvez modifier certains paramètres d'interface de votre installation puis passer à l'étape suivante}} + +
- {{Thème}} +
{{Thème}} + +
{{Fuseau horaire}} - +
{{Longitude}} - +
diff --git a/desktop/modal/interface.php b/desktop/modal/interface.php index 4a55e91..44054dd 100644 --- a/desktop/modal/interface.php +++ b/desktop/modal/interface.php @@ -8,12 +8,12 @@

{{Paramètres d'interface}}

Product Image -
{{Vous pouvez modifier certains paramètres d'interface de votre installation puis passer à l'étape suivante}} +
{{Vous pouvez modifier certains paramètres d'interface de votre installation puis passer à l'étape suivante}}
{{Thème}} - +
From dbc761104c2b0df9f8d0289f7b8ef64372eb2132 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Tue, 13 Aug 2024 22:06:23 +0200 Subject: [PATCH 061/135] typo --- desktop/modal/typology.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/modal/typology.php b/desktop/modal/typology.php index 8b693f7..4260a09 100644 --- a/desktop/modal/typology.php +++ b/desktop/modal/typology.php @@ -19,13 +19,13 @@
{{Un bâtiment}}
-
{{Sélectionner le type d'installation qui sera géré par}} .
+
{{Sélectionnez le type d'installation qui sera géré par}} .
- + From 249ec7123ca20c23edb216ff3962bdb0d7cb5f1d Mon Sep 17 00:00:00 2001 From: Salvialf Date: Wed, 14 Aug 2024 10:25:00 +0200 Subject: [PATCH 065/135] switch theme not change --- desktop/js/wizard.js | 5 +---- desktop/modal/interface.php | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/desktop/js/wizard.js b/desktop/js/wizard.js index d3a9341..0a3f6f3 100644 --- a/desktop/js/wizard.js +++ b/desktop/js/wizard.js @@ -50,7 +50,7 @@ document.querySelectorAll('.navDot').forEach(_dot => { let currentStep = document.querySelector('.navDot.active') if (this == currentStep) { - return loadPageContent(this.dataset.step) + return } let outAnimation = slideOut @@ -155,9 +155,6 @@ function configSave(_configuration) { case 'welcome': loadPageContent(step) break - case 'interface': - jeedomUtils.changeTheme(_configuration.jeedom_theme_main) - break } } }) diff --git a/desktop/modal/interface.php b/desktop/modal/interface.php index 18a1637..d33e566 100644 --- a/desktop/modal/interface.php +++ b/desktop/modal/interface.php @@ -2,8 +2,12 @@ if (!isConnect()) { throw new Exception('{{401 - Accès non autorisé}}'); } - -$jeedomTheme = config::byKey('jeedom_theme_main'); +$themesDescription = array( + 'core2019_Light' => '{{Clair}}/Light', + 'core2019_Dark' => '{{Sombre}}/Dark' +); +$defaultTheme = config::byKey('jeedom_theme_main'); +$alternateTheme = config::byKey('jeedom_theme_alternate'); ?>

{{Paramètres d'interface}}

@@ -16,18 +20,17 @@
From 23ca2a61c09b8fd37e541657c28618bf85f9fbe4 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Wed, 14 Aug 2024 15:38:54 +0200 Subject: [PATCH 066/135] fix default tz --- desktop/modal/general.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/modal/general.php b/desktop/modal/general.php index 1ff65f7..cc92a62 100644 --- a/desktop/modal/general.php +++ b/desktop/modal/general.php @@ -12,7 +12,7 @@ $boxName = 'Jeedom ' . ucfirst(jeedom::getHardwareName()); config::save('name', $boxName); } -sendVarToJS('_timezone', config::byKey('timezone', 'Europe/Brussels')); +sendVarToJS('_timezone', config::byKey('timezone')); ?>

{{Paramètres généraux}}

From 191dfe82ac1495b5fcdcc3c0835dcf3b1c4639de Mon Sep 17 00:00:00 2001 From: Salvialf Date: Wed, 14 Aug 2024 15:39:47 +0200 Subject: [PATCH 067/135] remove specific dots tooltips --- desktop/css/wizard.css | 57 +++++++++++++++++++++--------------------- desktop/js/wizard.js | 16 ------------ 2 files changed, 28 insertions(+), 45 deletions(-) diff --git a/desktop/css/wizard.css b/desktop/css/wizard.css index 3f826e6..669df2c 100644 --- a/desktop/css/wizard.css +++ b/desktop/css/wizard.css @@ -12,6 +12,19 @@ body { align-items: center; } +#div_pageContainer { + background-color: rgba(var(--eq-bg-color), var(--opacity)); + border-radius: var(--border-radius) +} + +#jeeasy_wizard .flex-evenly { + width: 100%; + height: 100%; + display: flex; + justify-content: space-evenly; + align-items: center; +} + #bt_quitJeeasyWizard { position: absolute; top: 5%; @@ -37,33 +50,32 @@ body { grid-row-start: 2 } -#jeeasy_container>.replace_logo { - width: 100%; - height: 100%; - display: flex; - justify-content: space-between; - align-items: center; +#jeeasy_container>.logo { grid-row-start: 2 } -#jeeasy_container>.replace_logo .sel_father { +#jeeasy_container>.step_father .sel_father { max-width: 33%; border-radius: var(--border-radius); + background-color: var(--el-defaultColor); overflow: hidden; } -#jeeasy_container>.replace_logo .sel_father.selected { - border: solid 4px var(--al-info-color); +#jeeasy_container>.step_father>div:hover, +#jeeasy_container>.step_father>div.selected { + transform: scale(1.25); } -#jeeasy_container>.replace_logo img { +#jeeasy_container>.step_father img { + width: 250px; max-width: 100%; - max-height: 180px; + max-height: 150px; } -#jeeasy_container>.replace_logo .img_title { +#jeeasy_container>.step_father .img_title { font-weight: bold; color: white; + padding: 2px; background-color: var(--al-info-color); } @@ -83,18 +95,16 @@ body { #jeeasy_navigation { margin: 15px auto; - display: flex; - justify-content: space-around; - align-items: center; } #jeeasy_navigation>div { - min-width: 80px; + margin: auto 10px; + min-width: 50px; } .navBtn, #bt_jeedom_ready { - font-size: 40px; + font-size: 45px; cursor: pointer !important; color: var(--logo-primary-color); } @@ -108,7 +118,7 @@ body { align-items: center; justify-content: center; color: white; - background-color: var(--logo-primary-color); + background-color: rgb(var(--contrast-color), .7); } .navDot:hover, @@ -119,14 +129,3 @@ body { .navDot.active { margin: 0 10px; } - -#div_dots_tooltip { - position: absolute; - top: 10px; - color: white; - background-color: var(--logo-primary-color); - padding: 5px 10px; - border-radius: 5px; - display: none; - z-index: 1000; -} diff --git a/desktop/js/wizard.js b/desktop/js/wizard.js index 0a3f6f3..5ed98ae 100644 --- a/desktop/js/wizard.js +++ b/desktop/js/wizard.js @@ -30,22 +30,6 @@ var slideInReverse = { var tooltip = document.getElementById('div_dots_tooltip') document.querySelectorAll('.navDot').forEach(_dot => { - _dot.addEventListener('mouseover', function(_event) { - tooltip.innerText = this.dataset.title - tooltip.style.display = 'block' - tooltip.style.left = _event.pageX + 'px' - tooltip.style.top = (_event.pageY + 20) + 'px' - }) - - _dot.addEventListener('mouseout', function() { - tooltip.style.display = 'none' - }) - - _dot.addEventListener('mousemove', function(_event) { - tooltip.style.left = _event.pageX + 'px' - tooltip.style.top = (_event.pageY + 20) + 'px' - }) - _dot.addEventListener('click', function() { let currentStep = document.querySelector('.navDot.active') From b356df90a8ea34a5ea3a2bf77742383433b599f5 Mon Sep 17 00:00:00 2001 From: Salvialf Date: Wed, 14 Aug 2024 15:40:18 +0200 Subject: [PATCH 068/135] rewrite objects --- core/class/jeeasy.class.php | 2 +- desktop/modal/objects.php | 297 +++++++----------------------------- desktop/modal/typology.php | 44 ------ desktop/php/wizard.php | 5 +- 4 files changed, 56 insertions(+), 292 deletions(-) delete mode 100644 desktop/modal/typology.php diff --git a/core/class/jeeasy.class.php b/core/class/jeeasy.class.php index 0e17db9..5d2d7a3 100755 --- a/core/class/jeeasy.class.php +++ b/core/class/jeeasy.class.php @@ -30,7 +30,7 @@ public static function getWizardSteps($_mode = 'default'): array { } else { $wizard['general'] = __('Général', __FILE__); $wizard['interface'] = __('Interface', __FILE__); - $wizard['typology'] = __('Typologie', __FILE__); + $wizard['objects'] = __('Objets', __FILE__); $wizard['dnsGo'] = __('Accès externe', __FILE__); if ($_mode == 'default') { $wizard['pack'] = __('Installation plugins', __FILE__); diff --git a/desktop/modal/objects.php b/desktop/modal/objects.php index 4974b7f..f6e7361 100755 --- a/desktop/modal/objects.php +++ b/desktop/modal/objects.php @@ -2,261 +2,70 @@ if (!isConnect()) { throw new Exception('{{401 - Accès non autorisé}}'); } - ?> - - -
-
-
-

{{Que souhaitez-vous configurer}} ?

-
-
-
- -
-
- -
-
- -
-
- - +

{{Configuration des objets}}

+