]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Wed, 11 Nov 2020 11:26:05 +0000 (12:26 +0100)
committerVincent <vincent@enhydra.fr>
Wed, 11 Nov 2020 11:26:05 +0000 (12:26 +0100)
14 files changed:
.idea/workspace.xml
config/balcon.php
config/bureau.php
config/chambre.php
config/cour.php
config/cuisine.php
config/entree.php
config/lit.php
config/litvincent.php
config/salon.php
config/sdb.php
config/wc.php
index.php
scripts/lib/lib.php

index 88d979b13340f782798a29b6636109b99bfe121c..eb44c63e0f443e39dea00da77f2c1e25dcc85625 100644 (file)
@@ -2,86 +2,20 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change afterPath="$PROJECT_DIR$/config/switch.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/balcon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/balcon.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/bureau.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/bureau.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/chambre.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/chambre.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/cour.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cour.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/cuisine.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cuisine.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/default.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/default.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/entree.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/entree.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/lit.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/lit.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/litvincent.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/litvincent.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/salon.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/salon.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/sdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/sdb.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/config/wc.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/wc.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-brands-400.eot" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-brands-400.svg" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-brands-400.ttf" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-brands-400.woff" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-brands-400.woff2" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-light-300.eot" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-light-300.svg" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-light-300.ttf" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-light-300.woff" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-light-300.woff2" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-regular-400.eot" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-regular-400.svg" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-regular-400.ttf" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-regular-400.woff" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-regular-400.woff2" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-solid-900.eot" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-solid-900.svg" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-solid-900.ttf" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-solid-900.woff" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fa-solid-900.woff2" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/520/fontawesome-all.min.css" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-brands-400.eot" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-brands-400.svg" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-brands-400.ttf" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-brands-400.woff" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-brands-400.woff2" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-regular-400.eot" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-regular-400.svg" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-regular-400.ttf" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-regular-400.woff" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-regular-400.woff2" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-solid-900.eot" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-solid-900.svg" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-solid-900.ttf" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-solid-900.woff" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fa-solid-900.woff2" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/550/fontawesome-all.min.css" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/all.min.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/all.min.css" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.eot" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.eot" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.svg" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.svg" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.ttf" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.ttf" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.woff" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.woff" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.woff2" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-brands-400.woff2" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.eot" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.eot" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.svg" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.svg" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.ttf" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.ttf" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.woff" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.woff" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.woff2" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-duotone-900.woff2" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.eot" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.eot" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.svg" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.svg" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.ttf" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.ttf" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.woff" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.woff" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.woff2" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-light-300.woff2" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.eot" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.eot" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.svg" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.svg" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.ttf" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.ttf" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.woff" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.woff" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.woff2" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-regular-400.woff2" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.eot" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.eot" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.svg" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.svg" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.ttf" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.ttf" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.woff" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.woff" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.woff2" beforeDir="false" afterPath="$PROJECT_DIR$/style/fonts/fontawesome/fa-solid-900.woff2" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1604828693023" duration="1255000" />
       <workItem from="1605001866699" duration="7793000" />
       <workItem from="1605087671373" duration="102000" />
-      <workItem from="1605087787424" duration="3896000" />
-    </task>
-    <task id="LOCAL-00330" summary=".">
-      <created>1593344786570</created>
-      <option name="number" value="00330" />
-      <option name="presentableId" value="LOCAL-00330" />
-      <option name="project" value="LOCAL" />
-      <updated>1593344786570</updated>
+      <workItem from="1605087787424" duration="5282000" />
     </task>
     <task id="LOCAL-00331" summary=".">
       <created>1595314774388</created>
       <option name="project" value="LOCAL" />
       <updated>1605086965249</updated>
     </task>
-    <option name="localTasksCounter" value="379" />
+    <task id="LOCAL-00379" summary=".">
+      <created>1605092224515</created>
+      <option name="number" value="00379" />
+      <option name="presentableId" value="LOCAL-00379" />
+      <option name="project" value="LOCAL" />
+      <updated>1605092224515</updated>
+    </task>
+    <option name="localTasksCounter" value="380" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
       <screen x="0" y="0" width="1707" height="920" />
     </state>
     <state x="740" y="229" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.1707.920@0.0.1707.920" timestamp="1604146905948" />
-    <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605086955514">
-      <screen x="0" y="0" width="1707" height="920" />
+    <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605092211673">
+      <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="132" y="0" width="737" height="502" key="CommitChangelistDialog2/0.0.1707.920@0.0.1707.920" timestamp="1605086955514" />
     <state x="701" y="75" key="CommitChangelistDialog2/0.0.1920.1160@0.0.1920.1160" timestamp="1602171117745" />
-    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605007789034" />
+    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605092211673" />
     <state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605087475486">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 9baf5c3f5a2c0ecc626bc4970bdef8e6c94b1ef1..2f0f0663c431860867ea2963a59707ab23314dc0 100644 (file)
