Skip to content

Commit

Permalink
only panels v=m
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekiro-kost committed Sep 27, 2023
1 parent f3f8732 commit aecbc29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
16 changes: 8 additions & 8 deletions core/api/mobile.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,21 +245,21 @@ function saveMenuFromAppV2($menu, $mobile){
$healthPlugins = [];
$deamons_infos = [];
$objectsPanel = [];
$pluginPanelMobile = [];
$pluginPanelDesktop= [];
//$pluginPanelMobile = [];
//$pluginPanelDesktop= [];
foreach ((plugin::listPlugin()) as $plugin) {
$obArray = utils::o2a($plugin);
$objectId = $obArray['id'];
$objectName = $obArray['name'];
if($plugin->getMobile() != '' || $plugin->getDisplay() != ''){
if($plugin->getMobile() != '' && $plugin->getMobile() != 'panel'){
$objectsPanel[$objectId] = $objectName;
if($plugin->getMobile() != 'panel'){
/*if($plugin->getMobile() != 'panel'){
array_push($pluginPanelMobile, $objectId);
}
if($plugin->getDisplay() == 'panel' || $plugin->getMobile() == 'panel'){
if( $plugin->getMobile() == 'panel'){
$objectsPanel[$objectId] = $objectName;
array_push($pluginPanelDesktop, $objectId);
}
} */
}
$update = $plugin->getUpdate();
if(is_object($update)){
Expand All @@ -275,8 +275,8 @@ function saveMenuFromAppV2($menu, $mobile){
array_push($arrayPlugins, $pluginUpdateArray);
}
}
config::save('pluginPanelMobile', $pluginPanelMobile, 'mobile');
config::save('pluginPanelDesktop', $pluginPanelDesktop, 'mobile');
//config::save('pluginPanelMobile', $pluginPanelMobile, 'mobile');
//config::save('pluginPanelDesktop', $pluginPanelDesktop, 'mobile');
$return[$idBox]['informations']['objects']['panel'] = $objectsPanel;
$categories = [];
foreach (jeedom::getConfiguration('eqLogic:category') as $key => $value) {
Expand Down
9 changes: 5 additions & 4 deletions core/class/mobile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1120,13 +1120,14 @@ public static function configMenuCustom($eqId, $jeedomVersion)
} else if ($typeObject == 'plan') {
${'tabUrl' . $i} = "/index.php?v={$webviewUrl}&p=plan&plan_id={$objectId}";
} else if ($typeObject == 'panel') {
$pluginPanelMobile = config::byKey('pluginPanelMobile', 'mobile');
$pluginPanelDesktop = config::byKey('pluginPanelDesktop', 'mobile');
if(in_array($objectId, $pluginPanelDesktop)){
${'tabUrl' . $i} = "/index.php?v=m&p={$objectId}";
//$pluginPanelMobile = config::byKey('pluginPanelMobile', 'mobile');
//$pluginPanelDesktop = config::byKey('pluginPanelDesktop', 'mobile');
/* if(in_array($objectId, $pluginPanelDesktop)){
${'tabUrl' . $i} = "/index.php?v=d&m={$objectId}&p=panel";
}else if(in_array($objectId, $pluginPanelMobile)){
${'tabUrl' . $i} = "/index.php?v=m&p={$objectId}";
}
}*/

//$test = "/index.php?v=m&p={$objectId}";
//log::add('mobile', 'debug', 'PANEL : ' .$test);
Expand Down

0 comments on commit aecbc29

Please sign in to comment.