]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sat, 21 Nov 2020 15:40:15 +0000 (16:40 +0100)
committerVincent <vincent@enhydra.fr>
Sat, 21 Nov 2020 15:40:15 +0000 (16:40 +0100)
16 files changed:
.idea/workspace.xml
config/bureau.php
config/chambre.php
config/cour.php
config/cuisine.php
config/default.php
config/entree.php
config/litjerome.php
config/litvincent.php
config/salon.php
config/sdb.php
index.php
js/cordova.js
style/menu.less
style/style.css
style/style.less

index 030e2574a7972449b5b4609c5dad1d60e694ff0f..7ac12d2599209cf1819d8a3794d1a52438062d6c 100644 (file)
@@ -3,7 +3,21 @@
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/shield.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/shield.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/litjerome.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/litjerome.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$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/js/cordova.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/cordova.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/style/menu.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/menu.less" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/style/style.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.css" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/style/style.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/style.less" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1605531884401" duration="829000" />
       <workItem from="1605542056704" duration="1640000" />
       <workItem from="1605597648537" duration="7658000" />
-      <workItem from="1605690676577" duration="2168000" />
-    </task>
-    <task id="LOCAL-00356" summary=".">
-      <created>1603961859961</created>
-      <option name="number" value="00356" />
-      <option name="presentableId" value="LOCAL-00356" />
-      <option name="project" value="LOCAL" />
-      <updated>1603961859962</updated>
+      <workItem from="1605690676577" duration="7108000" />
     </task>
     <task id="LOCAL-00357" summary=".">
       <created>1604143127017</created>
       <option name="project" value="LOCAL" />
       <updated>1605694444186</updated>
     </task>
-    <option name="localTasksCounter" value="405" />
+    <task id="LOCAL-00405" summary=".">
+      <created>1605696730817</created>
+      <option name="number" value="00405" />
+      <option name="presentableId" value="LOCAL-00405" />
+      <option name="project" value="LOCAL" />
+      <updated>1605696730817</updated>
+    </task>
+    <option name="localTasksCounter" value="406" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
     </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="1110" y="259" key="#com.jetbrains.php.refactoring.extractMethod.PhpExtractMethodDialog#function0/0.0.2560.1040@0.0.2560.1040" timestamp="1605437484620" />
-    <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605694440464">
+    <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605696727985">
       <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="1605188136787" />
-    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605694440464" />
-    <state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605104496549">
+    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605696727985" />
+    <state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605726960903">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="635" y="216" key="FileChooserDialogImpl/0.0.1707.920@0.0.1707.920" timestamp="1604227698339" />
-    <state x="952" y="244" key="FileChooserDialogImpl/0.0.2560.1040@0.0.2560.1040" timestamp="1605104496549" />
+    <state x="952" y="244" key="FileChooserDialogImpl/0.0.2560.1040@0.0.2560.1040" timestamp="1605726960903" />
     <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1605344146097">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
       <screen x="0" y="0" width="1707" height="920" />
     </state>
     <state width="498" height="446" key="SwitcherDM/0.0.1707.920@0.0.1707.920" timestamp="1604228166964" />
-    <state x="872" y="240" key="Vcs.Push.Dialog.v2" timestamp="1605436593809">
+    <state x="872" y="240" key="Vcs.Push.Dialog.v2" timestamp="1605696715323">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
-    <state x="872" y="240" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1605436593809" />
+    <state x="872" y="240" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1605696715323" />
     <state x="295" y="0" width="1290" height="907" key="dock-window-1" timestamp="1603274697406">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="295" y="0" width="1290" height="907" key="dock-window-1/0.0.2560.1040@0.0.2560.1040" timestamp="1603274697406" />
-    <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1605598576899">
+    <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1605727985438">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="651" y="227" width="550" height="534" key="find.popup/0.0.1707.920@0.0.1707.920" timestamp="1604301949692" />
-    <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1605598576899" />
+    <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1605727985438" />
     <state x="1056" y="292" key="refactoring.ChangeSignatureDialog" timestamp="1604518096294">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
           <url>file://$PROJECT_DIR$/scripts/lib/freebox.php</url>
           <option name="timeStamp" value="2" />
         </line-breakpoint>
-        <line-breakpoint enabled="true" type="php">
-          <url>file://$PROJECT_DIR$/scripts/lib/shield.php</url>
-          <line>229</line>
-          <option name="timeStamp" value="3" />
-        </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
   </component>
index 7c4ed5d738eef9835316b83b6ba070148939dc57..f4171cb2d23a7e48cd106c0e82514f4e78687425 100644 (file)
@@ -13,6 +13,7 @@ config('HIDEMASK_TIMEOUT', 250);
 //
 config('TVPLAYER', 'shield');
 config('VIDEOPLAYER', 'shield');
