]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Sat, 10 Apr 2021 11:42:32 +0000 (13:42 +0200)
committerVincent <vincent@enhydra.fr>
Sat, 10 Apr 2021 11:42:32 +0000 (13:42 +0200)
.idea/workspace.xml
config/global.php
js/home.js

index b79cda06c0123eac9faa43d14541d735febedd9e..9eab33f32036339e50a45c4bfba473c64316b170 100644 (file)
@@ -2,14 +2,9 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change beforePath="$PROJECT_DIR$/.htaccess" beforeDir="false" afterPath="$PROJECT_DIR$/.htaccess" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/.idea/watcherTasks.xml" beforeDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/config/cuisine.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/cuisine.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/global.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/global.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/scripts/lib/weatherstation.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/weatherstation.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/weatherstation.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/weatherstation.css" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/weatherstation.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/weatherstation.less" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
         <option name="Make" enabled="true" />
       </method>
     </configuration>
-    <configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
-      <option name="arquillianRunConfiguration">
-        <value>
-          <option name="containerStateName" value="" />
-        </value>
-      </option>
-      <option name="TEST_OBJECT" value="class" />
-      <method v="2">
-        <option name="Make" enabled="true" />
-      </method>
-    </configuration>
     <configuration default="true" type="ArquillianTestNG" factoryName="">
       <option name="arquillianRunConfiguration">
         <value>
       <workItem from="1617266503786" duration="463000" />
       <workItem from="1617794643348" duration="128000" />
       <workItem from="1617794856868" duration="1126000" />
-      <workItem from="1617801536336" duration="3444000" />
-    </task>
-    <task id="LOCAL-00413" summary=".">
-      <created>1606647119118</created>
-      <option name="number" value="00413" />
-      <option name="presentableId" value="LOCAL-00413" />
-      <option name="project" value="LOCAL" />
-      <updated>1606647119118</updated>
+      <workItem from="1617801536336" duration="4107000" />
+      <workItem from="1618050897134" duration="2465000" />
     </task>
     <task id="LOCAL-00414" summary=".">
       <created>1606677800857</created>
       <option name="project" value="LOCAL" />
       <updated>1617266964333</updated>
     </task>
-    <option name="localTasksCounter" value="462" />
+    <task id="LOCAL-00462" summary=".">
+      <created>1617871680635</created>
+      <option name="number" value="00462" />
+      <option name="presentableId" value="LOCAL-00462" />
+      <option name="project" value="LOCAL" />
+      <updated>1617871680635</updated>
+    </task>
+    <option name="localTasksCounter" value="463" />
     <servers />
   </component>
   <component name="TypeScriptGeneratedFilesManager">
index d2bcda0414d5aa685799761ae1b213264ed19caa..7f15aaa0c23e5e858c0bc7a8c1efe3f02dc02b41 100644 (file)
@@ -33,11 +33,18 @@ $squeezeboxPlayers = array(
 );
 
 
-$phones = array('vincent' => array(
-    'ip' => '192.168.13.31',
-    'key' => 'APA91bHeWfPc86eVpVzYDfQHdolELsdHdlNou2a2YoMWhBuAG9odAlfZLBjve9zDBq4U04e_zd2tA864El8Z2NfUh7XJktOHbU4F1mdmAVczklg5ZFRClvhX4f8fqfZ9YLG94NdBQbGn',
-    'password' => '4pyA?Rnyeyc1$44M')
-);
+$phones = [
+    'vincent' => [
+        'ip' => '192.168.13.31',
+        'key' => 'APA91bHeWfPc86eVpVzYDfQHdolELsdHdlNou2a2YoMWhBuAG9odAlfZLBjve9zDBq4U04e_zd2tA864El8Z2NfUh7XJktOHbU4F1mdmAVczklg5ZFRClvhX4f8fqfZ9YLG94NdBQbGn',
+        'password' => '4pyA?Rnyeyc1$44M'
+    ],
+    'cuisine' => [
+        'ip' => '192.168.13.32',
+        'key' => 'dmGYolpN-k4:APA91bEcMcfkZ0jZViEvyqyVWoT71-vQko9DE0wwg-vzPkZ5-lHwiVJDH38dXfIoWrHWTrtEiMsv-6TrebFR-dNOLhVoVUb3rCsehmLi-Ew17lkP75Yqds3KsWEiyF_yx-i-9dc_4ewV',
+        'password' => '4pyA?Rnyeyc1$44M'
+    ]
+];
 
 $squeezeboxPlayersByRoom = [
     'bureau' => ['Bureau'],
index 66bbe51bf6128c027d2ee1182fe844ec0dcfb848..162973ba8c7520982e07a8194ccebde6788594ea 100644 (file)
@@ -512,7 +512,11 @@ function screenOff() {
 
     if (lastOffScreen < Date.now() - 30000) {
         lastOffScreen = Date.now();
-        sshCommand('/usr/local/bin/screenoff');
+        if (androidApp) {
+            phonetask('screenoff');
+        } else {
+            sshCommand('/usr/local/bin/screenoff');
+        }
         gotohomeTimeout = setTimeout(function () {
             showSection('home', true);
         }, 7000);
@@ -529,7 +533,11 @@ function screenOn(hidescreensaver) {
     if (hidescreensaver === undefined) {
         hidescreensaver = true;
     }
-    sshCommand('/usr/local/bin/screenon');
+    if (androidApp) {
+        phonetask('screenon');
+    } else {
+        sshCommand('/usr/local/bin/screenon');
+    }
     lastOffScreen = 0;
     if (hidescreensaver) {
         hideScreenSaver();
@@ -787,6 +795,13 @@ function stopSqueeze() {
     }
 }
 
+function phonetask(task, device) {
+    if (device === undefined) {
+        device = CONFIG.DEVICE;
+    }
+    $.get('scripts/phonetask.php?phone=' + device + '&task=' + task);
+}
+
 function showSection(section, force) {
     if (force === undefined) {
         force = false;
@@ -838,6 +853,7 @@ function _showSection(section) {
         return;
     }
 
+    displayLoader();
     if ($('main').find('section[data-section="' + section + '"]').length === 0) {
         $('main').append(SECTIONS[section]);
     } else {
@@ -850,6 +866,9 @@ function _showSection(section) {
 
     resize();
     $("#scrollholder").scrollLeft(0);
+    setTimeout(function () {
+        hideLoader();
+    }, 250);
 }
 
 function displayLoader(e) {