]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Thu, 12 Nov 2020 08:58:33 +0000 (09:58 +0100)
committerVincent <vincent@enhydra.fr>
Thu, 12 Nov 2020 08:58:33 +0000 (09:58 +0100)
.idea/workspace.xml
js/cordova.js
js/home.js
scripts/lib/lib.php
scripts/lib/remoteinfos.php

index 87447325549619478afd5c64b7099dd2535244f1..3a15a4b06118e9dae3fe4db4237c1e392f5bf6cf 100644 (file)
@@ -2,7 +2,11 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
-      <change beforePath="$PROJECT_DIR$/scripts/share.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/share.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/js/cordova.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/cordova.js" 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/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/lib/remoteinfos.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/remoteinfos.php" 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="24094000" />
-    </task>
-    <task id="LOCAL-00336" summary=".">
-      <created>1595786773233</created>
-      <option name="number" value="00336" />
-      <option name="presentableId" value="LOCAL-00336" />
-      <option name="project" value="LOCAL" />
-      <updated>1595786773234</updated>
+      <workItem from="1605087787424" duration="29967000" />
     </task>
     <task id="LOCAL-00337" summary=".">
       <created>1595831538154</created>
       <option name="project" value="LOCAL" />
       <updated>1605121533133</updated>
     </task>
-    <option name="localTasksCounter" value="385" />
+    <task id="LOCAL-00385" summary=".">
+      <created>1605121882930</created>
+      <option name="number" value="00385" />
+      <option name="presentableId" value="LOCAL-00385" />
+      <option name="project" value="LOCAL" />
+      <updated>1605121882930</updated>
+    </task>
+    <option name="localTasksCounter" value="386" />
     <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="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605121508418">
+    <state x="198" y="0" width="737" height="502" key="CommitChangelistDialog2" timestamp="1605121880134">
       <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="1605121508418" />
+    <state x="198" y="0" width="745" height="567" key="CommitChangelistDialog2/0.0.2560.1040@0.0.2560.1040" timestamp="1605121880134" />
     <state x="952" y="244" key="FileChooserDialogImpl" timestamp="1605104496549">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
       <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="1605094722751">
+    <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1605123919400">
       <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="1605094722751" />
+    <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1605123919400" />
     <state x="1056" y="292" key="refactoring.ChangeSignatureDialog" timestamp="1604518096294">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index e0872a363d6a39637c19ac5f3b0e4a4d9c3ab334..2b0cfe4bf23ada7e170e556dd7074cef94cad6a4 100644 (file)
@@ -5,7 +5,6 @@ function onDeviceReady() {
 }
 
 function initCordova() {
-
     try {
         screen.orientation.lock('landscape');
     } catch (e) {
@@ -17,6 +16,19 @@ function initCordova() {
     } catch (e) {
         console.log(e);
     }
+    console.log(location.host);
+
+    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]);
+    }
+
 
     try {
         window.plugins.intentShim.onIntent(function (intent) {
index dcca7e94a28a1d1091143b24fe3865a22751d22d..0621e40a1a4862f3e52b199a0181681f974bf353 100644 (file)
@@ -272,6 +272,7 @@ $(function () {
             default:
                 break;
         }
+        menudrawer.close();
         return false;
     });
 
@@ -855,6 +856,8 @@ function resize() {
     $("section").css('fontSize', s);
     if ($('section:visible .col').length > 0) {
         var minWidth = baseCellWidth * s * $('section:visible .col').length + 40;
+    } else {
+        minWidth = ww;
     }
     $("main").css({
         height: hh,
index 68e603f161f326e4990c50f22a012989099e61e2..dcf3b148717b41346b0d036285b44e15d5640019 100644 (file)
@@ -77,20 +77,19 @@ function getCurrentConfig()
         $_GET['c'] = $forceConfig;
     }
 
+    $expires = time() + 60 * 60 * 24 * 30;
     if (isset($_GET['c'])) {
-        setcookie('config', $_GET['c'], 0, '/');
-        $_COOKIE['config'] = $_GET['c'];
+        setcookie('homeconfig', $_GET['c'], $expires, '/', 'enhydra.fr');
+        $_COOKIE['homeconfig'] = $_GET['c'];
     }
 
-    if (!isset($_COOKIE['config'])) {
+    if (!isset($_COOKIE['homeconfig'])) {
         if (!headers_sent()) {
-            setcookie('config', 'default', 0, '/');
+            setcookie('homeconfig', 'salon', $expires, '/', 'enhydra.fr');
         }
-
-        $_COOKIE['config'] = 'default';
-
+        $_COOKIE['homeconfig'] = 'salon';
     }
-    return $_COOKIE['config'];
+    return $_COOKIE['homeconfig'];
 }
 
 function config($key = null, $value = null)
index 829c73a4d647ca433f45f0c90086e625ebcef0ea..da2874e5dfcc91b9e745e690a9ef767f811de021 100644 (file)
@@ -9,11 +9,11 @@ function remoteInfos()
     } else {
         if (($p === 'netflix' || $p === 'tv') && config('TVPLAYER') === 'shield') {
             $res = ['type' => 'shield', 'can_seek' => false];
-        }else {
+        } else {
             if ($p == 'mediarasp') {
-                if(config('VIDEOPLAYER')==='shield'){
+                if (config('VIDEOPLAYER') === 'shield') {
                     $res = ['type' => 'shieldmedia', 'can_seek' => false];
-                }else {
+                } else {
                     $res = mediaraspRemoteInfos();
                 }
             } else {
@@ -23,6 +23,9 @@ function remoteInfos()
     }
     $res['playing'] = $playing;
     $res['device'] = config('DEVICE');
+    if ($res['type'] === 'mycanal') {
+        $res['type'] = 'shield';
+    }
     $json = json_encode($res);
 
     $cacheName = 'remote_infos_' . config('DEVICE');