Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekiro-kost committed Sep 27, 2023
1 parent 1c37012 commit 8e2e0e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 7 additions & 3 deletions core/api/mobile.api.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,18 @@ function saveMenuFromAppV2($menu, $mobile){
$healthPlugins = [];
$deamons_infos = [];
$objectsPanel = [];
//$pluginPanelMobile = [];
$pluginPanelMobile = [];
//$pluginPanelDesktop= [];
foreach ((plugin::listPlugin()) as $plugin) {
$obArray = utils::o2a($plugin);
$objectId = $obArray['id'];
$objectName = $obArray['name'];
if($plugin->getMobile() != '' && $plugin->getMobile() != 'panel'){
$objectsPanel[$objectId] = $objectName;
if($plugin->getMobile() == $objectId){
$objectsPanel[$objectId] = $objectName;
$pluginPanelMobile[$objectId] = $plugin->getMobile();
}

/*if($plugin->getMobile() != 'panel'){
array_push($pluginPanelMobile, $objectId);
}
Expand All @@ -275,7 +279,7 @@ function saveMenuFromAppV2($menu, $mobile){
array_push($arrayPlugins, $pluginUpdateArray);
}
}
//config::save('pluginPanelMobile', $pluginPanelMobile, 'mobile');
config::save('pluginPanelMobile', $pluginPanelMobile, 'mobile');
//config::save('pluginPanelDesktop', $pluginPanelDesktop, 'mobile');
$return[$idBox]['informations']['objects']['panel'] = $objectsPanel;
$categories = [];
Expand Down
11 changes: 4 additions & 7 deletions core/class/mobile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1120,14 +1120,11 @@ 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') {
${'tabUrl' . $i} = "/index.php?v=m&p={$objectId}&app_mode=1";
//$pluginPanelMobile = config::byKey('pluginPanelMobile', 'mobile');

$pluginPanelMobile = config::byKey('pluginPanelMobile', 'mobile');
${'tabUrl' . $i} = "/index.php?v=m&p={$pluginPanelMobile[$objectId]}&app_mode=1";
//$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 8e2e0e3

Please sign in to comment.