+config('THEME', '#051039');
 
 
 if (DISPLAYINTERFACE) {
@@ -28,5 +29,5 @@ if (DISPLAYINTERFACE) {
     include "default.php";
     include ROOT . "/config/media.php";
 
-    $nav=['home','lights','music','media','remote','switch','settings','alert','off'];
+    $nav = ['home', 'lights', 'music', 'media', 'remote', 'switch', 'settings', 'alert', 'off'];
 }
index 6d79a571dc09674cd4da35472161672a448d94fb..24072a020ff2e3c90de554c1bca0f6e886c72446 100644 (file)
@@ -8,6 +8,7 @@ config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'weatherstation');
 config('VOLUME_DEVICE', 'RaspberryPi:lit');
 config('HIDEMASK_TIMEOUT', 250);
+config('THEME','#5c4736');
 
 if (DISPLAYINTERFACE) {
     if (!isset($shortcuts)) {
index a8500e756e422aa992cb5e358a426598f345f02c..5b41d28c09b43b54e565d9fc381ed1330610dd2a 100644 (file)
@@ -5,6 +5,7 @@ config('SQUEEZEBOX_PLAYER', 'Cuisine');
 config('VOLUME', 60);
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
 config('HIDEMASK_TIMEOUT', 250);
+config('THEME','#2e623b');
 
 if (DISPLAYINTERFACE) {
     $c = cour();
index fbf095a074689b1db32a86622abef89039a21d8c..2550ad35163664c16648d7334667273fd551ee97 100644 (file)
@@ -4,6 +4,7 @@ config('ROOM', 'cuisine');
 config('SQUEEZEBOX_PLAYER', 'Cuisine');
 config('HIDEMASK_TIMEOUT', 250);
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
+config('THEME','#222222');
 
 if (DISPLAYINTERFACE) {
     $c = cuisine();
index 3c414d8aac4dd849f525444bc66dda48cc18d025..7554972ffee81c782432c12f0bfe246233fed499 100644 (file)
@@ -6,6 +6,10 @@ if (!isset($favoriteslights)) {
     $favoriteslights = [];
 }
 
+if (!hasConfig('THEME')) {
+    config('THEME', '#0a4a9e');
+}
+
 $roomshome = [['type' => 'separator', 'label' => 'Autres pièces']];
 foreach ($rooms as $room => $label) {
     if (hasConfig('ROOM') && config('ROOM') == $room) {
index ac769c4d6ad79498d597bd9b857bb6c767287098..1993c04d96fd4715179c98245b0595dcfe68b605 100644 (file)
@@ -8,6 +8,7 @@ config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER','weatherstation');
 config('VOLUME_DEVICE', 'SqueezeboxPlayer');
 config('HIDEMASK_TIMEOUT',250);
+config('THEME','#000000');
 
 if (DISPLAYINTERFACE) {
        if (!isset($shortcuts)) {
index 123eb663a61d2fa77c3d1c584863ecad769d108b..35487c5f82996d1fbdb51993e4f118b27f49933c 100644 (file)
@@ -8,6 +8,7 @@ config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'weatherstation');
 config('VOLUME_DEVICE', 'RaspberryPi');
 config('HIDEMASK_TIMEOUT', 250);
+config('THEME','#086d89');
 
 if (DISPLAYINTERFACE) {
     $additionnalfavorites = [];
index d78278f9550515498ced752e71e6a863a70a16ac..f8d22fed85c74fb8955dd9e5b5c611d819b6c837 100644 (file)
@@ -8,6 +8,7 @@ config('SLEEPTYPE', 'screensaver');
 config('SCREENSAVER', 'weatherstation');
 config('HIDEMASK_TIMEOUT', 250);
 config('SLEEPSCREEN', 8);
+config('THEME','#a62634');
 
 
 if (DISPLAYINTERFACE) {
index a9f8a78e6838a2f6cdc756cc6f9b4e267aa28bc8..96cbdc94164181ef0f946cb4502909a37674bd53 100644 (file)
@@ -7,6 +7,7 @@ config('TVPLAYER', 'shield');
 config('VOLUME_DEVICE', 'harmony');
 config('VIDEOPLAYER_DEVICE', 'salon');
 config('HIDEMASK_TIMEOUT', 250);
+config('THEME','#7a6854');
 
 if (DISPLAYINTERFACE) {
     $c = salon();
index bbc166ea82451eaa251e382f0c527a082ed059ab..fc5aea952f4feaf67bf4f82174fba309c711f057 100644 (file)
@@ -11,6 +11,7 @@ config('TVPLAYER', 'mediarasp-small');
 config('VOLUME', 60);
 config('VOLUME_DEVICE', 'Squeezebox');
 config('HIDEMASK_TIMEOUT',250);
+config('THEME','#92475c');
 
 if (DISPLAYINTERFACE) {
     $c = sdb();
index e6717621134219262b1d69aaebc109f662b035da..5a2aac812d9ea1c8c849fc63d398f541eda57a2a 100644 (file)
--- a/index.php
+++ b/index.php
@@ -57,6 +57,9 @@ function relativePath($p)
         <meta name="theme-color" content="#0049a4">
     <?php endif; ?>
     <style type="text/css">
+        html{
+            --theme-color: <?php echo config('THEME');?>;
+        }
         #weatherstation {
             background-image: url('<?php echo relativePath('images/rooms/medium/'.getCurrentConfig().'.jpg') ?>'), linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
             background-blend-mode: multiply;
index 6889ae2748b90cb7d8773f83a564b220e644831f..ed5fc026b79c0eb870531e78332851bfca5505d3 100644 (file)
@@ -1,7 +1,30 @@
-document.addEventListener("deviceready", onDeviceReady, false);
+var DEVICE_READY_BEFORE_JQUERY = false;
+var JQUERY_READY = false;
+var cordovaInitInterval;
+document.addEventListener('deviceready', _onDeviceReady, false);
+
+function _onDeviceReady() {
+    if (JQUERY_READY) {
+        onDeviceReady();
+    } else {
+        DEVICE_READY_BEFORE_JQUERY = true;
+    }
+}
+
+$(function () {
+    JQUERY_READY = true;
+    if (DEVICE_READY_BEFORE_JQUERY) {
+        onDeviceReady();
+    }
+});
 
 function onDeviceReady() {
-    initCordova();
+    cordovaInitInterval = setInterval(function () {
+        if (window.cordova) {
+            clearInterval(cordovaInitInterval);
+            initCordova();
+        }
+    }, 500);
 }
 
 function initCordova() {
@@ -16,22 +39,6 @@ function initCordova() {
     } catch (e) {
         console.log(e);
     }
-    //
-    // try {
-    //     if (location.host === 'home.tortuga.enhydra.fr') {
-    //         var last = localStorage.getItem('lastconfig');
-    //         if (last === null) {
-    //             last = 'salon';
-    //         }
-    //         location.host = last + '.home.tortuga.enhydra.fr';
-    //     } else {
-    //         var e = location.host.split('.');
-    //         localStorage.setItem('lastconfig', e[0]);
-    //     }
-    // } catch (e) {
-    //
-    // }
-
 
     try {
         window.plugins.intentShim.onIntent(function (intent) {
index c7caa26aae121083e0d151ab736231a65aafadfe..05b90bb9196407204db69d9dfdbbceb0eb0b51ff 100644 (file)
@@ -2,7 +2,7 @@
   --mm-ocd-max-width: 440px;
 
   &.mm-spn--light, &.mm-spn--dark {
-    background-color: #000;
+    background-color: var(--theme-color);
   }
 
   &.mm-spn--navbar {
index f2f4da53848b48f7e57dda6d088b971dd6cd6763..478e3e8c15473b640d7c47ac23f696741a3b77ef 100644 (file)
@@ -9,7 +9,7 @@ body.init #splash {
   opacity: 0;
 }
 body #splash {
-  background-color: #0a4a9e;
+  background-color: var(--theme-color);
   position: absolute;
   top: 0;
   left: 0;
@@ -50,7 +50,7 @@ body #splash {
   bottom: 10vh;
   width: 20vh;
   height: 20vh;
-  background-color: #000;
+  background-color: var(--theme-color);
   border-radius: 50% 50%;
   z-index: 2;
 }
@@ -415,7 +415,7 @@ section .col > * span .fa {
 }
 .mm-spn.mm-spn--light,
 .mm-spn.mm-spn--dark {
-  background-color: #000;
+  background-color: var(--theme-color);
 }
 .mm-spn.mm-spn--navbar ul {
   top: 30px !important;
index a33a9b6127e79950caedf029a596b929c03b48dd..caf6e6b3252030a3ec9052f2a18555148651beae 100644 (file)
@@ -14,7 +14,7 @@ body {
   }
 
   #splash {
-    background-color: #0a4a9e;
+    background-color: var(--theme-color);
     position: absolute;
     top: 0;
     left: 0;
@@ -62,7 +62,7 @@ body {
   bottom: @o;
   width: @w;
   height: @w;
-  background-color: #000;
+  background-color:var(--theme-color);
   border-radius: 50% 50%;
   z-index: 2;