- new map icons added

- fixed a "map sync" issue with multiple open tabs, #446
- fixed a bug where connections "disappear" from map for some seconds
- fixed a bug where "open ingame info" for char/system does not work in some UI tables
- upgraded [_Font Awesome_](https://fontawesome.com) icon lib `v5.2.0` → `v5.9.0`
This commit is contained in:
Mark Friedrich
2019-07-06 17:27:35 +02:00
parent f4f30e0975
commit c85ed14eb0
49 changed files with 9667 additions and 4128 deletions

View File

@@ -886,7 +886,7 @@ class Map extends Controller\AccessController {
if( !is_null($map = $activeCharacter->getMap($mapId)) ){
// check character log (current system) and manipulate map (e.g. add new system)
if($mapTracking){
$map = $this->updateMapData($activeCharacter, $map);
$map = $this->updateMapByCharacter($map, $activeCharacter);
}
// mapUserData ----------------------------------------------------------------------------------------
@@ -911,7 +911,7 @@ class Map extends Controller\AccessController {
// data for currently selected system
$return->system = $system->getData();
$return->system->signatures = $system->getSignaturesData();
$return->system->sigHistory = $system ->getSignaturesHistoryData();
$return->system->sigHistory = $system->getSignaturesHistory();
$return->system->structures = $system->getStructuresData();
}
@@ -928,28 +928,28 @@ class Map extends Controller\AccessController {
echo json_encode($return);
}
/**
* add new map connection based on current $character location
* @param Pathfinder\CharacterModel $character
* update map connections/systems based on $character´s location logs
* @param Pathfinder\MapModel $map
* @param Pathfinder\CharacterModel $character
* @return Pathfinder\MapModel
* @throws Exception
*/
protected function updateMapData(Pathfinder\CharacterModel $character, Pathfinder\MapModel $map){
protected function updateMapByCharacter(Pathfinder\MapModel $map, Pathfinder\CharacterModel $character) : Pathfinder\MapModel {
// map changed. update cache (system/connection) changed
$mapDataChanged = false;
if(
( $mapScope = $map->getScope() ) &&
( $mapScope->name != 'none' ) && // tracking is disabled for map
( $log = $character->getLog() )
( $targetLog = $character->getLog() )
){
// character is currently in a system
$sessionCharacter = $this->getSessionCharacterData();
$sourceSystemId = (int)$sessionCharacter['PREV_SYSTEM_ID'];
$targetSystemId = (int)$log->systemId;
$targetSystemId = (int)$targetLog->systemId;
// get 'character log' from source system. If not log found -> assume $sourceLog == $targetLog
$sourceLog = $character->getLogPrevSystem($targetSystemId) ? : $targetLog;
$sourceSystemId = (int)$sourceLog->systemId;
if($sourceSystemId){
$sourceSystem = null;
@@ -1111,17 +1111,17 @@ class Map extends Controller\AccessController {
){
// .. do not add connection if character got "podded" -------------------------------------
if(
$log->shipTypeId == 670 &&
$targetLog->shipTypeId == 670 &&
$character->cloneLocationId
){
// .. current character location must be clone location
if(
(
'station' == $character->cloneLocationType &&
$character->cloneLocationId == $log->stationId
$character->cloneLocationId == $targetLog->stationId
) || (
'structure' == $character->cloneLocationType &&
$character->cloneLocationId == $log->structureId
$character->cloneLocationId == $targetLog->structureId
)
){
// .. now we need to check jump distance between systems
@@ -1152,7 +1152,7 @@ class Map extends Controller\AccessController {
$connection &&
$connection->isWormhole()
){
$connection->logMass($log);
$connection->logMass($targetLog);
}
}
}

View File

@@ -33,7 +33,7 @@ class SignatureHistory extends AbstractRestController {
$system->getById($systemId);
if($system->hasAccess($activeCharacter)){
$historyDataAll = $system->getSignaturesHistoryData();
$historyDataAll = $system->getSignaturesHistory();
foreach($historyDataAll as $historyEntry){
$label = [
$historyEntry['character']->name,
@@ -74,7 +74,7 @@ class SignatureHistory extends AbstractRestController {
$system = Pathfinder\AbstractPathfinderModel::getNew('SystemModel');
$system->getById($systemId, 0);
if($system->hasAccess($activeCharacter)){
if($historyEntry = $system->getSignatureHistoryData($stamp)){
if($historyEntry = $system->getSignatureHistoryEntry($stamp)){
$updateSignaturesHistory = false;
// history entry found for $stamp -> format signatures data

View File

@@ -36,7 +36,7 @@ class System extends AbstractRestController {
){
$systemData = $system->getData();
$systemData->signatures = $system->getSignaturesData();
$systemData->sigHistory = $system->getSignaturesHistoryData();
$systemData->sigHistory = $system->getSignaturesHistory();
$systemData->structures = $system->getStructuresData();
}
}

View File

@@ -300,7 +300,7 @@ class Route extends Controller\AccessController {
private function filterJumpData($filterData = [], $keepSystems = []){
if($filterData['flag'] == 'secure'){
// remove all systems (TrueSec < 0.5) from search arrays
$this->jumpArray = array_filter($this->jumpArray, function($systemId) use($keepSystems) {
$this->jumpArray = array_filter($this->jumpArray, function($systemId) use ($keepSystems) {
$systemNameData = $this->nameArray[$systemId];
$systemSec = $systemNameData[3];

View File

@@ -189,20 +189,10 @@ class User extends Controller\Controller{
echo json_encode($return);
}
/**
* delete the character log entry for the current active (main) character
* @param \Base $f3
* @throws Exception
*/
public function deleteLog(\Base $f3){
if($activeCharacter = $this->getCharacter()){
$activeCharacter->logout(false, true, false);
}
}
/**
* log the current user out + clear character system log data
* @param \Base $f3
* @throws Exception
*/
public function logout(\Base $f3){
$this->logoutCharacter($f3, false, true, true, true);