OGB optimized landing page

OGB map fixes
This commit is contained in:
Exodus 4D
2015-09-01 23:27:41 +02:00
committed by Exodus4D
parent e8bb3b29e4
commit ae60b4122a
16 changed files with 247 additions and 118 deletions

View File

@@ -531,7 +531,6 @@ class Map extends \Controller\AccessController {
if( !is_null($map) ){
$return->mapUserData[] = $map->getUserData();
// request signature data for a system if user has map access!
if( $map->id === $requestSystemData->mapId ){
$system = $map->getSystem( $requestSystemData->systemId );
@@ -558,6 +557,7 @@ class Map extends \Controller\AccessController {
// get current user data -> this should not be cached because each user has different personal data
// even if they have multiple characters using the same map!
$return->userData = $user->getData();
}else{
// user logged off
$return->error[] = $this->getUserLoggedOffError();

View File

@@ -33,9 +33,12 @@ class MailController extends \SMTP{
*/
public function sendRegistrationKey($to, $msg){
$this->set('To', '"<' . $to . '>');
$this->set('From', '"PATHFINDER" <' . Controller::getEnvironmentData('SMTP_FROM') . '>');
$this->set('Subject', 'PATHFINDERR - Registration Key');
$this->set('To', '<' . $to . '>');
$this->set('From', 'Pathfinder <' . Controller::getEnvironmentData('SMTP_FROM') . '>');
$this->set('Subject', 'Registration Key');
$this->set('Error-To', '<' . Controller::getEnvironmentData('SMTP_ERROR') . '>');
$this->set('MIME-Version', '1.0');
$this->set('Content-Type', 'text/html; charset=ISO-8859-1');
$status = $this->send($msg);
return $status;

View File

@@ -83,7 +83,7 @@ class UserModel extends BasicModel {
// set active character with log data
$activeUserCharacter = $this->getActiveUserCharacter();
if($activeUserCharacter){
$userData->character = $activeUserCharacter->getData();
$userData->character = $activeUserCharacter->getData(true);
}
return $userData;
@@ -450,11 +450,35 @@ class UserModel extends BasicModel {
if( $character->dry() ){
// this can happen if a valid user plays the game with a not registered character
// whose API is not registered -> save new character or update character data
$corporationId = array_key_exists('corpid', $apiController->values) ? $apiController->values['corpid'] : null;
$allianceId = array_key_exists('allianceid', $apiController->values) ? $apiController->values['allianceid'] : null;
// check if corp exists
if( !is_null($corporationId) ){
$corporation = self::getNew('CorporationModel');
$corporation->getById( (int)$corporationId );
if( $corporation->dry() ){
$corporation->id = $corporationId;
$corporation->name = $apiController->values['corpname'];
$corporation->save();
}
}
// check if ally exists
if( !is_null($allianceId) ){
$alliance = self::getNew('AllianceModel');
$alliance->getById( (int)$allianceId );
if( $alliance->dry() ){
$alliance->id = $allianceId;
$alliance->name = $apiController->values['alliancename'];
$alliance->save();
}
}
$character->id = (int) $apiController->values['charid'];
$character->name = $apiController->values['charname'];
$character->corporationId = array_key_exists('corpid', $apiController->values) ? $apiController->values['corpid'] : null;
$character->allianceId = array_key_exists('allianceid', $apiController->values) ? $apiController->values['allianceid'] : null;
$character->corporationId = $corporationId;
$character->allianceId = $allianceId;
$character->save();
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -7,6 +7,7 @@ app/config/system_effect.js
app/config/signature_type.js
lib/bootstrap.min.js
lib/bootbox.min.js
app/ccp.js
lib/velocity.min.js
lib/velocity.ui.min.js
lib/jquery.mCustomScrollbar.concat.min.js
@@ -20,7 +21,6 @@ app/util.js
lib/mustache.min.js
app/render.js
app/logging.js
app/ccp.js
lib/requirejs/text.js
text!img/logo.svg!strip
text!templates/modules/header.html
@@ -68,6 +68,7 @@ app/config/system_effect.js
app/config/signature_type.js
lib/bootstrap.min.js
lib/bootbox.min.js
app/ccp.js
lib/velocity.min.js
lib/velocity.ui.min.js
lib/jquery.mCustomScrollbar.concat.min.js
@@ -80,7 +81,6 @@ lib/bootstrap2-toggle.min.js
app/util.js
lib/mustache.min.js
app/render.js
app/ccp.js
lib/blueimp-helper.js
lib/blueimp-gallery.js
lib/EasePack.min.js

View File

@@ -11,6 +11,12 @@ define([
$.fn.contextMenu = function (settings) {
// animation
var animationInType = CCP.isInGameBrowser() ? 'fadeIn' : 'transition.flipXIn';
var animationInDuration = CCP.isInGameBrowser() ? 0 : 150;
var animationOutType = CCP.isInGameBrowser() ? 'fadeOut' : 'transition.flipXOut';
var animationOutDuration = CCP.isInGameBrowser() ? 0 : 150;
return this.each(function () {
// Open context menu
@@ -44,8 +50,8 @@ define([
position: 'absolute',
left: getLeftLocation(originalEvent),
top: getTopLocation(originalEvent)
}).velocity('transition.flipXIn', {
duration: CCP.isInGameBrowser() ? 0 : 150,
}).velocity(animationInType, {
duration: animationInDuration,
complete: function(){
// set context menu "click" observer
$(this).off('click').one('click', {component: component, position:{x: getLeftLocation(originalEvent), y: getTopLocation(originalEvent)}}, function (e) {
@@ -66,8 +72,8 @@ define([
//make sure menu closes on any click
$(document).one('click.closeContextmenu', function () {
$('.dropdown-menu[role="menu"]').velocity('transition.flipXOut', {
duration: CCP.isInGameBrowser() ? 0 : 150
$('.dropdown-menu[role="menu"]').velocity(animationOutType, {
duration: animationOutDuration
});
});

View File

@@ -2926,8 +2926,8 @@ define([
userCount: 0 // active user in a map
};
// check if user is currently in "this" system
var currentUserIsHere = false;
// check if current user was found on the map
var currentUserOnMap = false;
// get all systems
var systems = mapElement.find('.' + config.systemClass);
@@ -2941,6 +2941,9 @@ define([
var tempUserData = null;
// check if user is currently in "this" system
var currentUserIsHere = false;
var j = userData.data.systems.length;
// search backwards to avoid decrement the counter after splice()
@@ -2960,7 +2963,7 @@ define([
}
// the current user can only be in a single system -------------------------------------------------------
if( !currentUserIsHere){
if( !currentUserOnMap){
if(
currentCharacterLog &&
@@ -2968,6 +2971,8 @@ define([
currentCharacterLog.system.id === systemId
){
currentUserIsHere = true;
currentUserOnMap = true;
// set current location data for header update
headerUpdateData.currentSystemId = $(system).data('id');
headerUpdateData.currentSystemName = currentCharacterLog.system.name;
@@ -3008,50 +3013,43 @@ define([
// current user was not found on any map system -> add new system to map where the user is in ----------------
// this is restricted to IGB-usage! CharacterLog data is always set through the IGB
// ->this prevent adding the same system multiple times, if a user if online with the IGB AND OOG
if(
CCP.isInGameBrowser() === true &&
currentUserIsHere === false &&
currentUserOnMap === false &&
currentCharacterLog &&
mapTracking
){
// check if the system where the character is in exists on this map
if(currentUserIsHere === false){
// add new system to the map
// add new system to the map
var requestData = {
systemData: {
systemId: currentCharacterLog.system.id
},
mapData: {
id: userData.config.id
}
};
// check if a system jump is detected previous system !== current system
// and add a connection to the previous system as well
// hint: if a user just logged on -> there is no active system cached
var sourceSystem = false;
if(
activeSystemCache &&
activeSystemCache.data('systemId') !== currentCharacterLog.system.id
){
// draw new connection
sourceSystem = activeSystemCache;
// calculate new system coordinates
requestData.systemData.position = calculateNewSystemPosition(sourceSystem);
var requestData = {
systemData: {
systemId: currentCharacterLog.system.id
},
mapData: {
id: userData.config.id
}
};
mapElement.getMapOverlay('timer').startMapUpdateCounter();
saveSystem(map, requestData, sourceSystem, false);
// check if a system jump is detected previous system !== current system
// and add a connection to the previous system as well
// hint: if a user just logged on -> there is no active system cached
var sourceSystem = false;
if(
activeSystemCache &&
activeSystemCache.data('systemId') !== currentCharacterLog.system.id
){
// draw new connection
sourceSystem = activeSystemCache;
// calculate new system coordinates
requestData.systemData.position = calculateNewSystemPosition(sourceSystem);
}
}
mapElement.getMapOverlay('timer').startMapUpdateCounter();
saveSystem(map, requestData, sourceSystem, false);
}
// trigger document event -> update header
$(document).trigger('pf:updateHeaderMapData', headerUpdateData);

View File

@@ -740,8 +740,7 @@ define([
// jump to "next" editable field on save
var openNextEditDialogOnSave = function(fields){
fields.on('save', function(e, a){
console.log(e);
console.log(a)
var currentField = $(this);
setTimeout(function() {

View File

@@ -7,6 +7,7 @@ define([
'config/system_effect',
'config/signature_type',
'bootbox',
'app/ccp',
'velocity',
'velocityUI',
'customScrollbar',
@@ -16,7 +17,7 @@ define([
'hoverIntent',
'bootstrapConfirmation',
'bootstrapToggle'
], function($, Init, SystemEffect, SignatureType, bootbox) {
], function($, Init, SystemEffect, SignatureType, bootbox, CCP) {
'use strict';
@@ -548,7 +549,7 @@ define([
*/
var showVersionInfo = function(){
var versionNumber = $('body').data('version');
console.info('PATHFINDER', versionNumber);
console.info('PATHFINDER ' + versionNumber);
};
/**
@@ -1320,14 +1321,20 @@ define([
var getCurrentCharacterLog = function(){
var characterLog = false;
var currentUserData = getCurrentUserData();
if(
currentUserData &&
currentUserData.character &&
currentUserData.character.log
currentUserData.character
){
characterLog = currentUserData.character.log;
if(currentUserData.character.log){
characterLog = currentUserData.character.log;
}else if(CCP.isInGameBrowser() === true){
// if user is IGB online and log data is missing
// -> character API information not found!
showNotify({title: 'Character not found', text: 'Enter API information', type: 'error'});
}
}
return characterLog;

File diff suppressed because one or more lines are too long

BIN
public/img/logo_alpha.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -50,17 +50,17 @@
</nav>
{* header *}
<header id="pf-landing-top">
<div id="pf-header-container">
<canvas id="pf-header-canvas" class="hidden-xs" width="500" height="480"></canvas>
<div class="container">
<check if="{{ @isIngame == 1 }}">
<true>
{* fallback logo -> no SVG support *}
<img width="300px" height="300px" class="center-block pf-logo-fallback" src="public/img/logo.png" alt="Logo" />
</true>
<false>
<check if="{{ @isIngame == 1 }}">
<true>
{* fallback logo -> no SVG support *}
<header id="pf-landing-top" class="pf-logo-fallback">
</header>
</true>
<false>
<header id="pf-landing-top">
<div id="pf-header-container">
<canvas id="pf-header-canvas" class="hidden-xs" width="500" height="480"></canvas>
<div class="container">
<div id="pf-logo-container"></div>
<div id="pf-header-preview-container" class="hidden-xs hidden-sm">
@@ -71,11 +71,13 @@
<div id="pf-header-preview-data" class="pf-header-preview-element pull-left"></div>
<div id="pf-header-preview-gameplay" class="pf-header-preview-element pull-left"></div>
</div>
</false>
</check>
</div>
</div>
</header>
</div>
</div>
</header>
</false>
</check>
{* login form*}
@@ -141,6 +143,7 @@
</div>
</section>
{* features/ gallery *}
<section id="pf-landing-gallery">
@@ -190,11 +193,11 @@
<div class="col-xs-12 col-sm-9 col-lg-4">
<h4><i class="fa fa-fw fa-angle-double-right"></i>Pathfinder</h4>
<ul class="fa-ul pf-landing-list">
<li><i></i>Support for IGB ond OGB</li>
<li><i></i>Support for IGB and OGB</li>
<li><i></i><span class="txt-color txt-color-greenDark"><e class="fa fa-fw fa-lock"></e>SSL</span> encrypted connection</li>
<li><i></i>Open Source Project</li>
<li>
<ul class="fa-ul">
<li><i></i>Check the sourcecode</li>
<li><i></i>Find bugs or security issues</li>
<li><i></i>Host it on your own webserver</li>
</ul>
@@ -215,6 +218,14 @@
<li><i></i>Advanced client-side caching - local storage (OGB)</li>
</ul>
</li>
<li><i></i>Optional "invite only" registration feature</li>
<li>
<ul class="fa-ul">
<li><i></i>If active, a unique Registration Key is required for registration</li>
<li><i></i>This can limit the number of new accounts (e.g. beta)</li>
<li><i></i>Access can be limited to a single corp/ally</li>
</ul>
</li>
<li><i></i>Integrated Task Manager</li>
<li>
<ul class="fa-ul">
@@ -222,6 +233,12 @@
<li><i></i>Print/export client site log files for debugging</li>
</ul>
</li>
<li><i></i>Build in SMTP support</li>
<li>
<ul class="fa-ul">
<li><i></i>Mailserver required</li>
</ul>
</li>
<li><i></i>No dependencies from other 3rd party pages</li>
<li>
<ul class="fa-ul">
@@ -251,8 +268,8 @@
<div class="col-xs-12 col-sm-9 col-lg-4">
<h4><i class="fa fa-fw fa-angle-double-right"></i>Map module</h4>
<ul class="fa-ul pf-landing-list">
<li><i></i>Live synchronisation between all clients</li>
<li><i></i>Watch multiple maps at once</li>
<li><i></i>Live synchronisation between multiple clients</li>
<li><i></i>Track/edit multiple maps at once</li>
<li><i></i>Share maps with other players or groups</li>
<li><i></i>Invite other players to your maps</li>
<li><i></i>Advanced drag &amp; drop support</li>
@@ -272,7 +289,7 @@
<li><i></i>In/decreasing ship count per system</li>
</ul>
</li>
<li><i></i>Multiple system status</li>
<li><i></i>Multiple system status supported</li>
<li>
<ul class="fa-ul">
<li><i></i>"Locked"</li>
@@ -284,7 +301,7 @@
<li><i></i>"Unscanned"</li>
</ul>
</li>
<li><i></i>Multiple connection scopes</li>
<li><i></i>Multiple connection scopes available</li>
<li>
<ul class="fa-ul">
<li><i></i>"Stargate"</li>
@@ -304,7 +321,7 @@
<li><i></i>TrueSec, Region, Constallation information</li>
</ul>
</li>
<li><i></i>Filter maps by Stargate, Wormhole, Jumpbridge connections</li>
<li><i></i>Filter maps by connection scopes</li>
<li><i></i>Map information dialog</li>
<li>
<ul class="fa-ul">
@@ -344,7 +361,7 @@
</ul>
</li>
<li><i></i>Optional renaming of Systems</li>
<li><i></i>Add a system description</li>
<li><i></i>Individual system description</li>
<li><i></i>Receive system warnings from other players</li>
<li><i></i>Quick information links to 3rd party pages</li>
<li>
@@ -380,11 +397,11 @@
<li><i></i>Share system signature information</li>
<li><i></i>Add multiple signatures at once <kbd>ctrl</kbd> + <kbd>c</kbd> from the scanning window</li>
<li><i></i>Check for new signatures within a second</li>
<li><i></i>Track the scan progress of a system by a progress bar</li>
<li><i></i>Get informed about new signatures in your current system</li>
<li><i></i>Receive warnings if a system is not fully scanned</li>
<li><i></i>Speed up scanning and work with multiple pilots on the same scanning table</li>
<li><i></i>Label signatures for later operations</li>
<li><i></i>Add a description to a signature</li>
<li><i></i>Estimated sec status for a route</li>
<li><i></i>Shown meta information for each signature</li>
<li>
<ul class="fa-ul">
@@ -453,7 +470,7 @@
<ul class="fa-ul pf-landing-list">
<li><i></i>Search for routes between systems</li>
<li><i></i>Predefined routes to trade hubs</li>
<li><i></i>Add additional routes</li>
<li><i></i>Add your personal routes</li>
<li><i></i>Additional information for each system</li>
<li><i></i>Sort routes by jump count</li>
<li>
@@ -498,6 +515,57 @@
</div>
</section>
{* beta *}
<section id="pf-landing-beta">
<div class="container">
<div class="row text-center">
<div class="col-md-6 col-md-offset-3">
<h2><span class="txt-color txt-color-warning"><i class="fa fa-fw fa-warning"></i> BETA</span> {{ @PATHFINDER.VERSION }}</h2>
<p class="lead">
<em>PATHFINDER</em> is still a <em>BETA</em> version.
Please read and confirm with the following rules that apply during public beta testing.
</p>
</div>
</div>
<div class="row">
<div class="col-sm-offset-3 col-xs-12 col-sm-6">
<h4><i class="fa fa-fw fa-angle-double-right"></i>Rules for beta testing phase</h4>
<ul class="fa-ul pf-landing-list">
<li><i></i>Any abuse of following rules may result in server ban!</li>
<li><i></i>You need a valid Registration Key (invite mode is active)</li>
<li>
<ul class="fa-ul">
<li><i></i>The number of keys is limited and will be increased continuously</li>
<li><i></i>Keys are bound to your unique Email address</li>
</ul>
</li>
<li><i></i>Do not use it as your main corp/ally wide mapping tool (for now)</li>
<li>
<ul class="fa-ul">
<li><i></i>There might be security bugs that will be found/fixed during beta testing</li>
<li><i></i>At the beginning of the testing period it is simpler to find/reproduce bugs with a lower number of clients</li>
</ul>
</li>
<li><i></i>You can create a fresh CCP API Key (limited access) for registration</li>
<li><i></i>Please help testing and report any problem/bug you find</li>
<li>
<ul class="fa-ul">
<li><i></i><em>PATHFINDER</em> is free for all [<a target="_blank" href="{{ @PATHFINDER.REPO }}">open source</a>], let us make it a better application</li>
<li><i></i>If you are a native English speaker, great! Feel free to read over my bad English :)</li>
<li><i></i>A forum post with your constructive criticism/opinion will help as well</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
</section>
{* pricing *}
<section id="pf-landing-pricing">
<div class="container">

View File

@@ -167,6 +167,24 @@
@include filter(brightness(0.9))
}
// IGB fallback header
&.pf-logo-fallback{
height: 370px;
&:after{
content: '';
width: 100%;
height: 100%;
position: absolute;
background: url("#{$base-url}/logo_alpha.png");
background-repeat: no-repeat;
background-position: 50% 0;
margin-top: 50px;
}
}
#pf-header-container{
position: absolute;
width: 100%;
@@ -183,11 +201,6 @@
z-index: 110;
}
// fallback logo -> IGB
.pf-logo-fallback{
margin-top: 30px;
}
#pf-header-preview-container{
position: absolute;
left: 400px;
@@ -234,6 +247,17 @@
position: relative;
margin-top: 50px;
}
// fallback logo (IGB)
/*
.pf-logo-fallback{
width: 300px;
height: 300px;
background: url("#{$base-url}/logo_alpha.png");
background-repeat: no-repeat;
background-position: 0 0;
}*/
}
#pf-header-preview-intel{