Merge pull request #8 from goryn-clade/dev2.1.1

Dev2.1.1
This commit is contained in:
Sam
2021-08-07 00:58:16 +02:00
committed by GitHub
221 changed files with 111 additions and 45 deletions

View File

@@ -655,6 +655,13 @@ class CharacterModel extends AbstractPathfinderModel {
){
// no corp/ally restrictions set -> any character is allowed to login
$authStatus = 'OK';
}elseif(
// check if session_sharing is enabled and if a character is saved in session
Config::getPathfinderData('login.session_sharing') === 1 &&
is_array($this->getF3()->get(User::SESSION_KEY_CHARACTERS))
){
// authorized character is already logged in -> any subsequent character is allowed to login
$authStatus = 'OK';
}else{
// check if character is set in whitelist
if(
@@ -1292,25 +1299,29 @@ class CharacterModel extends AbstractPathfinderModel {
* @return MapModel[]
*/
public function getMaps() : array {
$maps = [];
if(Config::getPathfinderData('login.session_sharing') === 1){
$maps = $this->getSessionCharacterMaps();
}else{
$maps = [];
if($alliance = $this->getAlliance()){
$maps = array_merge($maps, $alliance->getMaps());
}
if($alliance = $this->getAlliance()){
$maps = array_merge($maps, $alliance->getMaps());
}
if($corporation = $this->getCorporation()){
$maps = array_merge($maps, $corporation->getMaps());
}
if($corporation = $this->getCorporation()){
$maps = array_merge($maps, $corporation->getMaps());
}
if(is_object($this->characterMaps)){
$mapCountPrivate = 0;
foreach($this->characterMaps as $characterMap){
if(
$mapCountPrivate < Config::getMapsDefaultConfig('private')['max_count'] &&
$characterMap->mapId->isActive()
){
$maps[] = $characterMap->mapId;
$mapCountPrivate++;
if(is_object($this->characterMaps)){
$mapCountPrivate = 0;
foreach($this->characterMaps as $characterMap){
if(
$mapCountPrivate < Config::getMapsDefaultConfig('private')['max_count'] &&
$characterMap->mapId->isActive()
){
$maps[] = $characterMap->mapId;
$mapCountPrivate++;
}
}
}
}
@@ -1318,6 +1329,51 @@ class CharacterModel extends AbstractPathfinderModel {
return $maps;
}
/**
* get all accessible map models for all characters in session
* using mapIds and characters index arrays to track what has already been processed
* @return MapModel[]
*/
public function getSessionCharacterMaps() : array {
$maps = ["maps" => [], "mapIds" => []];
// get all characters in session and iterate over them
foreach($this->getAll(array_column($this->getF3()->get(User::SESSION_KEY_CHARACTERS), 'ID')) as $character){
if($alliance = $character->getAlliance()){
foreach($alliance->getMaps() as $map){
if(!in_array($map->_id, $maps["mapIds"])){
array_push($maps["maps"], $map);
array_push($maps["mapIds"], $map->id);
}
}
}
if($corporation = $character->getCorporation()){
foreach($corporation->getMaps() as $map){
if(!in_array($map->_id, $maps["mapIds"])){
array_push($maps["maps"], $map);
array_push($maps["mapIds"], $map->id);
}
}
}
if(is_object($character->characterMaps)){
$mapCountPrivate = 0;
foreach($character->characterMaps as $characterMap){
if(
$mapCountPrivate < Config::getMapsDefaultConfig('private')['max_count'] &&
$characterMap->mapId->isActive()
){
array_push($maps["maps"], $characterMap->mapId);
$mapCountPrivate++;
}
}
}
}
return $maps["maps"];
}
/**
* delete current location
*/
@@ -1424,4 +1480,4 @@ class CharacterModel extends AbstractPathfinderModel {
return (new self())->find($query);
}
}
}

View File

@@ -396,7 +396,7 @@ class MapModel extends AbstractMapTrackingModel {
if( !empty($val) ){
$hosts = [
'slack' => ['hooks.slack.com'],
'discord' => ['discordapp.com', 'ptb.discordapp.com']
'discord' => ['discord.com', 'discordapp.com', 'ptb.discordapp.com']
];
if(

View File

@@ -13,8 +13,8 @@ NAME = Pathfinder
; Version is used for CSS/JS cache busting and is part of the URL for static resources:
; e.g. public/js/vX.X.X/app.js
; Syntax: String (current version)
; Default: v2.1.0
VERSION = v2.1.0
; Default: v2.1.1
VERSION = v2.1.1
; Contact information [optional]
; Shown on 'licence', 'contact' page.
@@ -70,6 +70,13 @@ COOKIE_EXPIRE = 30
; Default: 0
MODE_MAINTENANCE = 0
; Share maps between logged in characters in the same session
; If enabled this will grant the active character access to any maps
; that other characters from the "switch character" menu have access to
; Syntax 0 | 1
; Default 0
SESSION_SHARING = 1
; Login restrictions (white lists)
; Login/registration can be restricted to specific groups.
; Use comma separated strings for CCP Ids (e.g. 1000166,1000080).

View File

@@ -15,10 +15,10 @@ INSERT INTO `race` (`id`, `created`, `updated`, `name`, `description`, `factionI
-- Add new corporation definitions
INSERT INTO `corporation` (`id`, `created`, `updated`, `name`, `ticker`, `dateFounded`, `memberCount`, `isNPC`, `factionId`, `allianceId`) VALUES
(1000292, 2020-10-29 20:44:32', '2020-10-29 20:44:32', 'Veles Clade', 'CLVEL', NULL, 1, 1, NULL, NULL),
(1000293, 2020-10-29 20:44:32', '2020-10-29 20:44:32', 'Perun Clade', 'CLPER', NULL, 1, 1, NULL, NULL),
(1000294, 2020-10-29 20:44:32', '2020-10-29 20:44:32', 'Svarog Clade', 'CLSVA', NULL, 1, 1, NULL, NULL),
(1000298, 2020-10-29 20:44:32', '2020-10-29 20:44:32', 'The Convocation of Triglav', 'CTPSV', NULL, 1, 1, NULL, NULL);
(1000292, '2020-10-29 20:44:32', '2020-10-29 20:44:32', 'Veles Clade', 'CLVEL', NULL, 1, 1, NULL, NULL),
(1000293, '2020-10-29 20:44:32', '2020-10-29 20:44:32', 'Perun Clade', 'CLPER', NULL, 1, 1, NULL, NULL),
(1000294, '2020-10-29 20:44:32', '2020-10-29 20:44:32', 'Svarog Clade', 'CLSVA', NULL, 1, 1, NULL, NULL),
(1000298, '2020-10-29 20:44:32', '2020-10-29 20:44:32', 'The Convocation of Triglav', 'CTPSV', NULL, 1, 1, NULL, NULL);
-- Add the new faction defintions
INSERT INTO `faction` (`id`, `created`, `updated`, `name`, `description`, `sizeFactor`, `stationCount`, `stationSystemCount`) VALUES

View File

@@ -410,7 +410,8 @@
6: 'U574 - C6',
7: 'S047 - H',
8: 'N290 - L',
9: 'K329 - 0.0'
9: 'K329 - 0.0',
10: 'F216 - T Pochven'
};
let c5WH = {
@@ -422,7 +423,8 @@
6: 'V753 - C6',
7: 'D792 - H',
8: 'C140 - L',
9: 'Z142 - 0.0'
9: 'Z142 - 0.0',
10: 'F216 - T Pochven'
};
let c6WH = {
@@ -437,7 +439,8 @@
9: 'C140 - L',
10: 'C391 - L',
11: 'C248 - 0.0',
12: 'Z142 - 0.0'
12: 'Z142 - 0.0',
13: 'F216 - T Pochven'
};
// Shattered WH (some of them are static)

View File

@@ -128,7 +128,7 @@ define([
*/
render(mapId, systemData){
this._systemData = systemData;
let showStationTable = ['H', 'L', '0.0', 'C12'].includes(Util.getObjVal(this._systemData, 'security'));
let showStationTable = ['H', 'L', '0.0', 'T', 'C12'].includes(Util.getObjVal(this._systemData, 'security'));
this._bodyEl = Object.assign(document.createElement('div'), {
className: this._config.bodyClassName

View File

@@ -1,6 +1,6 @@
{
"name": "pathfinder-eve",
"version": "2.1.0",
"version": "2.1.1",
"engines": {
"node": "12.x"
},

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 917 KiB

After

Width:  |  Height:  |  Size: 917 KiB

View File

Before

Width:  |  Height:  |  Size: 641 KiB

After

Width:  |  Height:  |  Size: 641 KiB

View File

Before

Width:  |  Height:  |  Size: 409 KiB

After

Width:  |  Height:  |  Size: 409 KiB

View File

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 226 KiB

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

View File

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 110 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 57 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 115 KiB

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Some files were not shown because too many files have changed in this diff Show More