@@ -4,17 +4,12 @@ config('ROOM', 'balcon');
 config('SQUEEZEBOX_PLAYER', 'Salon');
 config('VOLUME', 60);
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
-config('HIDEMASK_TIMEOUT',250);
+config('HIDEMASK_TIMEOUT', 250);
 
 if (DISPLAYINTERFACE) {
     $c = balcon();
     $shortcuts['lights'] = $c['all'];
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav = ['home', 'lights', 'switch', 'settings', 'alert', 'off'];
 
     $favoriteslights = [
 
index 2d7346541e133436dc72c4a063b75fd9931d9cc2..7c4ed5d738eef9835316b83b6ba070148939dc57 100644 (file)
@@ -28,13 +28,5 @@ if (DISPLAYINTERFACE) {
     include "default.php";
     include ROOT . "/config/media.php";
 
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
-    <a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="scripts/off.php" class="ajax"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav=['home','lights','music','media','remote','switch','settings','alert','off'];
 }
index c5f7d6022f84066338a4cdadf15519245570d636..3979316955cb089bb6ddaeb1d98a687abae16957 100644 (file)
@@ -1,15 +1,15 @@
 <?php
-config('ROOM_NAME','Chambre');
+config('ROOM_NAME', 'Chambre');
 config('ROOM', 'chambre');
 config('SQUEEZEBOX_PLAYER', 'Chambre');
 config('SLEEPSCREEN', 15);
 config('SCREENSAVER_BRIGHTNESS', 100);
 config('SLEEPTYPE', 'screensaver');
-config('SCREENSAVER','weatherstation');
+config('SCREENSAVER', 'weatherstation');
 config('VOLUME_DEVICE', 'RaspberryPi:lit');
-config('HIDEMASK_TIMEOUT',250);
+config('HIDEMASK_TIMEOUT', 250);
 
-if(DISPLAYINTERFACE) {
+if (DISPLAYINTERFACE) {
     if (!isset($shortcuts)) {
         $shortcuts = [];
     }
@@ -19,14 +19,5 @@ if(DISPLAYINTERFACE) {
     $favoriteslights = $c['favorites'];
 
     include "default.php";
-
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="/scripts/light.php?scene=chambre/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i></a>
-    <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav = ['home', 'lights', 'music', 'fan', 'remote', 'coffee', 'switch', 'settings', 'alert', 'off'];
 }
\ No newline at end of file
index b9126d8f0c74bba2b0f80866e8b03e218c269b89..a8500e756e422aa992cb5e358a426598f345f02c 100644 (file)
@@ -4,17 +4,12 @@ config('ROOM', 'cour');
 config('SQUEEZEBOX_PLAYER', 'Cuisine');
 config('VOLUME', 60);
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
-config('HIDEMASK_TIMEOUT',250);
+config('HIDEMASK_TIMEOUT', 250);
 
 if (DISPLAYINTERFACE) {
     $c = cour();
     $shortcuts['lights'] = $c['all'];
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav = ['home', 'lights', 'switch', 'settings', 'alert', 'off'];
     $favoriteslights = [
 
     ];
index 8cb9cfff7f24d61f8ad53a817e6bdeab82191290..fbf095a074689b1db32a86622abef89039a21d8c 100644 (file)
@@ -16,13 +16,5 @@ if (DISPLAYINTERFACE) {
 
     include "default.php";
 
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
-    <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav=['home','lights','music','remote','coffee','switch','settings','alert','off'];
 }
\ No newline at end of file
index d505cece262253bc84ce740023b2eb4217a602b3..ac769c4d6ad79498d597bd9b857bb6c767287098 100644 (file)
@@ -19,14 +19,7 @@ if (DISPLAYINTERFACE) {
        $favoriteslights = $c['favorites'];
        array_splice($favoriteslights, 2, 0, [['type' => 'velib'], ['type' => 'traffic']]);
 
-       $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav=['home','lights','music','coffee','switch','settings','alert','off'];
 
        include "default.php";
 }
index e4dbc531091e2e422f22c11c0324ad3e2f547520..ddad250dbac3f63e4082dfa6cc64388ff45548dd 100644 (file)
@@ -14,16 +14,7 @@ if (DISPLAYINTERFACE) {
     $shortcuts['lights'] = $c['all'];
     $favoriteslights = $c['favorites'];
 
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
-    <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
-    <!--<a href="/scripts/light.php?scene=chambre/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i></a>-->
-        <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>    
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav=['home','lights','music','media','coffee','switch','settings','alert','off'];
 
     include "media.php";
     include "default.php";
index fe2cfe29c3134c8123b41bee66b67063d5fdcca6..d78278f9550515498ced752e71e6a863a70a16ac 100644 (file)
@@ -19,16 +19,7 @@ if (DISPLAYINTERFACE) {
 
     include "lit.php";
 
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="clock"><i class="far fa-alarm-clock" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <!--<a href="/scripts/light.php?scene=chambre/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i></a>-->
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav = ['home', 'lights', 'clock', 'music', 'switch', 'settings', 'alert', 'off'];
 
     $shortcuts['clock'] = [
         ['type' => 'phone', 'phone' => 'vincent', 'task' => 'Va Au Lit', 'label' => 'Lit'],
index e079e85dbeab178271079d9017265fb11f8de15c..a9f8a78e6838a2f6cdc756cc6f9b4e267aa28bc8 100644 (file)
@@ -21,15 +21,5 @@ if (DISPLAYINTERFACE) {
     include "default.php";
     include ROOT . "/config/media.php";
 
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
-    <a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
-    <!--<a href="/scripts/light.php?scene=salon/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i></a>-->
-    <!--<a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>-->
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="scripts/off.php" class="ajax"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav=['home','lights','music','media','remote','switch','settings','alert','off'];
 }
index 4fd0ba2def09c71821076a6b186ff5e92626cb04..6380330e31b79ffb5f6ca0eafaf6071a50ea2b33 100644 (file)
@@ -15,16 +15,7 @@ config('HIDEMASK_TIMEOUT',250);
 if (DISPLAYINTERFACE) {
     $c = sdb();
     $shortcuts['lights'] = $c['all'];
-       $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>
-    <a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
-    <a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav=['home','lights','music','media','remote','coffee','switch','settings','alert','off'];
 
        include_once ROOT . '/config/music.php';
 
index eb7522cf1a8f89153651b083cefcdf11cc3b74ca..7f21df880b9f2c9b0e2086af2cd963a10ca0f7f4 100644 (file)
@@ -9,14 +9,7 @@ config('HIDEMASK_TIMEOUT',250);
 if (DISPLAYINTERFACE) {
     $c = wc();
     $shortcuts['lights'] = $c['all'];
-    $nav = '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>
-    <a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>
-    <a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>
-    <a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>
-    <a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>
-    <a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>
-    <a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>
-    <a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>';
+    $nav=['home','lights','music','remote','switch','settings','alert','off'];
 
     include_once ROOT . '/config/music.php';
 
index b71fbe3647f1d2ea39b8f668ea23cbf62a92e4db..ff6719f252b6b33cca051aa717c5febf63944c50 100644 (file)
--- a/index.php
+++ b/index.php
@@ -72,7 +72,7 @@ function relativePath($p)
 <div id="loader"></div>
 <div id="mask"></div>
 <header>
-    <?php echo $nav ?>
+    <?php echo makeNav($nav) ?>
 </header>
 <div id="scrollholder">
     <main>
index 9086e897fac2d19ae38e2bf7193cf87a24bd7fce..ff46a1b6569819f471c9186b7f8c2d79cacc3368 100644 (file)
@@ -560,4 +560,34 @@ function toNumber($val, $round = false)
         $val = round($val, $round === true ? 0 : $round);
     }
     return $val;
-}
\ No newline at end of file
+}
+
+function makeNav($nav)
+{
+    if (is_string($nav)) {
+        return $nav;
+    }
+
+    $map = [
+        'home' => '<a href="#" data-menu="home"><i class="fa fa-home" aria-hidden="true"></i></a>',
+        'lights' => '<a href="#" data-menu="lights"><i class="far fa-lightbulb" aria-hidden="true"></i></a>',
+        'music' => '<a href="#" data-menu="music"><i class="fa fa-music" aria-hidden="true"></i></a>',
+        'media' => '<a href="#" data-menu="media"><i class="fa fa-tv-retro" aria-hidden="true"></i></a>',
+        'coffee' => '<a href="#" data-menu="coffee"><i class="fa fa-coffee" aria-hidden="true"></i></a>',
+        'fan' => '<a href="/scripts/light.php?scene=chambre/fan/toggle" class="ajax"><i class="fa fa-fan" aria-hidden="true"></i></a>',
+        'remote' => '<a href="#" data-menu="remote"><i class="fa fa-play" aria-hidden="true"></i></a>',
+        'switch' => '<a href="#" data-menu="switch"><i class="far fa-portal-enter" aria-hidden="true"></i></a>',
+        'clock' => '<a href="#" data-menu="clock"><i class="far fa-alarm-clock" aria-hidden="true"></i></a>',
+        'settings' => '<a href="#" data-menu="settings"><i class="fa fa-cog" aria-hidden="true"></i></a>',
+        'alert' => '<a href="#" data-action="alert"><i class="fa fa-bell" aria-hidden="true"></i></a>',
+        'off' => '<a href="#" data-action="off"><i class="fa fa-power-off" aria-hidden="true"></i></a>',
+    ];
+
+    $res = '';
+    foreach ($nav as $item) {
+        if (isset($map[$item])) {
+            $res .= $map[$item];
+        }
+    }
+    return $res;
+}