conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
category: Abilities.SPELL_CATEGORIES.COOLDOWNS,
cooldown: haste => 16 / (1 + haste),
=======
buffSpellId: SPELLS.IRONSKIN_BREW_BUFF.id,
category: Abilities.SPELL_CATEGORIES.DEFENSIVE,
cooldown: haste => 21 / (1 + haste),
>>>>>>>
buffSpellId: SPELLS.IRONSKIN_BREW_BUFF.id,
category: Abilities.SPELL_CATEGORIES.DEFENSIVE,
cooldown: haste => 16 / (1 + haste), |
<<<<<<<
/*! angular-google-maps 2.1.0-SNAPSHOT 2015-01-29
=======
/*! angular-google-maps 2.0.12 2015-02-03
>>>>>>>
/*! angular-google-maps 2.1.0-SNAPSHOT 2015-02-03 |
<<<<<<<
/*! angular-google-maps 2.1.0-SNAPSHOT 2015-01-20
=======
/*! angular-google-maps 2.0.12 2015-01-21
>>>>>>>
/*! angular-google-maps 2.1.0-SNAPSHOT 2015-01-21 |
<<<<<<<
date: new Date('2018-06-30'),
changes: <React.Fragment>Added tracking for <SpellLink id={SPELLS.PREDATORY_SWIFTNESS.id} />.</React.Fragment>,
contributors: [Anatta336],
},
{
=======
date: new Date('2018-06-27'),
changes: <React.Fragment>Added tracking for the <SpellLink id={SPELLS.PREDATOR_TALENT.id} /> talent.</React.Fragment>,
contributors: [Anatta336],
},
{
>>>>>>>
date: new Date('2018-06-30'),
changes: <React.Fragment>Added tracking for <SpellLink id={SPELLS.PREDATORY_SWIFTNESS.id} />.</React.Fragment>,
contributors: [Anatta336],
},
{
date: new Date('2018-06-27'),
changes: <React.Fragment>Added tracking for the <SpellLink id={SPELLS.PREDATOR_TALENT.id} /> talent.</React.Fragment>,
contributors: [Anatta336],
},
{ |
<<<<<<<
change(date(2019, 7, 20), 'Allow for repeated phases in bossfights (e.g. Lady Ashvane / Radiance of Azshara).', Zeboot),
=======
change(date(2019, 7, 20), <>Fixed <SpellLink id={SPELLS.CONCENTRATED_FLAME.id} /> not accounting for absorbs.</>, [Zeboot]),
>>>>>>>
change(date(2019, 7, 20), 'Allow for repeated phases in bossfights (e.g. Lady Ashvane / Radiance of Azshara).', Zeboot),
change(date(2019, 7, 20), <>Fixed <SpellLink id={SPELLS.CONCENTRATED_FLAME.id} /> not accounting for absorbs.</>, [Zeboot]), |
<<<<<<<
/*! angular-google-maps 2.1.0-SNAPSHOT 2014-10-20
=======
/*! angular-google-maps 2.0.3 2014-10-22
>>>>>>>
/*! angular-google-maps 2.1.0-SNAPSHOT 2014-10-22
<<<<<<<
/*! angular-google-maps 2.1.0-SNAPSHOT 2014-10-20
=======
/*! angular-google-maps 2.0.3 2014-10-22
>>>>>>>
/*! angular-google-maps 2.1.0-SNAPSHOT 2014-10-22 |
<<<<<<<
WindowChildModel.prototype.createGWin = function(createOpts) {
var _this = this;
if (createOpts == null) {
createOpts = false;
}
if ((this.gWin == null) && createOpts && (this.element != null) && (this.element.html != null)) {
this.opts = this.markerCtrl != null ? this.createWindowOptions(this.markerCtrl, this.scope, this.element.html(), {}, this.$compile) : {};
}
if ((this.opts != null) && this.gWin === void 0) {
this.gWin = new google.maps.InfoWindow(this.opts);
google.maps.event.addListener(this.gWin, 'closeclick', function() {
return _this.markerCtrl.setVisible(_this.markerIsVisibleAfterWindowClose);
});
if (this.scope.closeClick != null) {
return this.scope.closeClick();
=======
MarkerLabelChildModel.prototype.getSharedCross = function(crossUrl) {
return this.markerLabel.getSharedCross(crossUrl);
};
MarkerLabelChildModel.prototype.setTitle = function() {
return this.markerLabel.setTitle();
};
MarkerLabelChildModel.prototype.setContent = function() {
return this.markerLabel.setContent();
};
MarkerLabelChildModel.prototype.setStyles = function() {
return this.markerLabel.setStyles();
};
MarkerLabelChildModel.prototype.setMandatoryStyles = function() {
return this.markerLabel.setMandatoryStyles();
};
MarkerLabelChildModel.prototype.setAnchor = function() {
return this.markerLabel.setAnchor();
};
MarkerLabelChildModel.prototype.setVisible = function() {
return this.markerLabel.setVisible();
};
MarkerLabelChildModel.prototype.setZIndex = function() {
return this.markerLabel.setZIndex();
};
MarkerLabelChildModel.prototype.setPosition = function() {
return this.markerLabel.setPosition();
};
MarkerLabelChildModel.prototype.draw = function() {
return this.markerLabel.draw();
};
MarkerLabelChildModel.prototype.destroy = function() {
if ((this.markerLabel.labelDiv_.parentNode != null) && (this.markerLabel.eventDiv_.parentNode != null)) {
return this.markerLabel.onRemove();
>>>>>>>
MarkerLabelChildModel.prototype.getSharedCross = function(crossUrl) {
return this.markerLabel.getSharedCross(crossUrl);
};
MarkerLabelChildModel.prototype.setTitle = function() {
return this.markerLabel.setTitle();
};
MarkerLabelChildModel.prototype.setContent = function() {
return this.markerLabel.setContent();
};
MarkerLabelChildModel.prototype.setStyles = function() {
return this.markerLabel.setStyles();
};
MarkerLabelChildModel.prototype.setMandatoryStyles = function() {
return this.markerLabel.setMandatoryStyles();
};
MarkerLabelChildModel.prototype.setAnchor = function() {
return this.markerLabel.setAnchor();
};
MarkerLabelChildModel.prototype.setVisible = function() {
return this.markerLabel.setVisible();
};
MarkerLabelChildModel.prototype.setZIndex = function() {
return this.markerLabel.setZIndex();
};
MarkerLabelChildModel.prototype.setPosition = function() {
return this.markerLabel.setPosition();
};
MarkerLabelChildModel.prototype.draw = function() {
return this.markerLabel.draw();
};
MarkerLabelChildModel.prototype.destroy = function() {
if ((this.markerLabel.labelDiv_.parentNode != null) && (this.markerLabel.eventDiv_.parentNode != null)) {
return this.markerLabel.onRemove();
<<<<<<<
Window.prototype.link = function(scope, element, attrs, ctrls) {
var _this = this;
return this.$timeout(function() {
var defaults, hasScopeCoords, isIconVisibleOnClick, mapCtrl, markerCtrl, markerScope, opts, window;
isIconVisibleOnClick = true;
if (angular.isDefined(attrs.isiconvisibleonclick)) {
isIconVisibleOnClick = scope.isIconVisibleOnClick;
}
mapCtrl = ctrls[0].getMap();
markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1].getMarkerScope().gMarker : void 0;
defaults = scope.options != null ? scope.options : {};
hasScopeCoords = (scope != null) && (scope.coords != null) && (scope.coords.latitude != null) && (scope.coords.longitude != null);
opts = hasScopeCoords ? _this.createWindowOptions(markerCtrl, scope, element.html(), defaults, _this.$compile) : void 0;
if (mapCtrl != null) {
window = new directives.api.models.child.WindowChildModel({}, scope, opts, isIconVisibleOnClick, mapCtrl, markerCtrl, _this.$http, _this.$templateCache, _this.$compile, element);
}
scope.$on("$destroy", function() {
return window.destroy();
});
if (ctrls[1] != null) {
markerScope = ctrls[1].getMarkerScope();
markerScope.$watch('coords', function(newValue, oldValue) {
if (newValue == null) {
return window.hideWindow();
}
});
markerScope.$watch('coords.latitude', function(newValue, oldValue) {
if (newValue !== oldValue) {
return window.getLatestPosition();
}
=======
function Window($timeout, $compile, $http, $templateCache) {
this.link = __bind(this.link, this);
var self;
Window.__super__.constructor.call(this, $timeout, $compile, $http, $templateCache);
self = this;
this.require = ['^googleMap', '^?marker'];
this.template = '<span class="angular-google-maps-window" ng-transclude></span>';
this.$log.info(self);
}
Window.prototype.link = function(scope, element, attrs, ctrls) {
var _this = this;
return this.$timeout(function() {
var defaults, hasScopeCoords, isIconVisibleOnClick, mapCtrl, markerCtrl, markerScope, opts, window;
isIconVisibleOnClick = true;
if (angular.isDefined(attrs.isiconvisibleonclick)) {
isIconVisibleOnClick = scope.isIconVisibleOnClick;
}
mapCtrl = ctrls[0].getMap();
markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1].getMarkerScope().gMarker : void 0;
defaults = scope.options != null ? scope.options : {};
hasScopeCoords = (scope != null) && (scope.coords != null) && (scope.coords.latitude != null) && (scope.coords.longitude != null);
opts = hasScopeCoords ? _this.createWindowOptions(markerCtrl, scope, element.html(), defaults) : void 0;
if (mapCtrl != null) {
window = new WindowChildModel({}, scope, opts, isIconVisibleOnClick, mapCtrl, markerCtrl, _this.$http, _this.$templateCache, _this.$compile, element);
}
scope.$on("$destroy", function() {
return window.destroy();
>>>>>>>
function Window($timeout, $compile, $http, $templateCache) {
this.link = __bind(this.link, this);
var self;
Window.__super__.constructor.call(this, $timeout, $compile, $http, $templateCache);
self = this;
this.require = ['^googleMap', '^?marker'];
this.template = '<span class="angular-google-maps-window" ng-transclude></span>';
this.$log.info(self);
}
Window.prototype.link = function(scope, element, attrs, ctrls) {
var _this = this;
return this.$timeout(function() {
var defaults, hasScopeCoords, isIconVisibleOnClick, mapCtrl, markerCtrl, markerScope, opts, window;
isIconVisibleOnClick = true;
if (angular.isDefined(attrs.isiconvisibleonclick)) {
isIconVisibleOnClick = scope.isIconVisibleOnClick;
mapCtrl = ctrls[0].getMap();
markerCtrl = ctrls.length > 1 && (ctrls[1] != null) ? ctrls[1].getMarkerScope().gMarker : void 0;
defaults = scope.options != null ? scope.options : {};
hasScopeCoords = (scope != null) && (scope.coords != null) && (scope.coords.latitude != null) && (scope.coords.longitude != null);
}
opts = hasScopeCoords ? _this.createWindowOptions(markerCtrl, scope, element.html(), defaults, _this.$compile) : void 0;
if (mapCtrl != null) {
window = new WindowChildModel({}, scope, opts, isIconVisibleOnClick, mapCtrl, markerCtrl, _this.$http, _this.$templateCache, _this.$compile, element);
}
scope.$on("$destroy", function() {
return window.destroy(); |
<<<<<<<
<div className="titlePageWrapper">
<div className="title">
<Link to={ `/thread/${ c.thread_id }` }>{ c.title }</Link>
</div>
<div className="page">
<Dropdown inline scrolling text={ `${ pages } 頁` } options={ pagesOptions } onChange={ handlePageChange }/>
</div>
=======
<Link to={ `/thread/${ c.thread_id }` }>{ c.title }</Link>
<div style={{ float: 'right' }}>
<Dropdown inline scrolling text={ `${ pages } 頁` } options={ pagesOptions } onChange={ handlePageChange } selectOnBlur={ false }/>
>>>>>>>
<div className="titlePageWrapper">
<div className="title">
<Link to={ `/thread/${ c.thread_id }` }>{ c.title }</Link>
</div>
<div className="page">
<Dropdown inline scrolling text={ `${ pages } 頁` } options={ pagesOptions } onChange={ handlePageChange } selectOnBlur={ false }/>
</div> |
<<<<<<<
schemaContainer.append('Zoom: <div id="zoom-slider" style="display:inline-block; width:100px; margin-left:10px"></div>');
=======
schemaContainer.append('<button class="btn" id="expand-all"><img alt="Expand all" src="icon/arrow_out.png"></button>');
$('#expand-all').on('click', function() {
$.each(Object.keys(nodes), function(i, id) {
if (_Schema.getMode(id) === 'compact') {
_Schema.expandView(id);
_Schema.storeMode(id, 'expanded');
}
});
});
schemaContainer.append('<button class="btn" id="compact-all"><img alt="Compact all" src="icon/arrow_in.png"></button>');
$('#compact-all').on('click', function() {
$.each(Object.keys(nodes), function(i, id) {
if (_Schema.getMode(id) === 'expanded') {
_Schema.compactView(id);
_Schema.storeMode(id, 'compact');
}
});
instance.repaintEverything();
});
schemaContainer.append('<button class="btn" id="admin-tools"><img src="icon/wrench.png"> Tools</button>');
$('#admin-tools').on('click', function() {
_Schema.openAdminTools();
});
schemaContainer.append('<button class="btn" id="sync-schema"><img src="icon/page_white_get.png"> Sync schema</button>');
$('#sync-schema').on('click', function() {
_Schema.syncSchemaDialog();
});
schemaContainer.append('<div id="zoom-slider" style="display:inline-block; width:100px; margin-left:10px"></div>');
>>>>>>>
schemaContainer.append('Zoom: <div id="zoom-slider" style="display:inline-block; width:100px; margin-left:10px"></div>');
<<<<<<<
schemaContainer.append('<button class="btn" id="admin-tools"><img src="icon/wrench.png"> Tools</button>');
$('#admin-tools').on('click', function() {
_Schema.openAdminTools();
});
schemaContainer.append('<button class="btn" id="sync-schema"><img src="icon/page_white_get.png"> Sync schema</button>');
$('#sync-schema').on('click', function() {
_Schema.syncSchemaDialog();
});
schemaContainer.append('<button class="btn" id="save-layout"><img src="icon/database.png"> Save layout</button>');
$('#save-layout').on('click', function() {
Structr.saveLocalStorage();
});
schemaContainer.append('<button class="btn" id="show-snapshots"><img src="icon/database.png"> Snapshots</button>');
$('#show-snapshots').on('click', function() {
_Schema.snapshotsDialog();
});
=======
/*
schemaContainer.append('<button class="btn" id="do-layout"><img src="icon/wrench.png"> Layout</button>');
$('#do-layout').on('click', function() {
_Schema.doLayout();
});
schemaContainer.append('<button class="btn" id="stop-layout"><img src="icon/wrench.png"> Stop</button>');
$('#stop-layout').on('click', function() {
_Layout.stopLayout();
});
*/
>>>>>>>
schemaContainer.append('<button class="btn" id="admin-tools"><img src="icon/wrench.png"> Tools</button>');
$('#admin-tools').on('click', function() {
_Schema.openAdminTools();
});
schemaContainer.append('<button class="btn" id="sync-schema"><img src="icon/page_white_get.png"> Sync schema</button>');
$('#sync-schema').on('click', function() {
_Schema.syncSchemaDialog();
});
schemaContainer.append('<button class="btn" id="save-layout"><img src="icon/database.png"> Save layout</button>');
$('#save-layout').on('click', function() {
Structr.saveLocalStorage();
});
schemaContainer.append('<button class="btn" id="show-snapshots"><img src="icon/database.png"> Snapshots</button>');
$('#show-snapshots').on('click', function() {
_Schema.snapshotsDialog();
});
<<<<<<<
},
sortByBuiltinFlagAndName: function(collection, flagName) {
collection.sort(function(a, b) {
var result = a[flagName] ? b[flagName] ? 0 : 1 : -1;
if (result === 0) {
result = a.name > b.name ? 1 : a.name < b.name ? -1 : 0;
}
return result;
});
}
=======
_Schema.resize();
}
>>>>>>>
_Schema.resize();
},
sortByBuiltinFlagAndName: function(collection, flagName) {
collection.sort(function(a, b) {
var result = a[flagName] ? b[flagName] ? 0 : 1 : -1;
if (result === 0) {
result = a.name > b.name ? 1 : a.name < b.name ? -1 : 0;
}
return result;
});
} |
<<<<<<<
Command.get(id, 'id,name', function(obj) {
var url = viewRootUrl + obj.name + (LSWrapper.getItem(detailsObjectId + id) ? '/' + LSWrapper.getItem(detailsObjectId + id) : '') + '?edit=2';
=======
Command.get(id, "id,name", function(obj) {
var url = viewRootUrl + obj.name + (LSWrapper.getItem(detailsObjectIdKey + id) ? '/' + LSWrapper.getItem(detailsObjectIdKey + id) : '') + '?edit=2';
>>>>>>>
Command.get(id, 'id,name', function(obj) {
var url = viewRootUrl + obj.name + (LSWrapper.getItem(detailsObjectIdKey + id) ? '/' + LSWrapper.getItem(detailsObjectId + id) : '') + '?edit=2'; |
<<<<<<<
import colorSpectrum from '../../examples/color/color-spectrum.js';
=======
import grayscale from '../../examples/color/grayscale.js';
>>>>>>>
import grayscale from '../../examples/color/grayscale.js';
import colorSpectrum from '../../examples/color/color-spectrum.js';
<<<<<<<
it('Color Spectrum', function () {
let interactive = new Interactive(container, {
width: 600,
height: 150
});
let r = trapezoidalWave(-1 / 3, 1, 1);
let g = trapezoidalWave(0 / 3, 1, 1);
let b = trapezoidalWave(1 / 3, 1, 1);
// visualize the red green and blue values over the spectrum
let plot;
plot = helper(trapezoidalWave(-TAU * 1 / 3, 2, TAU), container, {
scaleX: 300 / Math.PI,
scaleY: 150 / Math.PI,
originY: 150,
grid: false
});
let str = plot.fPath.d;
plot.fPath.d = 'M -1200 0 ' + str.substr(str.indexOf('L'), str.length) + 'L 1200 0';
plot.fPath.style.fill = 'rgb(255, 0, 0)';
plot = helper(trapezoidalWave(TAU * 0 / 3, 2, TAU), container, {
scaleX: 300 / Math.PI,
scaleY: 150 / Math.PI,
originY: 150,
grid: false
});
plot.fPath.style.fill = 'rgb(0, 255, 0)';
plot = helper(trapezoidalWave(TAU * 1 / 3, 2, TAU), container, {
scaleX: 300 / Math.PI,
scaleY: 150 / Math.PI,
originY: 150,
grid: false
});
plot.fPath.style.fill = 'rgb(0, 0, 255)';
let slider = interactive.slider(25, 125, {
min: 6,
max: 32,
value: 6,
width: interactive.width - 50,
});
// let n = 6;
// let n = interactive.width/8;
let group = interactive.group();
group.addDependency(slider);
group.update = function () {
// Clear the current state of the color wheel
while (group.root.firstChild) {
group.root.removeChild(group.root.firstChild);
}
// Redraw the color spectrum
let n = Math.floor(slider.value);
let width = interactive.width / n;
let height = 100;
for (let i = 0; i < n; i++) {
let v = i / (n);
let x = interactive.width * (i / n);
let rect = interactive.rectangle(x, 0, width, height);
let rv = r(v) * 255;
let gv = g(v) * 255;
let bv = b(v) * 255;
rect.style.fill = `rgb(${rv}, ${gv}, ${bv})`;
}
};
group.update();
});
it('color spectrum', function () {
colorSpectrum(container.id);
});
=======
it('grayscale', function () {
grayscale(container.id);
});
>>>>>>>
// it('Color Spectrum', function(){
//
// let interactive = new Interactive(container, {
// width:600,
// height:150
// });
// let r = trapezoidalWave(-1/3, 1, 1);
// let g = trapezoidalWave( 0/3, 1, 1);
// let b = trapezoidalWave( 1/3, 1, 1);
//
// // visualize the red green and blue values over the spectrum
// let plot;
// plot = helper( trapezoidalWave(-TAU*1/3, 2, TAU), container, {
// scaleX: 300/Math.PI,
// scaleY: 150/Math.PI,
// originY: 150,
// grid:false
// });
// let str = plot.fPath.d;
// plot.fPath.d = 'M -1200 0 ' + str.substr( str.indexOf('L'), str.length) + 'L 1200 0';
// plot.fPath.style.fill = 'rgb(255, 0, 0)';
// plot = helper( trapezoidalWave(TAU*0/3, 2, TAU), container, {
// scaleX: 300/Math.PI,
// scaleY: 150/Math.PI,
// originY: 150,
// grid:false
// });
// plot.fPath.style.fill = 'rgb(0, 255, 0)';
// plot = helper( trapezoidalWave(TAU*1/3, 2, TAU), container, {
// scaleX: 300/Math.PI,
// scaleY: 150/Math.PI,
// originY: 150,
// grid:false
// });
// plot.fPath.style.fill = 'rgb(0, 0, 255)';
//
// let slider = interactive.slider(25, 125, {
// min: 6,
// max: 32,
// value: 6,
// width: interactive.width - 50,
// });
// // let n = 6;
// // let n = interactive.width/8;
//
// let group = interactive.group();
// group.addDependency(slider);
// group.update = function() {
//
// // Clear the current state of the color wheel
// while( group.root.firstChild ) {
// group.root.removeChild(group.root.firstChild);
// }
//
// // Redraw the color spectrum
// let n = Math.floor(slider.value);
// let width = interactive.width/n;
// let height = 100;
// for( let i = 0; i < n; i ++){
// let v = i/(n);
// let x = interactive.width*(i/n);
// let rect = interactive.rectangle(x, 0, width, height);
// let rv = r(v)*255;
// let gv = g(v)*255;
// let bv = b(v)*255;
// rect.style.fill = `rgb(${rv}, ${gv}, ${bv})`;
// }
// };
// group.update();
// });
it('gray scale', function () {
grayscale(container.id, { n: 6 });
grayscale(container.id, { n: 60 });
grayscale(container.id, { n: 360 });
});
it('color spectrum', function () {
colorSpectrum(container.id);
colorSpectrum(container.id, { n: 60 });
colorSpectrum(container.id, { n: 360 });
}); |
<<<<<<<
let arr = Edge.calculateLinePosition(nodeFrom, nodeTo);
super(SVG.Line(arr[0], arr[1], arr[2], arr[3]));
=======
super();
if (directed) {
let arr = this.calculateLinePosition(nodeFrom, nodeTo);
this.root = SVG.Line(arr[0], arr[1], arr[2], arr[3]);
}
else {
this.root = SVG.Line(nodeFrom.cx, nodeFrom.cy, nodeTo.cx, nodeTo.cy);
}
>>>>>>>
let arr = Edge.calculateLinePosition(nodeFrom, nodeTo);
if (directed) {
super(SVG.Line(arr[0], arr[1], arr[2], arr[3]));
}
else {
super(SVG.Line(nodeFrom.cx, nodeFrom.cy, nodeTo.cx, nodeTo.cy));
}
<<<<<<<
=======
this.root.id = this.id;
this.style = this.root.style;
>>>>>>>
<<<<<<<
static calculateLinePosition(nodeFrom, nodeTo) {
let y1 = nodeFrom.nodeCircle.cy;
let y2 = nodeTo.nodeCircle.cy;
let x1 = nodeFrom.nodeCircle.cx;
let x2 = nodeTo.nodeCircle.cx;
=======
//Keeping this code here, could be useful in the future. But for now lines are just being placed underneath nodes.
calculateLinePosition(nodeFrom, nodeTo) {
let y1 = nodeFrom.nodeEllipse.cy;
let y2 = nodeTo.nodeEllipse.cy;
let x1 = nodeFrom.nodeEllipse.cx;
let x2 = nodeTo.nodeEllipse.cx;
>>>>>>>
static calculateLinePosition(nodeFrom, nodeTo) {
let y1 = nodeFrom.nodeEllipse.cy;
let y2 = nodeTo.nodeEllipse.cy;
let x1 = nodeFrom.nodeEllipse.cx;
let x2 = nodeTo.nodeEllipse.cx; |
<<<<<<<
import Map from './elements/Map.js';
=======
import DirectedGraph from './elements/DirectedGraph.js';
>>>>>>>
import Map from './elements/Map.js';
import DirectedGraph from './elements/DirectedGraph.js';
<<<<<<<
* Creates a graph element within this interactive
*/
map(mapName, width, height) {
let map = new Map(this, mapName, width, height);
return map;
}
/**
=======
* Creates a directed graph element within this interactive
*/
directedGraph() {
let graph = new DirectedGraph();
this.background.appendChild(graph.root);
return graph;
}
/**
>>>>>>>
* Creates a graph element within this interactive
*/
map(mapName, width, height) {
let map = new Map(this, mapName, width, height);
return map;
}
/*
* Creates a directed graph element within this interactive
*/
directedGraph() {
let graph = new DirectedGraph();
this.background.appendChild(graph.root);
return graph;
}
/** |
<<<<<<<
// require('examples/core/Context/context-in-existing-element.js');
// require('examples/core/Context/example.js');
// require('examples/core/Context/setting-perspective.js');
// require('examples/core/Engine/example.js');
// require('examples/core/EventHandler/example.js');
// require('examples/core/EventHandler/trigger.js');
// require('examples/core/Modifier/branching.js');
// require('examples/core/Modifier/chaining.js');
// require('examples/core/Modifier/example.js');
// require('examples/core/Modifier/opacity.js');
// require('examples/core/Modifier/origin.js');
// require('examples/core/Modifier/size.js');
// require('examples/core/Scene/example.js');
// require('examples/core/Surface/example.js');
// require('examples/core/Surface/true-sizing.js');
// require('examples/core/Transform/example.js');
// require('examples/core/View/example.js');
// require('examples/events/EventArbiter/example.js');
// require('examples/events/EventFilter/pipe-filter.js');
// require('examples/events/EventFilter/subscribe-filter.js');
// require('examples/events/EventMapper/example.js');
// require('examples/inputs/GenericSync/example.js');
// require('examples/inputs/MouseSync/example.js');
// require('examples/inputs/MouseSync/single-dimensional.js');
// require('examples/inputs/PinchSync/example.js');
// require('examples/inputs/RotateSync/example.js');
// require('examples/inputs/ScaleSync/example.js');
// require('examples/inputs/ScrollSync/example.js');
// require('examples/inputs/TouchSync/example.js');
// require('examples/inputs/TouchSync/single-dimensional.js');
// require('examples/math/Matrix/example.js');
// require('examples/math/Quaternion/example.js');
// require('examples/math/Random/example.js');
// require('examples/math/Vector/example.js');
// require('examples/modifiers/Draggable/example.js');
// require('examples/modifiers/ModifierChain/example.js');
// require('examples/surfaces/ContainerSurface/example.js');
// require('examples/surfaces/ImageSurface/example.js');
// require('examples/surfaces/InputSurface/example.js');
// require('examples/transitions/Easing/example.js');
// require('examples/transitions/SnapTransition/example.js');
// require('examples/transitions/SpringTransition/example.js');
// require('examples/transitions/Transitionable/example.js');
// require('examples/transitions/TransitionableTransform/example.js');
// require('examples/transitions/TweenTransition/example.js');
// require('examples/transitions/WallTransition/example.js');
// require('examples/utilities/KeyCodes/example.js');
// require('examples/utilities/Timer/after.js');
// require('examples/utilities/Timer/clear.js');
// require('examples/utilities/Timer/every.js');
// require('examples/utilities/Timer/setInterval.js');
// require('examples/utilities/Timer/setTimeout.js');
// require('examples/utilities/Utility/after.js');
// require('examples/views/Deck/example.js');
// require('examples/views/EdgeSwapper/example.js');
// require('examples/views/GridLayout/example.js');
// require('examples/views/GridLayout/with-sized-modifier.js');
require('src/examples/views/FlexibleLayout/example.js');
// require('src/examples/views/FlexibleLayout/with-transition.js');
// require('examples/views/HeaderFooterLayout/example.js');
// require('examples/views/HeaderFooterLayout/with-sized-modifier.js');
// require('examples/views/RenderController/example.js');
// require('examples/views/Scrollview/example.js');
// require('examples/views/SequentialLayout/example.js');
=======
require('src/examples/inputs/GenericSync/example.js');
// require('src/examples/inputs/GenericSync/accumulator.js');
// require('src/examples/inputs/MouseSync/example.js');
// require('src/examples/inputs/MouseSync/accumulator.js');
// require('src/examples/inputs/MouseSync/single-dimensional.js');
// require('src/examples/inputs/PinchSync/example.js');
// require('src/examples/inputs/RotateSync/example.js');
// require('src/examples/inputs/ScaleSync/example.js');
// require('src/examples/inputs/ScrollSync/example.js');
// require('src/examples/inputs/TouchSync/example.js');
// require('src/examples/inputs/TouchSync/single-dimensional.js');
// require('src/examples/inputs/TouchSync/accumulator.js');
>>>>>>>
// require('examples/core/Context/context-in-existing-element.js');
// require('examples/core/Context/example.js');
// require('examples/core/Context/setting-perspective.js');
// require('examples/core/Engine/example.js');
// require('examples/core/EventHandler/example.js');
// require('examples/core/EventHandler/trigger.js');
// require('examples/core/Modifier/branching.js');
// require('examples/core/Modifier/chaining.js');
// require('examples/core/Modifier/example.js');
// require('examples/core/Modifier/opacity.js');
// require('examples/core/Modifier/origin.js');
// require('examples/core/Modifier/size.js');
// require('examples/core/Scene/example.js');
// require('examples/core/Surface/example.js');
// require('examples/core/Surface/true-sizing.js');
// require('examples/core/Transform/example.js');
// require('examples/core/View/example.js');
// require('examples/events/EventArbiter/example.js');
// require('examples/events/EventFilter/pipe-filter.js');
// require('examples/events/EventFilter/subscribe-filter.js');
// require('examples/events/EventMapper/example.js');
// require('examples/views/HeaderFooterLayout/example.js');
// require('examples/views/HeaderFooterLayout/with-sized-modifier.js');
// require('examples/views/RenderController/example.js');
// require('examples/views/Scrollview/example.js');
// require('examples/views/SequentialLayout/example.js');
// require('src/examples/inputs/GenericSync/example.js');
// require('src/examples/inputs/GenericSync/accumulator.js');
// require('src/examples/inputs/MouseSync/example.js');
// require('src/examples/inputs/MouseSync/accumulator.js');
// require('src/examples/inputs/MouseSync/single-dimensional.js');
// require('src/examples/inputs/PinchSync/example.js');
// require('src/examples/inputs/RotateSync/example.js');
// require('src/examples/inputs/ScaleSync/example.js');
// require('src/examples/inputs/ScrollSync/example.js');
// require('src/examples/inputs/TouchSync/example.js');
// require('src/examples/inputs/TouchSync/single-dimensional.js');
// require('src/examples/inputs/TouchSync/accumulator.js');
// require('examples/math/Matrix/example.js');
// require('examples/math/Quaternion/example.js');
// require('examples/math/Random/example.js');
// require('examples/math/Vector/example.js');
// require('examples/modifiers/Draggable/example.js');
// require('examples/modifiers/ModifierChain/example.js');
// require('examples/surfaces/ContainerSurface/example.js');
// require('examples/surfaces/ImageSurface/example.js');
// require('examples/surfaces/InputSurface/example.js');
// require('examples/transitions/Easing/example.js');
// require('examples/transitions/SnapTransition/example.js');
// require('examples/transitions/SpringTransition/example.js');
// require('examples/transitions/Transitionable/example.js');
// require('examples/transitions/TransitionableTransform/example.js');
// require('examples/transitions/TweenTransition/example.js');
// require('examples/transitions/WallTransition/example.js');
// require('examples/utilities/KeyCodes/example.js');
// require('examples/utilities/Timer/after.js');
// require('examples/utilities/Timer/clear.js');
// require('examples/utilities/Timer/every.js');
// require('examples/utilities/Timer/setInterval.js');
// require('examples/utilities/Timer/setTimeout.js');
// require('examples/utilities/Utility/after.js');
// require('examples/views/Deck/example.js');
// require('examples/views/EdgeSwapper/example.js');
// require('examples/views/GridLayout/example.js');
// require('examples/views/GridLayout/with-sized-modifier.js');
require('src/examples/views/FlexibleLayout/example.js');
// require('src/examples/views/FlexibleLayout/with-transition.js'); |
<<<<<<<
/////check version
console.log('handleIceCandidate event: ', event);
console.log('handleIceCandidate this', this);
console.log('handleIceCandidate viewerId', this.viewerId);
=======
>>>>>>>
<<<<<<<
var $ = __webpack_require__(62);
var send = __webpack_require__(65);
var _require = __webpack_require__(69);
var coldBrewRTC = _require.coldBrewRTC;
=======
var $ = __webpack_require__(62);
var send = __webpack_require__(65);
>>>>>>>
var $ = __webpack_require__(63);
var send = __webpack_require__(66);
var _require = __webpack_require__(1);
var coldBrewRTC = _require.coldBrewRTC; |
<<<<<<<
=======
console.log('local 用户添加');
>>>>>>>
<<<<<<<
=======
console.log('local 用户添加失败');
>>>>>>>
<<<<<<<
=======
console.log('iotks 用户添加');
>>>>>>>
console.log('iotks 用户添加');
<<<<<<<
=======
console.log('iotks 用户添加失败');
>>>>>>>
console.log('iotks 用户添加失败');
<<<<<<<
=======
console.log(err.message, err);
>>>>>>>
console.log(err.message, err);
<<<<<<<
=======
console.log('该用户不存在');
>>>>>>>
console.log('该用户不存在');
<<<<<<<
=======
console.log('管理员登录密码错误');
>>>>>>>
console.log('管理员登录密码错误');
<<<<<<<
=======
console.log('管理员被冻结');
>>>>>>>
console.log('管理员被冻结');
<<<<<<<
=======
console.log('登录成功');
>>>>>>>
console.log('登录成功');
<<<<<<<
=======
console.log('登录管理员失败', err);
>>>>>>>
console.log('登录管理员失败', err);
<<<<<<<
=======
console.log(err.message, err);
>>>>>>>
console.log(err.message, err);
<<<<<<<
=======
console.log('管理员已经存在');
>>>>>>>
console.log('管理员已经存在');
<<<<<<<
=======
console.log('注册管理员失败', err);
>>>>>>>
console.log('注册管理员失败', err);
<<<<<<<
res.send({
ret_code: 1,
ret_msg: 'GET_ERROR_PARAM',
extra: err.message
});
return;
=======
console.log(err.message, err);
res.send({
ret_code: 1,
ret_msg: 'GET_ERROR_PARAM',
extra: err.message
});
return;
>>>>>>>
res.send({
ret_code: 1,
ret_msg: 'GET_ERROR_PARAM',
extra: err.message
});
return;
<<<<<<<
try{
const admin = await AdminModel.findOne({user_account});
if(!admin){
res.send({
ret_code: 1,
ret_msg: 'USER_NOT_EXIST',
extra: '用户不存在'
});
=======
try{
const admin = await AdminModel.findOne({user_account});
if(!admin){
console.log('用户不存在');
res.send({
ret_code: 1,
ret_msg: 'USER_NOT_EXIST',
extra: '用户不存在'
});
>>>>>>>
try{
const admin = await AdminModel.findOne({user_account});
if(!admin){
res.send({
ret_code: 1,
ret_msg: 'USER_NOT_EXIST',
extra: '用户不存在'
});
<<<<<<<
=======
console.log(err.message, err);
>>>>>>>
console.log(err.message, err);
<<<<<<<
=======
console.log('用户不存在');
>>>>>>>
console.log('用户不存在');
<<<<<<<
=======
console.log('密码错误');
>>>>>>>
console.log('密码错误');
<<<<<<<
=======
console.log('修改密码成功');
>>>>>>>
console.log('修改密码成功');
<<<<<<<
=======
console.log('修改用户密码失败');
>>>>>>>
console.log('修改用户密码失败');
<<<<<<<
=======
console.log('超级管理员不能冻结');
>>>>>>>
console.log('超级管理员不能冻结');
<<<<<<<
=======
console.log('用户已冻结');
>>>>>>>
console.log('用户已冻结');
<<<<<<<
=======
console.log('冻结用户失败');
>>>>>>>
console.log('冻结用户失败');
<<<<<<<
=======
console.log('超级管理员不需要解冻');
>>>>>>>
console.log('超级管理员不需要解冻');
<<<<<<<
=======
console.log('用户已解冻');
>>>>>>>
console.log('用户已解冻');
<<<<<<<
=======
console.log('解冻用户失败')
>>>>>>>
console.log('解冻用户失败')
<<<<<<<
=======
console.log('退出失败', err);
>>>>>>>
console.log('退出失败', err);
<<<<<<<
=======
console.log('获取管理员列表失败', err);
>>>>>>>
console.log('获取管理员列表失败', err);
<<<<<<<
=======
console.log('allAdmin='+allAdmin);
>>>>>>>
console.log('allAdmin='+allAdmin);
<<<<<<<
=======
console.log('查询管理员失败', err);
>>>>>>>
console.log('查询管理员失败', err);
<<<<<<<
=======
console.log('获取管理员数量失败',err);
>>>>>>>
console.log('获取管理员数量失败',err);
<<<<<<<
=======
console.log('获取管理员信息的session失效');
>>>>>>>
console.log('获取管理员信息的session失效');
<<<<<<<
=======
console.log('获取管理员信息成功');
>>>>>>>
console.log('获取管理员信息成功');
<<<<<<<
=======
console.log('获取管理员信息失败');
>>>>>>>
console.log('获取管理员信息失败');
<<<<<<<
=======
console.log('获取管理员状态列表失败', err);
>>>>>>>
console.log('获取管理员状态列表失败', err);
<<<<<<<
=======
console.log('参数错误');
>>>>>>>
console.log('参数错误');
<<<<<<<
=======
console.log('该用户不存在');
>>>>>>>
console.log('该用户不存在');
<<<<<<<
=======
console.log('管理员被冻结');
>>>>>>>
console.log('管理员被冻结');
<<<<<<<
=======
console.log('切换用户成功');
>>>>>>>
console.log('切换用户成功');
<<<<<<<
=======
console.log('切换管理员失败', err);
>>>>>>>
console.log('切换管理员失败', err); |
<<<<<<<
import DeviceModel from '../../model/device/device'
=======
>>>>>>>
import DeviceModel from '../../model/device/device'
<<<<<<<
=======
import {DeviceTable} from '../../models/device/device'
>>>>>>>
<<<<<<<
=======
//console.log('init 111');
>>>>>>>
//console.log('init 111');
<<<<<<<
=======
console.log('device import');
//console.log(req.body);
>>>>>>>
console.log('device import');
<<<<<<<
=======
console.log('mac_array:', mac_array[i]);
>>>>>>>
<<<<<<<
await DeviceModel.create(updatestr);
=======
await DeviceTable.create(updatestr);
>>>>>>>
await DeviceModel.create(updatestr);
<<<<<<<
=======
console.log('device import excel');
//console.log(req.body);
console.log(" ########## POST /upload ####### ");
>>>>>>>
<<<<<<<
=======
console.log('upload file: ', field, value);
>>>>>>>
<<<<<<<
=======
//console.log(file);;
console.log('upload file: ', fileName, uploadedPath);
>>>>>>>
<<<<<<<
=======
console.log('parse end:' + uploadedPath);
>>>>>>>
<<<<<<<
=======
console.log(excelObj);
>>>>>>>
<<<<<<<
=======
console.log(mac_array);
>>>>>>>
console.log(mac_array);
<<<<<<<
=======
//console.log('mac_array:', mac_array[i]);
>>>>>>>
<<<<<<<
var query = await DeviceModel.findOne(wherestr).exec();
=======
var query = await DeviceTable.findOne(wherestr).exec();
>>>>>>>
var query = await DeviceModel.findOne(wherestr).exec();
<<<<<<<
if(query.user_name === ''){
var updatestr = {'channelPath': user_name};
await DeviceModel.findByIdAndUpdate(query['_id'], updatestr).exec();
}else{
ill_mac.push(mac_array[i]);
}
=======
if(query.user_name === ''){
var updatestr = {'user_name': user_name};
await DeviceTable.findByIdAndUpdate(query['_id'], updatestr).exec();
}else{
ill_mac.push(mac_array[i]);
}
>>>>>>>
if(query.user_name === ''){
var updatestr = {'channelPath': user_name};
await DeviceModel.findByIdAndUpdate(query['_id'], updatestr).exec();
}else{
ill_mac.push(mac_array[i]);
}
<<<<<<<
var updatestr = {
'gwId': mac,
'channelPath': user_name,
'auth': 1,
'lastTime':mytime.getTime()
};
await DeviceModel.create(updatestr);
=======
var updatestr = {
'mac': mac,
'user_name': user_name,
'status': 'inactive',
'dev_type': '', //设备型号
'old_rom_version': '', // 旧的固件版本
'rom_version': '', // 固件版本
'printer_status': 'default', //打印机状态
'box51_status': 'default', //51盒子状态
'location': '',
'inet_ip': '',
'update_time':dtime(mytime).format('YYYY-MM-DD HH:mm:ss'),
'sort_time':mytime.getTime()
};
await DeviceTable.create(updatestr);
>>>>>>>
var updatestr = {
'gwId': mac,
'channelPath': user_name,
'auth': 1,
'lastTime':mytime.getTime()
};
await DeviceModel.create(updatestr);
<<<<<<<
=======
console.log('device leave');
>>>>>>>
<<<<<<<
var query = await DeviceModel.findOneAndUpdate(wherestr, updatestr).exec();
=======
var query = await DeviceTable.findOneAndUpdate(wherestr, updatestr).exec();
>>>>>>>
var query = await DeviceModel.findOneAndUpdate(wherestr, updatestr).exec();
<<<<<<<
var user = req.body.user_account;
var query = await DeviceModel.find({'channelPath':user}).exec();
var macs=[];
for(var i =0; i< query.length; i ++){
macs.push([query[i].mac]);
}
var datas = xlsx.build([
{name:user, data:macs}
=======
console.log('device export');
var user = req.body.user_account;
var query = await DeviceTable.find({'user_name':user}).exec();
var macs=[];
for(var i =0; i< query.length; i ++){
macs.push([query[i].mac]);
}
var datas = xlsx.build([
{name:user, data:macs}
>>>>>>>
var user = req.body.user_account;
var query = await DeviceModel.find({'channelPath':user}).exec();
var macs=[];
for(var i =0; i< query.length; i ++){
macs.push([query[i].mac]);
}
var datas = xlsx.build([
{name:user, data:macs}
<<<<<<<
=======
console.log('access_permission list');
>>>>>>>
<<<<<<<
=======
console.log('sort undefined');
>>>>>>>
console.log('sort undefined');
<<<<<<<
=======
console.log('device online');
//console.log(req.body);
>>>>>>>
<<<<<<<
=======
console.log('device online end');
>>>>>>>
<<<<<<<
=======
console.log('device offline');
//console.log(req.body);
>>>>>>>
<<<<<<<
=======
console.log('device offline end');
>>>>>>>
<<<<<<<
=======
console.log('filter undefined');
>>>>>>>
console.log('filter undefined');
<<<<<<<
// 监听器 #1
var updateSysinfo = async function (mac, josnObj) {
//更新到设备数据库,sysinfo库
//SysinfoTable
var wherestr = { 'mac': josnObj['mac']};
DB.SysinfoTable.findOneAndUpdate(wherestr, josnObj).exec(function (err, doc) {
if (doc == null){
var query = DB.SysinfoTable.create(josnObj);
}
});
}
// 监听器 #1
var updateOnlineDevice = async function (mac, josnObj) {
var mytime = new Date();
//更新到设备数据库, 设备上线,下线
var wherestr = {'mac': mac};
var updatestr = {
'mac': mac,
'status': 'online',
'dev_type': josnObj.boardtype, //设备型号
'old_rom_version': '', // 旧的固件版本
'rom_version': josnObj.fwversion, // 固件版本
'printer_status': 'default', //打印机状态
'box51_status': 'default', //51盒子状态
'update_time':dtime(mytime).format('YYYY-MM-DD HH:mm:ss'),
'sort_time':mytime.getTime()
};
//如果采用返回值得形式,必须的await
var query = await DeviceModel.findOne(wherestr).exec();
if (query != null){
if (query['rom_version'] != josnObj.fwversion){
updatestr['old_rom_version'] = query['rom_version'];
await DeviceModel.findByIdAndUpdate(query['_id'], updatestr).exec();
}
else if (query['dev_type'] != josnObj.boardtype){
await DeviceModel.findByIdAndUpdate(query['_id'], {'dev_type': josnObj.boardtype}).exec();
}
}
else{
await DeviceModel.create(updatestr);
}
}
// 监听器 #1
var updatDeviceStatus = async function (mac, status) {
var mytime = new Date();
//更新到设备数据库
var wherestr = {'mac': mac};
var updatestr = {
'mac': mac,
'status': status,
'update_time':dtime(mytime).format('YYYY-MM-DD HH:mm:ss'),
'sort_time':mytime.getTime(),
'logs': [],
};
var query = await DeviceModel.findOne(wherestr).exec();
if (query != null){
//复制数组,logs记录上下线日志
updatestr['logs'] = query['logs'].slice();
updatestr['logs'].push(updatestr['update_time'] + ' ' + status);
if (updatestr['logs'].length > 10){
updatestr['logs'].shift(); //删除数组第一个元素
}
await DeviceModel.findByIdAndUpdate(query['_id'], updatestr).exec();
}
}
=======
>>>>>>>
// 监听器 #1
var updateOnlineDevice = async function (mac, josnObj) {
var mytime = new Date();
//更新到设备数据库, 设备上线,下线
var wherestr = {'mac': mac};
var updatestr = {
'mac': mac,
'status': 'online',
'dev_type': josnObj.boardtype, //设备型号
'old_rom_version': '', // 旧的固件版本
'rom_version': josnObj.fwversion, // 固件版本
'printer_status': 'default', //打印机状态
'box51_status': 'default', //51盒子状态
'update_time':dtime(mytime).format('YYYY-MM-DD HH:mm:ss'),
'sort_time':mytime.getTime()
};
//如果采用返回值得形式,必须的await
var query = await DeviceModel.findOne(wherestr).exec();
if (query != null){
if (query['rom_version'] != josnObj.fwversion){
updatestr['old_rom_version'] = query['rom_version'];
await DeviceModel.findByIdAndUpdate(query['_id'], updatestr).exec();
}
else if (query['dev_type'] != josnObj.boardtype){
await DeviceModel.findByIdAndUpdate(query['_id'], {'dev_type': josnObj.boardtype}).exec();
}
}
else{
await DeviceModel.create(updatestr);
}
}
// 监听器 #1
var updatDeviceStatus = async function (mac, status) {
var mytime = new Date();
//更新到设备数据库
var wherestr = {'mac': mac};
var updatestr = {
'mac': mac,
'status': status,
'update_time':dtime(mytime).format('YYYY-MM-DD HH:mm:ss'),
'sort_time':mytime.getTime(),
'logs': [],
};
var query = await DeviceModel.findOne(wherestr).exec();
if (query != null){
//复制数组,logs记录上下线日志
updatestr['logs'] = query['logs'].slice();
updatestr['logs'].push(updatestr['update_time'] + ' ' + status);
if (updatestr['logs'].length > 10){
updatestr['logs'].shift(); //删除数组第一个元素
}
await DeviceModel.findByIdAndUpdate(query['_id'], updatestr).exec();
}
} |
<<<<<<<
if (bestCell && label.show) {
this.ctx.shadowBlur = 0;
this.ctx.lineWidth = label.lineWidth;
this.ctx.font = label.font;
this.ctx.fillStyle = label.color;
var width = this.ctx.measureText(_item.name).width;
if (this.getMaxWidth(_pixel) > width) {
this.ctx.fillText(_item.name, bestCell.x - width / 2, bestCell.y);
=======
for (var i = 0; i < colorMod.length; i++) {
if (split.length == 0) {
star = data[0].count;
} else {
star = split[i - 1].end;
}
if (i == colorMod.length - 1) {
end = null;
} else {
sign = parseInt(colorMod[i] / sunMod * length) + sign;
end = data[sign].count;
}
split.push({
start: star,
end: end,
backgroundColor: null
});
}
var result = [];
for (var _i = 0; _i < split.length; _i++) {
var item = split[_i];
if (item.start != item.end) {
item.backgroundColor = colors[result.length];
result.push(item);
}
}
split = [];
this.styleConfig.splitList = result;
}
}, {
key: 'createColorSplit',
value: function createColorSplit() {
if (this.styleConfig.splitList == null || this.styleConfig.splitList.length == 0) {
this.styleConfig.colors.length > 0 && this.compileSplitList(this.workerData);
}
this.setlegend(this.legendConfig, this.styleConfig.splitList || []);
}
}, {
key: 'setTooltip',
value: function setTooltip(event) {
var item = this.overItem && this.overItem.list.length > 0 ? this.overItem : null;
this.toolTip.render(event, item);
}
}, {
key: 'getStyle',
value: function getStyle(item) {
if (item.count == 0) {
return {
backgroundColor: 'rgba(255,255,255,0)'
};
} else {
return this.setDrawStyle(item);
}
}
}, {
key: 'drawRec',
value: function drawRec() {
this.clearCanvas();
var gridStep = this._drawSize;
var style = this.styleConfig.normal;
var mapSize = this.map.getSize();
this.ctx.shadowOffsetX = 0;
this.ctx.shadowOffsetY = 0;
for (var i = 0; i < this.workerData.length; i++) {
var item = this.workerData[i];
var x = item.x;
var y = item.y;
if (x > -gridStep && y > -gridStep && x < mapSize.width + gridStep && y < mapSize.height + gridStep) {
this.ctx.beginPath();
var drawStyle = this.getStyle(item);
if (drawStyle.shadowColor) {
this.ctx.shadowColor = drawStyle.shadowColor || 'transparent';
this.ctx.shadowBlur = drawStyle.shadowBlur || 10;
} else {
this.ctx.shadowColor = 'transparent';
this.ctx.shadowBlur = 0;
>>>>>>>
for (var i = 0; i < colorMod.length; i++) {
if (split.length == 0) {
star = data[0].count;
} else {
star = split[i - 1].end;
}
if (i == colorMod.length - 1) {
end = null;
} else {
sign = parseInt(colorMod[i] / sunMod * length) + sign;
end = data[sign].count;
}
split.push({
start: star,
end: end,
backgroundColor: null
});
}
var result = [];
for (var _i = 0; _i < split.length; _i++) {
var item = split[_i];
if (item.start != item.end) {
item.backgroundColor = colors[result.length];
result.push(item);
}
}
split = [];
this.styleConfig.splitList = result;
}
}, {
key: 'createColorSplit',
value: function createColorSplit() {
if (this.styleConfig.splitList == null || this.styleConfig.splitList.length == 0) {
this.styleConfig.colors.length > 0 && this.compileSplitList(this.workerData);
}
this.setlegend(this.legendConfig, this.styleConfig.splitList);
}
}, {
key: 'setTooltip',
value: function setTooltip(event) {
var item = this.overItem && this.overItem.list.length > 0 ? this.overItem : null;
this.toolTip.render(event, item);
}
}, {
key: 'getStyle',
value: function getStyle(item) {
if (item.count == 0) {
return {
backgroundColor: 'rgba(255,255,255,0)'
};
} else {
return this.setDrawStyle(item);
}
}
}, {
key: 'drawRec',
value: function drawRec() {
this.clearCanvas();
var gridStep = this._drawSize;
var style = this.styleConfig.normal;
var mapSize = this.map.getSize();
this.ctx.shadowOffsetX = 0;
this.ctx.shadowOffsetY = 0;
for (var i = 0; i < this.workerData.length; i++) {
var item = this.workerData[i];
var x = item.x;
var y = item.y;
if (x > -gridStep && y > -gridStep && x < mapSize.width + gridStep && y < mapSize.height + gridStep) {
var drawStyle = this.getStyle(item);
if (drawStyle.shadowColor) {
this.ctx.shadowColor = drawStyle.shadowColor || 'transparent';
this.ctx.shadowBlur = drawStyle.shadowBlur || 10;
} else {
this.ctx.shadowColor = 'transparent';
this.ctx.shadowBlur = 0;
<<<<<<<
_this.styleConfig = {};
_this._setStyle(_CircuitConfig2.default, ops);
_this._isCoordinates = false;
_this.state = null;
=======
>>>>>>>
<<<<<<<
this.points = ops.data ? option.data : this.points;
=======
>>>>>>>
<<<<<<<
_this2.clearCanvas();
(0, _util.clearPushArray)(_this2.workerData, pixels);
=======
>>>>>>>
<<<<<<<
this.setlegend(this.legendConfig, this.styleConfig.splitList);
}
}, {
key: 'setTooltip',
value: function setTooltip(event) {
var item = this.overItem && this.overItem.list.length > 0 ? this.overItem : null;
this.toolTip.render(event, item);
}
}, {
key: 'getStyle',
value: function getStyle(item) {
if (item.count == 0) {
return {
backgroundColor: 'rgba(255,255,255,0)'
};
} else {
return this.setDrawStyle(item);
=======
if (normal.shadowBlur) {
ctx.shadowBlur = normal.shadowBlur;
>>>>>>>
if (normal.shadowBlur) {
ctx.shadowBlur = normal.shadowBlur;
<<<<<<<
var x = item.x;
var y = item.y;
if (x > -gridStep && y > -gridStep && x < mapSize.width + gridStep && y < mapSize.height + gridStep) {
var drawStyle = this.getStyle(item);
if (drawStyle.shadowColor) {
this.ctx.shadowColor = drawStyle.shadowColor || 'transparent';
this.ctx.shadowBlur = drawStyle.shadowBlur || 10;
} else {
this.ctx.shadowColor = 'transparent';
this.ctx.shadowBlur = 0;
}
this.ctx.fillStyle = drawStyle.backgroundColor;
this.ctx.fillRect(x, y, gridStep - style.padding, gridStep - style.padding);
=======
this.ctx.strokeStyle = normal.borderColor;
var pixels = item.geometry.pixels;
ctx.beginPath();
ctx.moveTo(pixels[0][0], pixels[0][1]);
for (var j = 1; j < pixels.length; j++) {
ctx.lineTo(pixels[j][0], pixels[j][1]);
>>>>>>>
this.ctx.strokeStyle = normal.borderColor;
var pixels = item.geometry.pixels;
ctx.beginPath();
ctx.moveTo(pixels[0][0], pixels[0][1]);
for (var j = 1; j < pixels.length; j++) {
ctx.lineTo(pixels[j][0], pixels[j][1]);
<<<<<<<
this.setlegend(this.legendConfig, this.styleConfig.splitList);
=======
>>>>>>>
<<<<<<<
key: 'drawRec',
value: function drawRec() {
this.clearCanvas();
var mapSize = this.map.getSize();
var gridsW = this._drawSize;
var style = this.styleConfig.normal;
this.ctx.shadowOffsetX = 0;
this.ctx.shadowOffsetY = 0;
for (var i = 0; i < this.workerData.length; i++) {
var item = this.workerData[i];
var x = item.x;
var y = item.y;
var count = item.count;
if (count > 0 && x > -gridsW && y > -gridsW && x < mapSize.width + gridsW && y < mapSize.height + gridsW) {
var drawStyle = this.getStyle(item);
this.drawLine(x, y, gridsW - style.padding, drawStyle, this.ctx);
}
=======
key: 'findIndexSelectItem',
value: function findIndexSelectItem(item) {
var index = -1;
if (item) {
index = this.selectItem.findIndex(function (val) {
var itemCoordinates = item.geometry.coordinates;
var valCoordinates = val.geometry.coordinates;
return val && itemCoordinates[0] == valCoordinates[0] && itemCoordinates[1] == valCoordinates[1] && val.count == item.count;
});
>>>>>>>
key: 'findIndexSelectItem',
value: function findIndexSelectItem(item) {
var index = -1;
if (item) {
index = this.selectItem.findIndex(function (val) {
var itemCoordinates = item.geometry.coordinates;
var valCoordinates = val.geometry.coordinates;
return val && itemCoordinates[0] == valCoordinates[0] && itemCoordinates[1] == valCoordinates[1] && val.count == item.count;
});
<<<<<<<
}
return result;
}
}, {
key: '_loopDraw',
value: function _loopDraw(ctx, pixels) {
var _this3 = this;
var _loop = function _loop(i, len) {
var item = pixels[i];
var pixel = item.pixel;
var style = _this3.setDrawStyle(item);
_this3.loadImg(style.icon, function (img) {
if (style.width && style.height) {
var xy = _this3._getDrawXY(pixel, style.offsets.left, style.offsets.top, style.width, style.height);
_this3._drawImage(_this3.ctx, img, xy.x, xy.y, style.width, style.height);
} else {
var _xy2 = _this3._getDrawXY(pixel, style.offsets.left, style.offsets.top, img.width, img.height, 1);
_this3._drawImage(_this3.ctx, img, _xy2.x, _xy2.y, img.width, img.height);
}
});
};
=======
} while (meet);
>>>>>>>
} while (meet); |
<<<<<<<
jQuery.getJSON('/plots/location/',
=======
jQuery.getJSON(tm_static + '/trees/location/',
>>>>>>>
jQuery.getJSON(tm_static + '/plots/location/',
<<<<<<<
jQuery.getJSON('/plots/location/',
{'lat': mapCoord.lat, 'lon' : mapCoord.lon, 'format' : 'json', 'max_plots' : 1},
=======
jQuery.getJSON(tm_static + '/trees/location/',
{'lat': mapCoord.lat, 'lon' : mapCoord.lon, 'format' : 'json', 'max_trees' : 1},
>>>>>>>
jQuery.getJSON(tm_static + '/plots/location/',
{'lat': mapCoord.lat, 'lon' : mapCoord.lon, 'format' : 'json', 'max_plots' : 1},
<<<<<<<
var url = ['/plots/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&max_plots=70'].join('');
$.getJSON(url, function(geojson){
=======
var url = ['/trees/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&max_trees=70'].join('');
$.getJSON(tm_static + url, function(geojson){
>>>>>>>
var url = ['/plots/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&max_plots=70'].join('');
$.getJSON(tm_static + url, function(geojson){
<<<<<<<
var url = ['/plots/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&max_plots=10&distance=.0001'].join('');
$.getJSON(url, function(geojson){
=======
var url = ['/trees/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&max_trees=10&distance=.0001'].join('');
$.getJSON(tm_static + url, function(geojson){
>>>>>>>
var url = ['/plots/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&max_plots=10&distance=.0001'].join('');
$.getJSON(tm_static + url, function(geojson){
<<<<<<<
var url = ['/plots/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&distance=20'].join('');
$.getJSON(url, function(geojson){
=======
var url = ['/trees/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&distance=20'].join('');
$.getJSON(tm_static + url, function(geojson){
>>>>>>>
var url = ['/plots/location/?lat=',ll.lat,'&lon=',ll.lon,'&format=json&distance=20'].join('');
$.getJSON(tm_static + url, function(geojson){
<<<<<<<
url: '/plots/location/update/',
=======
url: tm_static + '/trees/location/update/',
>>>>>>>
url: tm_static + '/plots/location/update/',
<<<<<<<
var save_html = '<a href="javascript:tm.saveTreeLocation()" class="buttonSmall"><img src="' + tm_static + '/static/images/loading-indicator-trans.gif" width="12" /> Stop Editing and Save</a>'
=======
var save_html = '<a href="javascript:tm.saveTreeLocation()" class="buttonSmall"><img src="' + tm_static + '/static/images/loading-indicator-trans.gif" width="12" /> Stop Editing and Save</a>'
>>>>>>>
var save_html = '<a href="javascript:tm.saveTreeLocation()" class="buttonSmall"><img src="' + tm_static + '/static/images/loading-indicator-trans.gif" width="12" /> Stop Editing and Save</a>'
<<<<<<<
if (model == "Plot") {
$('#edit_'+field).editable(tm.updatePlotServerCall, editableOptions);
} else {
$('#edit_'+field).editable(tm.updateEditableServerCall, editableOptions);
}
},
coerceFromString: function(value) {
if (Number(value) == value) {
value = Number(value);
}
if (value == "true") {
value = true;
}
if (value == "false") {
value = false;
}
if (value == "null") {
value = null;
}
return value;
},
updatePlotServerCall: function(value, settings) {
var data = {};
var plotId = settings.objectId;
var field = settings.fieldName;
data[field] = tm.coerceFromString(value)
this.innerHTML = "Saving...";
var jsonString = JSON.stringify(data);
settings.obj = this;
$.ajax({
url: tm_static + '/plots/' + plotId + '/update/',
type: 'POST',
data: jsonString,
complete: function(xhr, textStatus) {
var response = JSON.parse(xhr.responseText);
if (response['success'] != true) {
settings.obj.className = "errorResponse";
settings.obj.innerHTML = "An error occurred in saving: "
$.each(response['errors'], function(i,err){
settings.obj.innerHTML += err;
});
} else {
var value = response['update'][settings.fieldName];
if (settings.fieldName == "plot_width" || settings.fieldName == "plot_length") {
if (value == 99.0) {value = "15+"}
}
settings.obj.innerHTML = value
tm.trackEvent("Edit", settings.fieldName)
}
}});
return "Saving... " + '<img src="' + tm_static + '/static/images/loading-indicator.gif" />';
=======
$('#edit_'+field).editable(tm.updateEditableServerCall, editableOptions);
>>>>>>>
if (model == "Plot") {
$('#edit_'+field).editable(tm.updatePlotServerCall, editableOptions);
} else {
$('#edit_'+field).editable(tm.updateEditableServerCall, editableOptions);
}
},
coerceFromString: function(value) {
if (Number(value) == value) {
value = Number(value);
}
if (value == "true") {
value = true;
}
if (value == "false") {
value = false;
}
if (value == "null") {
value = null;
}
return value;
},
updatePlotServerCall: function(value, settings) {
var data = {};
var plotId = settings.objectId;
var field = settings.fieldName;
data[field] = tm.coerceFromString(value)
this.innerHTML = "Saving...";
var jsonString = JSON.stringify(data);
settings.obj = this;
$.ajax({
url: tm_static + '/plots/' + plotId + '/update/',
type: 'POST',
data: jsonString,
complete: function(xhr, textStatus) {
var response = JSON.parse(xhr.responseText);
if (response['success'] != true) {
settings.obj.className = "errorResponse";
settings.obj.innerHTML = "An error occurred in saving: "
$.each(response['errors'], function(i,err){
settings.obj.innerHTML += err;
});
} else {
var value = response['update'][settings.fieldName];
if (settings.fieldName == "plot_width" || settings.fieldName == "plot_length") {
if (value == 99.0) {value = "15+"}
}
settings.obj.innerHTML = value
tm.trackEvent("Edit", settings.fieldName)
}
}});
return "Saving... " + '<img src="' + tm_static + '/static/images/loading-indicator.gif" />'; |
<<<<<<<
const app = getApp()
const userUtils = require('../../utils/users.js')
const notifUtils = require('../../utils/notifications.js')
Page({
=======
const app = getApp()
const collection = app.globalData.db.collection('users')
const userUtils = require('../../utils/users.js')
const notifUtils = require('../../utils/notifications.js')
const theming = require('../../behaviours/theming.js')
Component({
behaviors: [theming],
>>>>>>>
const userUtils = require('../../utils/users.js')
const notifUtils = require('../../utils/notifications.js')
const theming = require('../../behaviours/theming.js')
Component({
behaviors: [theming], |
<<<<<<<
http.get(`${baseUrl}/${path}`).then(({ data, status }) => {
wx.stopPullDownRefresh()
if (status !== 200) {
wx.showToast({
title: String(status),
icon: 'none'
})
return
}
this.setData({
md: {
content: data,
baseUrl: baseUrl
=======
console.info({path, baseUrl})
http.get(`${baseUrl}/${path}`).then(({ data, status }) => {
wx.stopPullDownRefresh()
if (status !== 200) {
wx.showToast({
title: String(status),
icon: 'none'
})
return
>>>>>>>
http.get(`${baseUrl}/${path}`).then(({ data, status }) => {
wx.stopPullDownRefresh()
if (status !== 200) {
wx.showToast({
title: String(status),
icon: 'none'
})
return |
<<<<<<<
this.reportTypes = params.reportTypes || ["default", "rnd", "engineering"];
=======
this.macros = params.macros || [];
>>>>>>>
this.reportTypes = params.reportTypes || ["default", "rnd", "engineering"];
this.macros = params.macros || [];
<<<<<<<
setReportTypes(reportTypes) {
this.reportTypes = reportTypes || [];
}
=======
addMacro(macro) {
// event, args, delay
this.macros.push({ ...macro, id: uuid.v4() });
}
removeMacro(id) {
this.macros = this.macros.filter(m => m.id !== id);
}
>>>>>>>
setReportTypes(reportTypes) {
this.reportTypes = reportTypes || [];
}
addMacro(macro) {
// event, args, delay
this.macros.push({ ...macro, id: uuid.v4() });
}
removeMacro(id) {
this.macros = this.macros.filter(m => m.id !== id);
} |
<<<<<<<
import ApolloClient, { createNetworkInterface } from 'apollo-client';
import { addTypenameToSelectionSet } from 'apollo-client/queries/queryTransform';
import { registerGqlTag } from 'apollo-client/gql';
import { ApolloProvider } from 'react-apollo';
registerGqlTag();
const client = new ApolloClient({
networkInterface: createNetworkInterface('/graphql', {
credentials: 'same-origin',
}),
queryTransformer: addTypenameToSelectionSet,
dataIdFromObject: (result) => {
if (result.id && result.__typename) {
return result.__typename + result.id;
}
return null;
},
});
=======
import ApolloClient, { createNetworkInterface } from 'apollo-client';
import { addTypenameToSelectionSet } from 'apollo-client/queries/queryTransform';
import { registerGqlTag } from 'graphql-tag';
import { ApolloProvider } from 'react-apollo';
>>>>>>>
import ApolloClient, { createNetworkInterface } from 'apollo-client';
import { addTypenameToSelectionSet } from 'apollo-client/queries/queryTransform';
import gql from 'graphql-tag';
import { ApolloProvider } from 'react-apollo';
const client = new ApolloClient({
networkInterface: createNetworkInterface('/graphql', {
credentials: 'same-origin',
}),
queryTransformer: addTypenameToSelectionSet,
dataIdFromObject: (result) => {
if (result.id && result.__typename) {
return result.__typename + result.id;
}
return null;
},
});
<<<<<<<
render(
(
<ApolloProvider client={client}>
<App />
</ApolloProvider>
),
document.getElementById('app')
);
=======
const client = new ApolloClient({
networkInterface: createNetworkInterface('/graphql', {
credentials: 'same-origin',
}),
queryTransformer: addTypenameToSelectionSet,
dataIdFromObject: (result) => {
if (result.id && result.__typename) {
return result.__typename + result.id;
}
return null;
},
});
render(
(<ApolloProvider client={client}>
<App />
</ApolloProvider>),
document.getElementById('app')
);
>>>>>>>
render(
(<ApolloProvider client={client}>
<App />
</ApolloProvider>),
document.getElementById('app')
); |
<<<<<<<
date: new Date('2018-09-21'),
changes: <React.Fragment>Updated mana used module to mana tracker. It now also includes HPM (healing per mana) per spell.</React.Fragment>,
contributors: [blazyb],
},
{
=======
date: new Date('2018-09-19'),
changes: <React.Fragment>Added implementation of Azerite trait Lively spirit.</React.Fragment>,
contributors: [blazyb],
},
{
date: new Date('2018-09-20'),
changes: <React.Fragment>Added implementation of Azerite trait Synergistic Growth.</React.Fragment>,
contributors: [blazyb],
},
{
>>>>>>>
date: new Date('2018-09-21'),
changes: <React.Fragment>Updated mana used module to mana tracker. It now also includes HPM (healing per mana) per spell.</React.Fragment>,
contributors: [blazyb],
},
{
date: new Date('2018-09-19'),
changes: <React.Fragment>Added implementation of Azerite trait Lively spirit.</React.Fragment>,
contributors: [blazyb],
},
{
date: new Date('2018-09-20'),
changes: <React.Fragment>Added implementation of Azerite trait Synergistic Growth.</React.Fragment>,
contributors: [blazyb],
},
{ |
<<<<<<<
import systems from './systems';
=======
import assets from './assets';
>>>>>>>
import systems from './systems';
import assets from './assets';
<<<<<<<
presence,
systems,
=======
presence,
assets,
>>>>>>>
presence,
systems,
assets, |
<<<<<<<
import React, { Component } from "react";
import { Container, Row, Col, Button } from "reactstrap";
import gql from "graphql-tag";
import { graphql, withApollo } from "react-apollo";
import { Clamps, Ramps, Doors } from "./graphics";
import Immutable from "immutable";
import "./style.scss";
=======
import React, { Component } from 'react';
import { Container, Row, Col, Button } from 'reactstrap';
import gql from 'graphql-tag';
import { graphql, withApollo } from 'react-apollo';
import { Clamps, Ramps, Doors } from './graphics';
import Immutable from 'immutable';
import Tour from "reactour";
import './style.scss';
>>>>>>>
import React, { Component } from "react";
import { Container, Row, Col, Button } from "reactstrap";
import gql from "graphql-tag";
import { graphql, withApollo } from "react-apollo";
import { Clamps, Ramps, Doors } from "./graphics";
import Immutable from "immutable";
import Tour from "reactour";
import "./style.scss";
<<<<<<<
const { graphic, disabled } = this.state;
const { clamps, ramps, airlock } = this.props.data.simulators[0].ship;
return (
<Container fluid className="docking">
<Row>
<Col sm={5}>
<div className="flex">
<Button
disabled={disabled}
block
size="lg"
color="primary"
onClick={this.clamps.bind(this)}
>
{clamps ? "Detach" : "Attach"} Docking Clamps
</Button>
<Button
disabled={disabled}
block
size="lg"
color="primary"
onClick={this.ramps.bind(this)}
>
{ramps ? "Retract" : "Extend"} Boarding Ramps
</Button>
<Button
disabled={disabled}
block
size="lg"
color="primary"
onClick={this.doors.bind(this)}
>
{airlock ? "Close" : "Open"} Airlock Doors
</Button>
</div>
</Col>
<Col className="graphics" sm={{ size: 2, offset: 2 }}>
{graphic === "clamps" && <Clamps transform={clamps} />}
{graphic === "ramps" && <Ramps transform={ramps} />}
{graphic === "doors" && <Doors transform={airlock} />}
</Col>
</Row>
</Container>
);
=======
const {graphic, disabled} = this.state;
const {clamps, ramps, airlock} = this.props.data.simulators[0].ship;
return <Container fluid className="docking">
<Row>
<Col sm={5}>
<div className="flex">
<Button disabled={disabled} block size="lg" color="primary" onClick={this.clamps.bind(this)}>{clamps ? 'Detach' : 'Attach'} Docking Clamps</Button>
<Button disabled={disabled} block size="lg" color="primary" onClick={this.ramps.bind(this)}>{ramps ? 'Retract' : 'Extend'} Boarding Ramps</Button>
<Button disabled={disabled} block size="lg" color="primary" onClick={this.doors.bind(this)}>{airlock ? 'Close' : 'Open'} Airlock Doors</Button>
</div>
</Col>
<Col className="graphics" sm={{size: 2, offset: 2}}>
{graphic === 'clamps' && <Clamps transform={clamps} />}
{graphic === 'ramps' && <Ramps transform={ramps} />}
{graphic === 'doors' && <Doors transform={airlock} />}
</Col>
</Row>
<Tour
steps={trainingSteps}
isOpen={this.props.clientObj.training}
onRequestClose={this.props.stopTraining}
/>
</Container>
>>>>>>>
const { graphic, disabled } = this.state;
const { clamps, ramps, airlock } = this.props.data.simulators[0].ship;
return (
<Container fluid className="docking">
<Row>
<Col sm={5}>
<div className="flex">
<Button
disabled={disabled}
block
size="lg"
color="primary"
onClick={this.clamps.bind(this)}
>
{clamps ? "Detach" : "Attach"} Docking Clamps
</Button>
<Button
disabled={disabled}
block
size="lg"
color="primary"
onClick={this.ramps.bind(this)}
>
{ramps ? "Retract" : "Extend"} Boarding Ramps
</Button>
<Button
disabled={disabled}
block
size="lg"
color="primary"
onClick={this.doors.bind(this)}
>
{airlock ? "Close" : "Open"} Airlock Doors
</Button>
</div>
</Col>
<Col className="graphics" sm={{ size: 2, offset: 2 }}>
{graphic === "clamps" && <Clamps transform={clamps} />}
{graphic === "ramps" && <Ramps transform={ramps} />}
{graphic === "doors" && <Doors transform={airlock} />}
</Col>
</Row>
<Tour
steps={trainingSteps}
isOpen={this.props.clientObj.training}
onRequestClose={this.props.stopTraining}
/>
</Container>
); |
<<<<<<<
import TasksCore from "./Tasks/core";
=======
import AlternateSensorsCore from "./ParticleDetector/core";
>>>>>>>
import TasksCore from "./Tasks/core";
import AlternateSensorsCore from "./ParticleDetector/core";
<<<<<<<
NewMessagingCore,
TasksCore
=======
NewMessagingCore,
AlternateSensorsCore
>>>>>>>
NewMessagingCore,
TasksCore,
AlternateSensorsCore |
<<<<<<<
},
setTaskTemplateReportTypes(root, args, context) {
App.handleEvent(args, "setTaskTemplateReportTypes", context);
=======
},
addTaskMacro(root, args, context) {
App.handleEvent(args, "addTaskMacro", context);
},
removeTaskMacro(root, args, context) {
App.handleEvent(args, "removeTaskMacro", context);
>>>>>>>
},
setTaskTemplateReportTypes(root, args, context) {
App.handleEvent(args, "setTaskTemplateReportTypes", context);
},
addTaskMacro(root, args, context) {
App.handleEvent(args, "addTaskMacro", context);
},
removeTaskMacro(root, args, context) {
App.handleEvent(args, "removeTaskMacro", context); |
<<<<<<<
import LuffaWrappings from './Modules/Items/LuffaWrappings';
=======
import FuryOfNature from './Modules/Items/FuryOfNature';
>>>>>>>
import LuffaWrappings from './Modules/Items/LuffaWrappings';
import FuryOfNature from './Modules/Items/FuryOfNature';
<<<<<<<
luffaWrappings: LuffaWrappings,
=======
furyOfNature: FuryOfNature,
>>>>>>>
luffaWrappings: LuffaWrappings,
furyOfNature: FuryOfNature, |
<<<<<<<
import { ThoriumTypes } from "./thorium";
=======
import { DockingTypes } from "./docking";
>>>>>>>
import { ThoriumTypes } from "./thorium";
import { DockingTypes } from "./docking";
<<<<<<<
TaskReportTypes,
ThoriumTypes
=======
TaskReportTypes,
DockingTypes
>>>>>>>
TaskReportTypes,
ThoriumTypes,
DockingTypes |
<<<<<<<
import DamageControl from './DamageControl';
=======
import Targeting from './Targeting';
import PhaserCharging from './PhaserCharging';
import ProbeConstruction from './ProbeConstruction';
>>>>>>>
import DamageControl from './DamageControl';
import Targeting from './Targeting';
import PhaserCharging from './PhaserCharging';
import ProbeConstruction from './ProbeConstruction';
<<<<<<<
import DamageReportsCore from './DamageControl/reportsCore';
=======
import TargetingCore from './Targeting/core';
import PhaserCore from './PhaserCharging/core';
import TorpedoCore from './TorpedoLoading/core';
>>>>>>>
import DamageReportsCore from './DamageControl/reportsCore';
import TargetingCore from './Targeting/core';
import PhaserCore from './PhaserCharging/core';
import TorpedoCore from './TorpedoLoading/core';
<<<<<<<
DamageControl,
=======
Targeting,
PhaserCharging,
ProbeConstruction
>>>>>>>
DamageControl,
Targeting,
PhaserCharging,
ProbeConstruction
<<<<<<<
RemoteCore,
DamageReportsCore
=======
RemoteCore,
TargetingCore,
PhaserCore,
TorpedoCore
>>>>>>>
RemoteCore,
DamageReportsCore,
TargetingCore,
PhaserCore,
TorpedoCore |
<<<<<<<
import CardsCore from "./Cards/core";
import CommandLineCore from "./CommandLine/core";
=======
import AuxTimelineCore from "./Timeline/auxTimelineData";
>>>>>>>
import CardsCore from "./Cards/core";
import CommandLineCore from "./CommandLine/core";
import AuxTimelineCore from "./Timeline/auxTimelineData";
<<<<<<<
CrmCore,
CardsCore,
CommandLineCore
=======
CrmCore,
AuxTimelineCore
>>>>>>>
CrmCore,
CardsCore,
CommandLineCore,
AuxTimelineCore |
<<<<<<<
"AdminStations",
"EngineControl",
=======
"AdminStations",
"Thrusters",
>>>>>>>
"AdminStations",
"EngineControl",
"Thrusters", |
<<<<<<<
var fingerprint = req.connection.getPeerCertificate().fingerprint;
var api = prepareApi(req, res);
=======
var fingerprint = getFingerprint(req);
>>>>>>>
var fingerprint = getFingerprint(req);
var api = prepareApi(req, res);
<<<<<<<
var fingerprint = req.connection.getPeerCertificate().fingerprint;
var api = prepareApi(req, res);
=======
var fingerprint = getFingerprint(req);
>>>>>>>
var fingerprint = getFingerprint(req);
var api = prepareApi(req, res);
<<<<<<<
var fingerprint = req.connection.getPeerCertificate().fingerprint;
var api = prepareApi(req, res);
=======
var fingerprint = getFingerprint(req);
>>>>>>>
var fingerprint = getFingerprint(req);
var api = prepareApi(req, res); |
<<<<<<<
const customers = require('./customers')
=======
const E = require('./error')
>>>>>>>
const E = require('./error')
const customers = require('./customers') |
<<<<<<<
'use strict';
=======
/* @flow weak */
'use strict'
>>>>>>>
'use strict'
<<<<<<<
cb(err);
});
});
};
function query(client, queryStr, values, cb) {
=======
cb(err)
})
})
}
exports.recordDeviceEvent = function recordDeviceEvent (session, event) {
connect(function (cerr, client, done) {
if (cerr) return
var sql = 'INSERT INTO device_events (device_fingerprint, event_type, ' +
'note, device_time) VALUES ($1, $2, $3, $4)'
var values = [session.fingerprint, event.eventType, event.note,
event.deviceTime]
client.query(sql, values, done)
})
}
function query (client, queryStr, values, cb) {
>>>>>>>
cb(err)
})
})
}
exports.recordDeviceEvent = function recordDeviceEvent (session, event) {
connect(function (cerr, client, done) {
if (cerr) return
var sql = 'INSERT INTO device_events (device_fingerprint, event_type, ' +
'note, device_time) VALUES ($1, $2, $3, $4)'
var values = [session.fingerprint, event.eventType, event.note,
event.deviceTime]
client.query(sql, values, done)
})
}
function query (client, queryStr, values, cb) {
<<<<<<<
console.error(err)
console.log(queryStr);
console.log(values);
=======
console.log(queryStr)
console.log(values)
>>>>>>>
console.error(err)
console.log(queryStr)
console.log(values)
<<<<<<<
console.error(err)
console.log(queryStr);
console.log(values);
=======
console.log(queryStr)
console.log(values)
>>>>>>>
console.error(err)
console.log(queryStr)
console.log(values) |
<<<<<<<
'b-tooltip': ['c-sample-tooltip-visible']
},
modernizr: {
minify: true,
options: [
'setClasses'
],
'feature-detects': [
'test/css/flexbox'
]
=======
'b-tooltip': ['c-sample-tooltip-visible'],
'b-modal': ['c-sample-modal-visible']
>>>>>>>
'b-tooltip': ['c-sample-tooltip-visible'],
'b-modal': ['c-sample-modal-visible']
},
modernizr: {
minify: true,
options: [
'setClasses'
],
'feature-detects': [
'test/css/flexbox'
] |
<<<<<<<
const Header = ({ title, subtitle, toggleChat, showCloseButton }) =>
<div className="rcw-header">
=======
const Header = ({ title, subtitle, toggleChat, showCloseButton, titleAvatar }) =>
<div className="header">
>>>>>>>
const Header = ({ title, subtitle, toggleChat, showCloseButton, titleAvatar }) =>
<div className="rcw-header">
<<<<<<<
<h4 className="rcw-title">{title}</h4>
=======
<h4 className="title">
{
titleAvatar &&
<img src={titleAvatar} className="avatar" alt="profile" />
}
{title}</h4>
>>>>>>>
<h4 className="rcw-title">
{
titleAvatar &&
<img src={titleAvatar} className="avatar" alt="profile" />
}
{title}</h4> |
<<<<<<<
<div className="rcw-header">
{
showCloseButton &&
<button className="rcw-close-button" onClick={toggleChat}>
<img src={close} className="rcw-close" alt="close" />
=======
<div className="header">
{showCloseButton &&
<button className="close-button" onClick={toggleChat}>
<img src={close} className="close" alt="close" />
>>>>>>>
<div className="rcw-header">
{showCloseButton &&
<button className="rcw-close-button" onClick={toggleChat}>
<img src={close} className="rcw-close" alt="close" />
<<<<<<<
<h4 className="rcw-title">
{
titleAvatar &&
<img src={titleAvatar} className="avatar" alt="profile" />
}
{title}</h4>
=======
<h4 className="title">
{titleAvatar && <img src={titleAvatar} className="avatar" alt="profile" />}
{title}
</h4>
>>>>>>>
<h4 className="rcw-title">
{titleAvatar && <img src={titleAvatar} className="avatar" alt="profile" />}
{title}
</h4> |
<<<<<<<
import marked from 'marked';
import { PROP_TYPES } from '@constants';
=======
import markdownIt from 'markdown-it';
import markdownItSup from 'markdown-it-sup';
import markdownItSanitizer from 'markdown-it-sanitizer';
import markdownItLinkAttributes from 'markdown-it-link-attributes';
import { PROP_TYPES } from 'constants';
>>>>>>>
import markdownIt from 'markdown-it';
import markdownItSup from 'markdown-it-sup';
import markdownItSanitizer from 'markdown-it-sanitizer';
import markdownItLinkAttributes from 'markdown-it-link-attributes';
import { PROP_TYPES } from '@constants'; |
<<<<<<<
<span className="rcw-badge">{badge}</span>;
=======
<span className="badge">{badge}</span>
);
>>>>>>>
<span className="rcw-badge">{badge}</span>;
); |
<<<<<<<
}
export function hideAvatar() {
return {
type: actions.HIDE_AVATAR
};
=======
}
export function setQuickButtons(buttons) {
return {
type: actions.SET_QUICK_BUTTONS,
buttons
}
>>>>>>>
}
export function hideAvatar() {
return {
type: actions.HIDE_AVATAR
};
}
export function setQuickButtons(buttons) {
return {
type: actions.SET_QUICK_BUTTONS,
buttons
} |
<<<<<<<
autofocus={props.autofocus}
=======
badge={props.badge}
>>>>>>>
badge={props.badge}
autofocus={props.autofocus}
<<<<<<<
fullScreenMode: PropTypes.bool,
autofocus: PropTypes.bool
=======
fullScreenMode: PropTypes.bool,
badge: PropTypes.number
>>>>>>>
fullScreenMode: PropTypes.bool,
badge: PropTypes.number,
autofocus: PropTypes.bool
<<<<<<<
fullScreenMode: false,
autofocus: true
=======
fullScreenMode: false,
badge: 0
>>>>>>>
fullScreenMode: false,
badge: 0,
autofocus: true |
<<<<<<<
var target = {type:"refresh", sobjectType:"Account", fieldlist:["Id", "Name"]};
=======
var target = {soupName:soupName, type:"refresh", objectType:"Account", fieldlist:["Id", "Name"]};
>>>>>>>
var target = {soupName:soupName, type:"refresh", sobjectType:"Account", fieldlist:["Id", "Name"]}; |
<<<<<<<
import { createIntl } from 'react-intl';
// import { createIntl, createIntlCache } from 'react-intl';
import { IntlProvider } from 'react-intl-redux';
import { Route, HashRouter, BrowserRouter, Switch } from 'react-router-dom';
=======
import { createIntl, createIntlCache, RawIntlProvider } from 'react-intl';
import { Route, HashRouter, BrowserRouter, Switch } from 'react-router-dom';
>>>>>>>
import { createIntl } from 'react-intl';
import { IntlProvider } from 'react-intl-redux';
import { Route, HashRouter, BrowserRouter, Switch } from 'react-router-dom';
<<<<<<<
import JoinDialog from './components/JoinDialog';
=======
import ChooseRoom from './components/ChooseRoom';
import LoginDialog from './components/LoginDialog';
>>>>>>>
import ChooseRoom from './components/ChooseRoom';
import LoginDialog from './components/LoginDialog';
<<<<<<<
<Switch>
<Route exact path='/' component={JoinDialog} />
<Route path='/:id' component={App} />
</Switch>
=======
<Switch>
<Route exact path='/login_dialog' component={LoginDialog} />
<Route exact path='/' component={ChooseRoom} />
<Route path='/:id' component={App} />
</Switch>
>>>>>>>
<Switch>
<Route exact path='/' component={ChooseRoom} />
<Route exact path='/login_dialog' component={LoginDialog} />
<Route path='/:id' component={App} />
</Switch> |
<<<<<<<
name : null,
displayName : null,
displayNameSet : false,
device : null,
canSendMic : false,
canSendWebcam : false,
canShareScreen : false,
needExtension : false,
canChangeWebcam : false,
webcamInProgress : false,
screenShareInProgress : false,
audioOnly : false,
audioOnlyInProgress : false,
restartIceInProgress : false
=======
name : null,
displayName : null,
displayNameSet : false,
device : null,
canSendMic : false,
canSendWebcam : false,
canChangeWebcam : false,
webcamInProgress : false,
audioOnly : false,
audioOnlyInProgress : false,
raiseHand : false,
raiseHandInProgress : false,
restartIceInProgress : false
>>>>>>>
name : null,
displayName : null,
displayNameSet : false,
device : null,
canSendMic : false,
canSendWebcam : false,
canShareScreen : false,
needExtension : false,
canChangeWebcam : false,
webcamInProgress : false,
screenShareInProgress : false,
audioOnly : false,
audioOnlyInProgress : false,
raiseHand : false,
raiseHandInProgress : false,
restartIceInProgress : false |
<<<<<<<
appView = new app.views.AppView({
user: new app.models.CurrentUser(),
users: new app.models.UserSet(),
appStatus: new app.models.AppStatus(),
spa: new app.models.SPA(),
services: {}
});
=======
var $el = $("<div></div>");
$("#fixtures").append($el);
appViewOptions = {
el: $el.get()[0],
user: {},
users: [],
appStatus: [],
spa: {}
};
});
afterEach(function() {
$("#fixtures").empty();
>>>>>>>
var $el = $("<div></div>");
$("#fixtures").append($el);
appViewOptions = {
el: $el.get()[0],
user: new app.models.CurrentUser(),
users: new app.models.UserSet(),
appStatus: new app.models.AppStatus(),
spa: new app.models.SPA(),
services: {}
};
});
afterEach(function() {
$("#fixtures").empty();
<<<<<<<
expect(appView.notificationsView).to.be.an.instanceOf(
=======
appView = new app.views.AppView(appViewOptions);
expect(appView.notifications).to.be.an.instanceOf(
>>>>>>>
appView = new app.views.AppView(appViewOptions);
expect(appView.notifications).to.be.an.instanceOf(
<<<<<<<
expect(appView.loginView).to.be.an.instanceOf(app.views.LoginView);
=======
appView = new app.views.AppView(appViewOptions);
expect(appView.login).to.be.an.instanceOf(app.views.LoginView);
>>>>>>>
appView = new app.views.AppView(appViewOptions);
expect(appView.login).to.be.an.instanceOf(app.views.LoginView);
<<<<<<<
expect(appView.usersView).to.be.an.instanceOf(app.views.UsersView);
=======
appView = new app.views.AppView(appViewOptions);
expect(appView.users).to.be.an.instanceOf(app.views.UsersView);
>>>>>>>
appView = new app.views.AppView(appViewOptions);
expect(appView.users).to.be.an.instanceOf(app.views.UsersView);
<<<<<<<
expect(appView.spaView).to.be.an.instanceOf(app.views.SPAView);
=======
appView = new app.views.AppView(appViewOptions);
expect(appView.spa).to.be.an.instanceOf(app.views.SPAView);
>>>>>>>
appView = new app.views.AppView(appViewOptions);
expect(appView.spa).to.be.an.instanceOf(app.views.SPAView); |
<<<<<<<
/* global indexedDB, importScripts, Server, HTTP, CollectedContacts */
=======
/* global indexedDB, importScripts, Server, HTTP, loadConfig */
>>>>>>>
/* global indexedDB, importScripts, Server, HTTP, CollectedContacts,
loadConfig */
<<<<<<<
'addressbook/collected.js', // exposes CollectedContacts
'worker/http.js', // exposes HTTP
'worker/server.js'); // exposes Server
=======
'/config.js', // exposes loadConfig
'worker/http.js', // exposes HTTP
'worker/server.js'); // exposes Server
>>>>>>>
'/config.js', // exposes loadConfig
'addressbook/collected.js', // exposes CollectedContacts
'worker/http.js', // exposes HTTP
'worker/server.js'); // exposes Server |
<<<<<<<
/**
* Called when initiating a call.
*
* @param {payloads.Offer} offerMsg the offer to send to initiate
* the call.
*
*/
ChatApp.prototype._onSendOffer = function(offerMsg) {
this.port.postEvent('talkilla.call-offer', offerMsg.toJSON());
=======
ChatApp.prototype._onIceCandidate = function(data) {
this.webrtc.addIceCandidate(data.candidate);
};
ChatApp.prototype._onSendOffer = function(data) {
this.port.postEvent('talkilla.call-offer', data);
>>>>>>>
ChatApp.prototype._onIceCandidate = function(data) {
this.webrtc.addIceCandidate(data.candidate);
};
/**
* Called when initiating a call.
*
* @param {payloads.Offer} offerMsg the offer to send to initiate the call.
*/
ChatApp.prototype._onSendOffer = function(offerMsg) {
this.port.postEvent('talkilla.call-offer', offerMsg.toJSON()); |
<<<<<<<
this.timer = setTimeout(function() {
this.trigger('offer-timeout');
app.port.postEvent('talkilla.offer-timeout', options);
}.bind(this), PENDING_CALL_TIMEOUT);
this.set({id: options.caller, otherUser: options.callee});
=======
this.set({otherUser: options.callee});
>>>>>>>
this.timer = setTimeout(function() {
this.trigger('offer-timeout');
app.port.postEvent('talkilla.offer-timeout', options);
}.bind(this), PENDING_CALL_TIMEOUT);
this.set({otherUser: options.callee}); |
<<<<<<<
this.trigger(topic, new payloads.Hangup(data));
=======
this.trigger(topic, data.peer);
} else if (topic === "ice:candidate") {
this.trigger(topic, data.peer, data.candidate);
>>>>>>>
this.trigger(topic, new payloads.Hangup(data));
} else if (topic === "ice:candidate") {
this.trigger(topic, data.peer, data.candidate); |
<<<<<<<
});
var user = new app.models.User({nick: "foo"});
=======
};
var user = new app.models.User({username: "foo"});
>>>>>>>
});
var user = new app.models.User({username: "foo"}); |
<<<<<<<
/* global app, Backbone, StateMachine,
mozRTCPeerConnection, mozRTCSessionDescription, tnetbin */
=======
/* global app, Backbone, StateMachine */
>>>>>>>
/* global app, Backbone, StateMachine,
mozRTCPeerConnection, mozRTCSessionDescription, tnetbin */
<<<<<<<
/**
* WebRTC call model
*
* @class WebRTCCall
* @constructor
*
* Attributes:
*
* - {Boolean} audio: enable audio stream
* - {Boolean} video: enable video stream
* - {Boolean} fake: use fake streams
*
* Fired when a SDP offer is available (see #offer).
* @event offer-ready
* @param {Object} offer An SDP offer
*
* Fired when a SDP answer is available (see #answer).
* @event answer-ready
* @param {Object} answer An SDP answer
*
*
* Example:
*
* var webrtc = new app.models.WebRTCCall();
*
* // Caller side
* webrtc.on('offer-ready', function(offer) {
* sendOffer(offer);
* });
* webrtc.offer()
*
* // Callee side
* webrtc.on('answer-ready', function(answer) {
* sendAnswer(answer);
* }
* webrtc.answer(offer);
*
* // Once the caller receive the answer
* webrtc.establish(answer)
*
* // Both sides
* webrtc.on("change:localStream", function() {
* localVideo.mozSrcObject = webrtc.get("localStream");
* localVideo.play();
* });
* webrtc.on("change:remoteStream", function() {
* remoteVideo.mozSrcObject = webrtc.get("remoteStream");
* remoteVideo.play();
* });
*/
app.models.WebRTCCall = Backbone.Model.extend({
pc: undefined, // peer connection
dcIn: undefined, // data channel in
dcOut: undefined, // data channel out
initialize: function() {
this.pc = new mozRTCPeerConnection();
this.dcOut = this.pc.createDataChannel('dc', {});
this.pc.onaddstream = function(event) {
this.set("remoteStream", event.stream);
}.bind(this);
// data channel for incoming calls
this.pc.ondatachannel = function(event) {
this.dcIn = this._setupDataChannelIn(event.channel);
this.trigger('dc.in.ready', event);
}.bind(this);
this._onError = this._onError.bind(this);
},
/**
* Create a SDP offer after calling getUserMedia. In case of
* success, it triggers an offer-ready event with the created offer.
* @param {Object} options object containing:
*
* - video: set to true to enable video
* - audio: set to true to enable audio
*/
offer: function(options) {
this.set({video: options.video, audio: options.audio});
var callback = this.trigger.bind(this, "offer-ready");
this._getMedia(this._createOffer.bind(this, callback), this._onError);
},
/**
* Establish a WebRTC p2p connection.
* @param {Object} options object containing:
*
* - answer: the answer (sdp) to add to the peer connection
*/
establish: function(options) {
var answerDescription = new mozRTCSessionDescription(options.answer);
var cb = function() {};
this.pc.setRemoteDescription(answerDescription, cb, this._onError);
},
/**
* Create a SDP answer after calling getUserMedia. In case of
* success, it triggers an answer-ready event with the created answer.
* @param {Object} options object containing:
*
* - video: set to true to enable video
* - audio: set to true to enable audio
* - offer: the offer (sdp) to respond to.
*/
answer: function(options) {
this.set({video: options.video, audio: options.audio});
var callback = this.trigger.bind(this, "answer-ready");
var createAnswer = this._createAnswer.bind(this, options.offer, callback);
this._getMedia(createAnswer, this._onError);
},
send: function(data) {
if (!this.dcOut)
return this._onError('no data channel connection available');
this.dcOut.send(tnetbin.toArrayBuffer(tnetbin.encode(data)));
},
/**
* Close the p2p connection.
*/
hangup: function() {
if (this.pc && this.pc.signalingState !== "closed")
this.pc.close();
},
_createOffer: function(callback) {
if (!this.get('video') && !this.get('audio'))
return this._onError("Call type has not been defined");
this.pc.createOffer(function(offer) {
var cb = callback.bind(this, offer);
this.pc.setLocalDescription(offer, cb, this._onError);
}.bind(this), this._onError);
},
_createAnswer: function(offer, callback) {
if (!this.get('video') && !this.get('audio'))
return this._onError("Call type has not been defined");
var offerDescription = new mozRTCSessionDescription(offer);
this.pc.setRemoteDescription(offerDescription, function() {
this.pc.createAnswer(function(answer) {
var cb = callback.bind(this, answer);
this.pc.setLocalDescription(answer, cb, this._onError);
}.bind(this), this._onError);
}.bind(this), this._onError);
},
_getMedia: function(callback, errback) {
var constraints = {
video: !!this.get('video'),
audio: !!this.get('audio'),
fake: !!this.get('fake')
};
var cb = function (localStream) {
this.pc.addStream(localStream);
this.set("localStream", localStream);
callback();
}.bind(this);
navigator.mozGetUserMedia(constraints, cb, errback);
},
_setupDataChannelIn: function(channel) {
channel.binaryType = 'blob';
channel.onopen = function(event) {
this.trigger('dc.in.open', event);
}.bind(this);
channel.onmessage = function(event) {
var reader = new FileReader();
reader.addEventListener("loadend", function() {
this.trigger('dc.in.message', tnetbin.decode(reader.result).value);
}.bind(this));
reader.readAsArrayBuffer(event.data);
}.bind(this);
channel.onerror = function(event) {
this.trigger('dc.in.error', event);
}.bind(this);
channel.onclose = function(event) {
this.trigger('dc.in.close', event);
}.bind(this);
return channel;
},
_onError: function(error) {
// XXX Better error logging and handling
console.error("WebRTCCall error: " + error);
}
});
=======
>>>>>>> |
<<<<<<<
});
describe("#_onIncomingConversation", function() {
var constraints = {video: false, audio: true};
beforeEach(function() {
sandbox.stub(WebRTC, "SDP").returns({
constraints: constraints,
only: function() { return false; }
});
});
it("should set the peer", function() {
chatApp._onIncomingConversation(incomingCallData);
expect(chatApp.peer.get("username"))
.to.equal(incomingCallData.peer.username);
});
=======
>>>>>>> |
<<<<<<<
it("should not allow the caller to send an empty message",
function() {
var chatApp = new ChatApp();
var textChat = chatApp.textChatView.collection;
sandbox.stub(textChat, "add");
$('#textchat [name="message"]').val("");
$("#textchat form").trigger("submit");
sinon.assert.callCount(textChat.add, 0);
});
describe("#sendFile", function() {
var textChatView;
beforeEach(function() {
sandbox.stub(call, "on");
textChatView = new app.views.TextChatView({
sender: app.data.user,
call: call,
collection: new app.models.TextChat(null, {media: media, peer: peer})
});
});
it("should add a FileTransfer model to the collection", function() {
var file = "fakeFile";
var chunkSize = 512;
var event = {target: {files: [file]}};
sandbox.stub(textChatView.collection, "add", function(transfer) {
expect(transfer.file).to.equal(file);
expect(transfer.options.chunkSize).to.equal(chunkSize);
});
textChatView.sendFile(event);
sinon.assert.calledOnce(textChatView.collection.add);
});
});
=======
>>>>>>>
it("should not allow the caller to send an empty message",
function() {
var chatApp = new ChatApp();
var textChat = chatApp.textChatView.collection;
sandbox.stub(textChat, "add");
$('#textchat [name="message"]').val("");
$("#textchat form").trigger("submit");
sinon.assert.callCount(textChat.add, 0);
}); |
<<<<<<<
import Module from 'Parser/Core/Module';
import Combatants from 'Parser/Core/Modules/Combatants';
=======
import Analyzer from 'Parser/Core/Analyzer';
>>>>>>>
import Combatants from 'Parser/Core/Modules/Combatants';
import Analyzer from 'Parser/Core/Analyzer';
<<<<<<<
class CordOfMaiev extends Module {
static dependencies = {
combatants: Combatants,
};
=======
class CordOfMaiev extends Analyzer {
>>>>>>>
class CordOfMaiev extends Analyzer {
static dependencies = {
combatants: Combatants,
}; |
<<<<<<<
/**
* WebRTC call model
*
* @class WebRTCCall
* @constructor
*
* Attributes:
*
* - {Boolean} audio: enable audio stream
* - {Boolean} video: enable video stream
* - {Boolean} fake: use fake streams
*
* Fired when a SDP offer is available (see #offer).
* @event offer-ready
* @param {Object} offer An SDP offer
*
* Fired when a SDP answer is available (see #answer).
* @event answer-ready
* @param {Object} answer An SDP answer
*
*
* Example:
*
* var webrtc = new app.models.WebRTCCall();
*
* // Caller side
* webrtc.on('offer-ready', function(offer) {
* sendOffer(offer);
* });
* webrtc.offer()
*
* // Callee side
* webrtc.on('answer-ready', function(answer) {
* sendAnswer(answer);
* }
* webrtc.answer(offer);
*
* // Once the caller receive the answer
* webrtc.establish(answer)
*
* // Both sides
* webrtc.on("change:localStream", function() {
* localVideo.mozSrcObject = webrtc.get("localStream");
* localVideo.play();
* });
* webrtc.on("change:remoteStream", function() {
* remoteVideo.mozSrcObject = webrtc.get("remoteStream");
* remoteVideo.play();
* });
*/
app.models.WebRTCCall = Backbone.Model.extend({
connected: false,
pc: undefined, // peer connection
dcIn: undefined, // data channel in
dcOut: undefined, // data channel out
initialize: function(attributes, options) {
this.pc = new mozRTCPeerConnection();
// outgoing data channel
if (options && !!options.dataChannel) {
log("creating outgoing data channel");
this.dcOut = this.pc.createDataChannel('dc', {});
// incoming data channel
this.pc.ondatachannel = function(event) {
log("creating incoming data channel");
this.dcIn = this._setupDataChannelIn(event.channel);
this.trigger('dc.in.ready', event);
}.bind(this);
}
// remote stream
this.pc.onaddstream = function(event) {
this.set("remoteStream", event.stream);
}.bind(this);
this._onError = this._onError.bind(this);
},
/**
* Create a SDP offer after calling getUserMedia. In case of
* success, it triggers an offer-ready event with the created offer.
* @param {Object} options object containing:
*
* - video: set to true to enable video
* - audio: set to true to enable audio
*/
offer: function(options) {
log("WebRTCCall#offer", options);
this.set({
video: !!(options && options.video),
audio: !!(options && options.audio)
});
var callback = this.trigger.bind(this, "offer-ready");
this._getMedia(this._createOffer.bind(this, callback), function(err) {
error("Unable to get media (offer)", err);
});
},
/**
* Establish a WebRTC p2p connection.
* @param {Object} options object containing:
*
* - answer: the answer (sdp) to add to the peer connection
*/
establish: function(options) {
log("WebRTCCall#establish", options);
var answerDescription = new mozRTCSessionDescription(options.answer);
log("answer description", answerDescription);
var onEstablished = function() {
this.connected = true;
this.trigger("established");
}.bind(this);
this.pc.setRemoteDescription(answerDescription, onEstablished,
function(err) {
error("Unable to set remote description", err);
});
},
/**
* Create a SDP answer after calling getUserMedia. In case of
* success, it triggers an answer-ready event with the created answer.
* @param {Object} options object containing:
*
* - video: set to true to enable video
* - audio: set to true to enable audio
* - offer: the offer (sdp) to respond to.
*/
answer: function(options) {
log("WebRTCCall#answer", options);
this.set({
video: !!(options && options.video),
audio: !!(options && options.audio)
});
var callback = this.trigger.bind(this, "answer-ready");
var createAnswer = this._createAnswer.bind(this, options.offer, callback);
this._getMedia(createAnswer, function(err) {
error("Unable to get media (answer)", err);
});
},
/**
* Sends data over data channel, initiating and establishing the peer
* communication if necessary.
*
* @param {Object} data
*/
send: function(data) {
this._ensureConnected(function() {
if (!this.dcOut)
return error('No data channel connection available');
this.dcOut.send(JSON.stringify(data));
}, "dc.in.open");
},
/**
* Close the p2p connection.
*/
hangup: function() {
log("WebRTCCall#hangup");
this.connected = false;
if (this.pc && this.pc.signalingState !== "closed")
this.pc.close();
},
_getConstraints: function() {
return {
video: !!this.get('video'),
audio: !!this.get('audio'),
fake: !!this.get('fake')
};
},
_createOffer: function(callback) {
log("WebRTCCall#_createOffer");
var onOfferCreated = function(offer) {
var cb = callback.bind(this, offer);
this.pc.setLocalDescription(offer, cb, function(err) {
error("Unable to set local description (offer)", err);
});
}.bind(this);
this.pc.createOffer(onOfferCreated, function(err) {
error("Unable to create offer", err);
});
},
_createAnswer: function(offer, callback) {
log("WebRTCCall#_createAnswer", offer);
var offerDescription = new mozRTCSessionDescription(offer);
var onAnswerCreated = function(answer) {
log("answer created", answer);
var onEstablished = function() {
var cb = callback.bind(this, answer);
this.connected = true;
this.trigger("established");
cb();
}.bind(this);
this.pc.setLocalDescription(answer, onEstablished,
function(err) {
error("Unable to set local description (answer)", err);
});
}.bind(this);
var cb = function() {
this.pc.createAnswer(onAnswerCreated, function(err) {
error("Unable to create answer", err);
});
}.bind(this);
this.pc.setRemoteDescription(offerDescription, cb, function(err) {
error("Unable to set remote description", err);
});
},
/**
* Checks for an established peer connection before processing the provided
* callback. Will queue tasks until then.
* @param {Function} callback Callback to call once connected
* @param {String} eventName Connect event to wait for
*/
_ensureConnected: function(callback, eventName) {
if (this.connected)
return callback.call(this);
this.offer(this._getConstraints());
this.once(eventName || "established", callback, this);
},
_getMedia: function(callback, errback) {
log("WebRTCCall#_getMedia");
// if no media required, skip gUM
if (!this.get('video') && !this.get('audio'))
return callback();
var cb = function (localStream) {
this.pc.addStream(localStream);
this.set("localStream", localStream);
callback();
}.bind(this);
navigator.mozGetUserMedia(this._getConstraints(), cb, errback);
},
_setupDataChannelIn: function(channel) {
log("WebRTCCall#_setupDataChannelIn");
channel.binaryType = 'blob';
channel.onopen = function(event) {
this.trigger('dc.in.open', event);
}.bind(this);
channel.onmessage = function(event) {
this.trigger('dc.in.message', event);
}.bind(this);
channel.onerror = function(event) {
this.trigger('dc.in.error', event);
}.bind(this);
channel.onclose = function(event) {
this.trigger('dc.in.close', event);
}.bind(this);
return channel;
},
_onError: function(err) {
// XXX: better error logging
var readable = err;
if ("name" in err && "message" in err)
readable = err.name + ": " + err.message;
else
readable = err.toString();
var message = "WebRTCCall error: " + readable;
error(message);
throw new Error(message);
}
});
=======
>>>>>>> |
<<<<<<<
this.call.set({capabilities: msg.capabilities});
this.user.set({username: msg.user});
if (!msg.offer.upgrade) {
this.peer.set({
username: msg.peer.username,
fullName: msg.peer.fullName,
presence: msg.peerPresence
});
}
=======
>>>>>>> |
<<<<<<<
this.appPort.on("talkilla.chat-window-ready",
this._onChatWindowReady, this);
=======
this.appPort.on("talkilla.spa-error", this._onSPAError, this);
this.appPort.on("talkilla.presence-unavailable",
this._onPresenceUnavailable, this);
>>>>>>>
this.appPort.on("talkilla.spa-error", this._onSPAError, this);
this.appPort.on("talkilla.presence-unavailable",
this._onPresenceUnavailable, this);
<<<<<<<
this.appPort.on("talkilla.reauth-needed", this._onReauthNeeded, this);
// Transfer events to the model.
this.appPort.on("talkilla.server-reconnection", function(event) {
this.appStatus.ongoingReconnection(event);
}, this);
=======
this.appPort.on('talkilla.reauth-needed', this._onReauthNeeded, this);
this.appPort.on('social.port-closing', this._onSocialPortClosing(), this);
>>>>>>>
this.appPort.on('talkilla.reauth-needed', this._onReauthNeeded, this);
this.appPort.on('social.port-closing', this._onSocialPortClosing(), this);
// Transfer events to the model.
this.appPort.on("talkilla.server-reconnection", function(event) {
this.appStatus.ongoingReconnection(event);
}, this);
<<<<<<<
SidebarApp.prototype._onChatWindowReady = function() {
this.appPort.post("talkilla.user-nick", {nick: this.user.get("nick")});
};
=======
>>>>>>>
SidebarApp.prototype._onChatWindowReady = function() {
this.appPort.post("talkilla.user-nick", {nick: this.user.get("nick")});
}; |
<<<<<<<
import Badge from '@pluralsight/ps-design-system-badge'
import core from '@pluralsight/ps-design-system-core'
=======
import Badge from '@pluralsight/ps-design-system-badge/react.js'
import * as core from '@pluralsight/ps-design-system-core'
>>>>>>>
import Badge from '@pluralsight/ps-design-system-badge'
import * as core from '@pluralsight/ps-design-system-core' |
<<<<<<<
import * as Icon from '@pluralsight/ps-design-system-icon'
import React from 'react'
=======
import Icon from '@pluralsight/ps-design-system-icon'
import React, { useState } from 'react'
>>>>>>>
import * as Icon from '@pluralsight/ps-design-system-icon'
import React, { useState } from 'react' |
<<<<<<<
import Checkbox from '@pluralsight/ps-design-system-checkbox'
import core from '@pluralsight/ps-design-system-core'
import DatePicker from '@pluralsight/ps-design-system-datepicker'
import Dropdown from '@pluralsight/ps-design-system-dropdown'
import Form from '@pluralsight/ps-design-system-form/react.js'
import Icon from '@pluralsight/ps-design-system-icon/react.js'
=======
import Checkbox from '@pluralsight/ps-design-system-checkbox/react.js'
import * as core from '@pluralsight/ps-design-system-core'
import DatePicker from '@pluralsight/ps-design-system-datepicker/react.js'
import Dropdown from '@pluralsight/ps-design-system-dropdown/react.js'
import Form from '@pluralsight/ps-design-system-form'
import Icon from '@pluralsight/ps-design-system-icon'
>>>>>>>
import Checkbox from '@pluralsight/ps-design-system-checkbox'
import * as core from '@pluralsight/ps-design-system-core'
import DatePicker from '@pluralsight/ps-design-system-datepicker'
import Dropdown from '@pluralsight/ps-design-system-dropdown'
import Form from '@pluralsight/ps-design-system-form'
import Icon from '@pluralsight/ps-design-system-icon'
<<<<<<<
import { string as stringUtil } from '@pluralsight/ps-design-system-util'
import Switch from '@pluralsight/ps-design-system-switch'
=======
import { capitalize } from '@pluralsight/ps-design-system-util'
import Switch from '@pluralsight/ps-design-system-switch/react.js'
>>>>>>>
import { capitalize } from '@pluralsight/ps-design-system-util'
import Switch from '@pluralsight/ps-design-system-switch' |
<<<<<<<
import DemonBlades from './modules/talents/DemonBlades';
import ImmolationAura from './modules/talents/ImmolationAura';
=======
import TrailofRuin from './modules/talents/TrailofRuin';
import FelBarrage from './modules/talents/FelBarrage';
import FelMastery from './modules/talents/FelMastery';
>>>>>>>
import DemonBlades from './modules/talents/DemonBlades';
import ImmolationAura from './modules/talents/ImmolationAura';
import TrailofRuin from './modules/talents/TrailofRuin';
import FelBarrage from './modules/talents/FelBarrage';
import FelMastery from './modules/talents/FelMastery';
<<<<<<<
demonBlades: DemonBlades,
immolationAura: ImmolationAura,
=======
trailofRuin: TrailofRuin,
felBarrage: FelBarrage,
felMastery: FelMastery,
>>>>>>>
demonBlades: DemonBlades,
immolationAura: ImmolationAura,
trailofRuin: TrailofRuin,
felBarrage: FelBarrage,
felMastery: FelMastery, |
<<<<<<<
import core from '@pluralsight/ps-design-system-core'
import * as Text from '@pluralsight/ps-design-system-text'
import Theme from '@pluralsight/ps-design-system-theme/react.js'
import Tooltip from '@pluralsight/ps-design-system-tooltip/react.js'
=======
import * as core from '@pluralsight/ps-design-system-core'
import * as Text from '@pluralsight/ps-design-system-text/react.js'
import Theme from '@pluralsight/ps-design-system-theme'
import Tooltip from '@pluralsight/ps-design-system-tooltip'
>>>>>>>
import * as core from '@pluralsight/ps-design-system-core'
import * as Text from '@pluralsight/ps-design-system-text'
import Theme from '@pluralsight/ps-design-system-theme'
import Tooltip from '@pluralsight/ps-design-system-tooltip' |
<<<<<<<
} from '@pluralsight/ps-design-system-theme'
import { transparentize } from '@pluralsight/ps-design-system-util/color'
=======
} from '@pluralsight/ps-design-system-theme/vars'
import { transparentize } from '@pluralsight/ps-design-system-util'
>>>>>>>
} from '@pluralsight/ps-design-system-theme'
import { transparentize } from '@pluralsight/ps-design-system-util' |
<<<<<<<
import core from '@pluralsight/ps-design-system-core'
import { names as themeNames } from '@pluralsight/ps-design-system-theme'
=======
import * as core from '@pluralsight/ps-design-system-core'
import { names as themeNames } from '@pluralsight/ps-design-system-theme/vars.js'
>>>>>>>
import * as core from '@pluralsight/ps-design-system-core'
import { names as themeNames } from '@pluralsight/ps-design-system-theme' |
<<<<<<<
import Table from '@pluralsight/ps-design-system-table'
import * as Text from '@pluralsight/ps-design-system-text/react.js'
=======
import Table from '@pluralsight/ps-design-system-table/react.js'
import * as Text from '@pluralsight/ps-design-system-text'
>>>>>>>
import Table from '@pluralsight/ps-design-system-table'
import * as Text from '@pluralsight/ps-design-system-text' |
<<<<<<<
import Icon from '@pluralsight/ps-design-system-icon/react'
import * as Text from '@pluralsight/ps-design-system-text'
=======
import Icon from '@pluralsight/ps-design-system-icon'
import Text from '@pluralsight/ps-design-system-text/react'
>>>>>>>
import Icon from '@pluralsight/ps-design-system-icon'
import * as Text from '@pluralsight/ps-design-system-text' |
<<<<<<<
import * as Text from '@pluralsight/ps-design-system-text'
import Theme from '@pluralsight/ps-design-system-theme/react.js'
=======
import Text from '@pluralsight/ps-design-system-text/react.js'
import Theme from '@pluralsight/ps-design-system-theme'
>>>>>>>
import * as Text from '@pluralsight/ps-design-system-text'
import Theme from '@pluralsight/ps-design-system-theme' |
<<<<<<<
import core from '@pluralsight/ps-design-system-core'
import { names as themeNames } from '@pluralsight/ps-design-system-theme'
=======
import * as core from '@pluralsight/ps-design-system-core'
import { names as themeNames } from '@pluralsight/ps-design-system-theme/vars'
>>>>>>>
import * as core from '@pluralsight/ps-design-system-core'
import { names as themeNames } from '@pluralsight/ps-design-system-theme' |
<<<<<<<
import core from '@pluralsight/ps-design-system-core'
import * as Text from '@pluralsight/ps-design-system-text/react.js'
import Radio from '@pluralsight/ps-design-system-radio'
=======
import * as core from '@pluralsight/ps-design-system-core'
import * as Text from '@pluralsight/ps-design-system-text'
import Radio from '@pluralsight/ps-design-system-radio/react.js'
>>>>>>>
import * as core from '@pluralsight/ps-design-system-core'
import * as Text from '@pluralsight/ps-design-system-text'
import Radio from '@pluralsight/ps-design-system-radio' |
<<<<<<<
import Form from '@pluralsight/ps-design-system-form'
import Icon from '@pluralsight/ps-design-system-icon/react.js'
=======
import Form from '@pluralsight/ps-design-system-form/react.js'
import Icon from '@pluralsight/ps-design-system-icon'
>>>>>>>
import Form from '@pluralsight/ps-design-system-form'
import Icon from '@pluralsight/ps-design-system-icon' |
<<<<<<<
} from '@pluralsight/ps-design-system-theme'
import core from '@pluralsight/ps-design-system-core'
=======
} from '@pluralsight/ps-design-system-theme/react.js'
import * as core from '@pluralsight/ps-design-system-core'
>>>>>>>
} from '@pluralsight/ps-design-system-theme'
import * as core from '@pluralsight/ps-design-system-core' |
<<<<<<<
import Row from '@pluralsight/ps-design-system-row'
import Theme from '@pluralsight/ps-design-system-theme/react.js'
=======
import Row from '@pluralsight/ps-design-system-row/react.js'
import Theme from '@pluralsight/ps-design-system-theme'
>>>>>>>
import Row from '@pluralsight/ps-design-system-row'
import Theme from '@pluralsight/ps-design-system-theme' |
<<<<<<<
import Theme from '@pluralsight/ps-design-system-theme'
import { transparentize } from '@pluralsight/ps-design-system-util/color.js'
=======
import Theme from '@pluralsight/ps-design-system-theme/react.js'
import { transparentize } from '@pluralsight/ps-design-system-util'
>>>>>>>
import Theme from '@pluralsight/ps-design-system-theme'
import { transparentize } from '@pluralsight/ps-design-system-util' |
<<<<<<<
import core from '@pluralsight/ps-design-system-core'
import { P } from '@pluralsight/ps-design-system-text'
=======
import * as core from '@pluralsight/ps-design-system-core'
import { P } from '@pluralsight/ps-design-system-text/react.js'
>>>>>>>
import * as core from '@pluralsight/ps-design-system-core'
import { P } from '@pluralsight/ps-design-system-text' |
<<<<<<<
import Icon from '@pluralsight/ps-design-system-icon/react.js'
import Row from '@pluralsight/ps-design-system-row'
import Theme from '@pluralsight/ps-design-system-theme/react.js'
=======
import Icon from '@pluralsight/ps-design-system-icon'
import Row from '@pluralsight/ps-design-system-row/react.js'
import Theme from '@pluralsight/ps-design-system-theme'
>>>>>>>
import Icon from '@pluralsight/ps-design-system-icon'
import Row from '@pluralsight/ps-design-system-row'
import Theme from '@pluralsight/ps-design-system-theme' |
<<<<<<<
import Halo from '@pluralsight/ps-design-system-halo'
import { useTheme } from '@pluralsight/ps-design-system-theme/react.js'
=======
import Halo from '@pluralsight/ps-design-system-halo/react.js'
import { useTheme } from '@pluralsight/ps-design-system-theme'
>>>>>>>
import Halo from '@pluralsight/ps-design-system-halo'
import { useTheme } from '@pluralsight/ps-design-system-theme' |
<<<<<<<
import DataWell from '@pluralsight/ps-design-system-datawell'
import * as Text from '@pluralsight/ps-design-system-text/react.js'
=======
import DataWell from '@pluralsight/ps-design-system-datawell/react.js'
import * as Text from '@pluralsight/ps-design-system-text'
>>>>>>>
import DataWell from '@pluralsight/ps-design-system-datawell'
import * as Text from '@pluralsight/ps-design-system-text' |
<<<<<<<
// How source maps are generated : style of source mapping
devtool: dev ? 'eval-cheap-module-source-map' : false,
// Development server configuration
devServer: {
// Execute custom middleware after all other middleware internally within the server
after() {
// Fix whitescreen bug on build with Electron BrowserWindow
exec('electron . --dev');
}
},
// Where webpack looks to start building the bundle
entry: {
'electron': './electron',
'app': './app/main.ts'
},
// How the different types of modules within a project will be treated
module: {
rules: [{
// All files with a '.ts' extension will be handled by ts-loader
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/
}, {
// All files with a '.scss' extension will be handled by sass-loader
test: /\.scss$/,
exclude: /node_modules/,
loaders: ['raw-loader', 'sass-loader', 'resolve-url-loader']
}, {
// All files with a '.html' extension will be injected as they are with raw-loader
test: /\.html$/,
exclude: /node_modules/,
loaders: ['raw-loader']
}, {
// All images and fonts will be optimized and their paths will be solved
enforce: 'pre',
test: /\.(png|jpe?g|gif|svg|woff2?|eot|ttf|otf|wav)(\?.*)?$/,
use: [{
loader: 'url-loader',
options: {
name: '[name].[hash:10].[ext]'
}
}, {
loader: 'img-loader'
}],
exclude: /node_modules/
}]
},
// Configure how modules are resolved
resolve: {
extensions: [".ts", ".js"]
},
// How and where webpack should output bundles, assets and anything else
output: {
path: path.resolve('./dist'),
filename: '[name].js'
},
// What bundle information gets displayed
stats: {
warnings: false
},
// Target a specific environment (cf. doc)
target: 'electron-main',
// Configure whether to polyfill or mock certain Node.js globals and modules
node: {
__dirname: false
},
// Customize the webpack build process with additionals plugins
plugins: [
new htmlWebpackPlugin(indexConfig)
]
=======
// How source maps are generated : style of source mapping
devtool: dev ? 'eval-cheap-module-source-map' : false,
// Development server configuration
devServer: {
// Execute custom middleware after all other middleware internally within the server
after() {
// Fix whitescreen bug on build with Electron BrowserWindow
exec('electron . --dev');
}
},
// Where webpack looks to start building the bundle
entry: {
'electron': './electron',
'app': './app/main.ts'
},
// How the different types of modules within a project will be treated
module: {
rules: [
{
// All files with a '.ts' extension will be handled by ts-loader
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/
},
{
// All files with a '.scss' extension will be handled by sass-loader
test: /\.scss$/,
exclude: /node_modules/,
use: [{
loader: 'file-loader',
options: {
name: '[name].[hash:10].css'
}
}, 'extract-loader', 'css-loader', 'resolve-url-loader', 'sass-loader'],
},
{
// All files with a '.html' extension will be injected as they are with raw-loader
test: /\.html$/,
exclude: /node_modules/,
loaders: ['raw-loader']
},
{
// All images and fonts will be optimized and their paths will be solved
enforce: 'pre',
test: /\.(png|jpe?g|gif|svg|woff2?|eot|ttf|otf|wav)(\?.*)?$/,
use: [
{
loader: 'url-loader',
options: {
name: '[name].[hash:10].[ext]',
limit: 8192
}
},
{
loader: 'img-loader'
}
],
exclude: /node_modules/
}
]
},
// Configure how modules are resolved
resolve: {
extensions: [".ts", ".js"]
},
// How and where webpack should output bundles, assets and anything else
output: {
path: path.resolve('./dist'),
filename: '[name].js'
},
// What bundle information gets displayed
stats: {
warnings: false
},
// Target a specific environment (cf. doc)
target: 'electron-main',
// Configure whether to polyfill or mock certain Node.js globals and modules
node: {
__dirname: false
},
// Customize the webpack build process with additionals plugins
plugins: [
new htmlWebpackPlugin(indexConfig)
]
>>>>>>>
// How source maps are generated : style of source mapping
devtool: dev ? 'eval-cheap-module-source-map' : false,
// Development server configuration
devServer: {
// Execute custom middleware after all other middleware internally within the server
after() {
// Fix whitescreen bug on build with Electron BrowserWindow
exec('electron . --dev');
}
},
// Where webpack looks to start building the bundle
entry: {
'electron': './electron',
'app': './app/main.ts'
},
// How the different types of modules within a project will be treated
module: {
rules: [{
// All files with a '.ts' extension will be handled by ts-loader
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/
}, {
// All files with a '.scss' extension will be handled by sass-loader
test: /\.scss$/,
exclude: /node_modules/,
use: [{
loader: 'file-loader',
options: {
name: '[name].[hash:10].css'
}
}, 'extract-loader', 'css-loader', 'resolve-url-loader', 'sass-loader'],
}, {
// All files with a '.html' extension will be injected as they are with raw-loader
test: /\.html$/,
exclude: /node_modules/,
loaders: ['raw-loader']
}, {
// All images and fonts will be optimized and their paths will be solved
enforce: 'pre',
test: /\.(png|jpe?g|gif|svg|woff2?|eot|ttf|otf|wav)(\?.*)?$/,
use: [{
loader: 'url-loader',
options: {
name: '[name].[hash:10].[ext]',
limit: 8192
}
}, {
loader: 'img-loader'
}],
exclude: /node_modules/
}]
},
// Configure how modules are resolved
resolve: {
extensions: [".ts", ".js"]
},
// How and where webpack should output bundles, assets and anything else
output: {
path: path.resolve('./dist'),
filename: '[name].js'
},
// What bundle information gets displayed
stats: {
warnings: false
},
// Target a specific environment (cf. doc)
target: 'electron-main',
// Configure whether to polyfill or mock certain Node.js globals and modules
node: {
__dirname: false
},
// Customize the webpack build process with additionals plugins
plugins: [
new htmlWebpackPlugin(indexConfig)
] |
<<<<<<<
import i18n from '@iobroker/adapter-react/i18n';
=======
import BaseSettings from './tabs/BaseSettings';
>>>>>>>
import BaseSettings from './tabs/BaseSettings';
import i18n from '@iobroker/adapter-react/i18n';
<<<<<<<
tab: null,
allStored: true
=======
baseSettingsOpened: null,
unsavedDataInDialog: false,
>>>>>>>
tab: null,
allStored: true,
baseSettingsOpened: null,
unsavedDataInDialog: false
<<<<<<<
if (this.state && this.state.currentTab && this.state.currentTab.tab) {
=======
if (this.state.baseSettingsOpened) {
return (<BaseSettings
key="intro"
onUnsaveChanged={ hasUnsavedData => this.setUnsavedData(hasUnsavedData) }
lang={ this.state.lang }
showAlert={ (message, type) => this.showAlert(message, type) }
socket={ this.socket }
t={ I18n.t }
/>);
}
if (this.state.currentTab) {
>>>>>>>
if (this.state.baseSettingsOpened) {
return (<BaseSettings
key="intro"
onUnsaveChanged={ hasUnsavedData => this.setUnsavedData(hasUnsavedData) }
lang={ this.state.lang }
showAlert={ (message, type) => this.showAlert(message, type) }
socket={ this.socket }
t={ I18n.t }
/>);
}
if (this.state && this.state.currentTab && this.state.currentTab.tab) {
<<<<<<<
=======
return (
<Intro
key="intro"
lang={ this.state.lang }
protocol={ this.state.protocol }
hostname={ this.state.hostname }
showAlert={ (message, type) => this.showAlert(message, type) }
socket={ this.socket }
systemConfig={ this.state.systemConfig }
t={ I18n.t }
/>
);
>>>>>>> |
<<<<<<<
var express = require('express');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var session = require('express-session');
var AdapterStore = require(__dirname + '/../../lib/session.js')(session);
var socketio = require('socket.io');
var passportSocketIo = require("passport.socketio");
var password = require(__dirname + '/../../lib/password.js');
var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
=======
var express = require('express');
var socketio = require('socket.io');
var crypto = require('crypto');
var password = require(__dirname + '/../../lib/password.js');
>>>>>>>
var express = require('express');
var socketio = require('socket.io');
var crypto = require('crypto');
var password = require(__dirname + '/../../lib/password.js');
<<<<<<<
=======
// Ein paar Attribute die jeder Adapter mitbringen muss
>>>>>>>
<<<<<<<
=======
install: function (callback) {
if (typeof callback === 'function') callback();
},
// Event-Handler fur Adapter-Installation
>>>>>>>
<<<<<<<
=======
// Wird aufgerufen wenn sich ein Objekt - das via adapter.subscribeObjects aboniert wurde - andert.
>>>>>>>
<<<<<<<
=======
// Wird aufgerufen wenn sich ein Status - der via adapter.subscribeStates aboniert wurde - andert.
>>>>>>>
<<<<<<<
=======
// Wird aufgerufen bevor der Adapter beendet wird - callback muss unbedingt aufgerufen werden!
>>>>>>>
<<<<<<<
=======
// Wird aufgerufen wenn der Adapter mit den Datenbanken verbunden ist und seine Konfiguration erhalten hat.
// Hier einsteigen!
>>>>>>>
<<<<<<<
// route middleware to make sure a user is logged in
function isLoggedIn(req, res, next) {
if (req.isAuthenticated() || req.originalUrl === '/login/') return next();
res.redirect('/login/');
}
=======
if ((adapter.config.listenPort && adapter.config.auth) ||
(adapter.config.listenPortSsl && adapter.config.authSsl)) {
// Check if "admin" user exists
adapter.getForeignObject('system.user.admin', function (err, obj) {
if (err) {
adapter.addUser("admin", "password");
}
});
}
>>>>>>>
// route middleware to make sure a user is logged in
function isLoggedIn(req, res, next) {
if (req.isAuthenticated() || req.originalUrl === '/login/') return next();
res.redirect('/login/');
}
<<<<<<<
app = express();
if (adapter.config.auth) {
passport.use(new LocalStrategy(
function (username, password, done) {
adapter.checkPassword(username, password, function (res) {
if (res) {
return done(null, username);
} else {
return done(null, false);
}
});
}
));
passport.serializeUser(function (user, done) {
done(null, user);
});
passport.deserializeUser(function (user, done) {
done(null, user);
});
app.use(cookieParser());
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
app.use(session({
secret: 'Zgfr56gFe87jJOM',
saveUninitialized: true,
resave: true,
store: new AdapterStore({adapter:adapter})
}));
app.use(passport.initialize());
app.use(passport.session());
app.post('/login',
passport.authenticate('local', { successRedirect: '/',
failureRedirect: '/login',
failureFlash: true })
);
app.get('/logout', function (req, res) {
req.logout();
res.redirect('/index/login.html');
});
app.use(isLoggedIn);
}
=======
app = express();
if (adapter.config.auth) {
// Authenticator
app.use(basicAuth(function(user, pass, callback) {
adapter.checkPassword(user, pass, function (res) {
adapter.log.debug('Authenticate "' + user + '": result - ' + res);
callback (!res, user);
});
}));
}
if (adapter.config.cache) {
app.use('/', express.static(__dirname + '/www', {maxAge: 30758400000}));
} else {
app.use('/', express.static(__dirname + '/www'));
}
app.get('/auth/*', authFile(false));
>>>>>>>
app = express();
if (adapter.config.auth) {
passport.use(new LocalStrategy(
function (username, password, done) {
adapter.checkPassword(username, password, function (res) {
if (res) {
return done(null, username);
} else {
return done(null, false);
}
});
}
));
passport.serializeUser(function (user, done) {
done(null, user);
});
passport.deserializeUser(function (user, done) {
done(null, user);
});
app.use(cookieParser());
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
app.use(session({
secret: 'Zgfr56gFe87jJOM',
saveUninitialized: true,
resave: true,
store: new AdapterStore({adapter:adapter})
}));
app.use(passport.initialize());
app.use(passport.session());
app.post('/login',
passport.authenticate('local', { successRedirect: '/',
failureRedirect: '/login',
failureFlash: true })
);
app.get('/logout', function (req, res) {
req.logout();
res.redirect('/index/login.html');
});
app.use(isLoggedIn);
}
<<<<<<<
if (adapter.config.auth && adapter.config.authUser) {
appSsl.use(express.basicAuth(adapter.config.authUser, adapter.config.authPassword));
}
=======
if (adapter.config.authSsl) {
// Authenticator
appSsl.use(basicAuth(function(user, pass, callback) {
adapter.checkPassword(user, pass, function (res) {
adapter.log.debug('Authenticate SSL "' + user + '": result - ' + res);
callback (!res, user);
});
}));
}
if (adapter.config.cache) {
appSsl.use('/', express.static(__dirname + '/www', {maxAge: 30758400000}));
} else {
appSsl.use('/', express.static(__dirname + '/www'));
}
appSsl.get('/auth/*', authFile(true));
>>>>>>>
if (adapter.config.cache) {
appSsl.use('/', express.static(__dirname + '/www', {maxAge: 30758400000}));
} else {
appSsl.use('/', express.static(__dirname + '/www'));
}
appSsl.get('/auth/*', authFile(true));
<<<<<<<
function onAuthorizeSuccess(data, accept){
adapter.log.info('successful connection to socket.io');
adapter.log.info(JSON.stringify(data));
accept();
}
function onAuthorizeFail(data, message, error, accept){
if (error) adapter.log.error('failed connection to socket.io:', message);
accept(null, false);
if (error) accept(new Error(message));
// this error will be sent to the user as a special error-package
// see: http://socket.io/docs/client-api/#socket > error-object
}
=======
function authSocket(socket, next) {
var handshakeData = socket.handshake;
if (socket.authorized) {
next();
} else
// do not check if localhost
if(handshakeData.address.address.toString() == "127.0.0.1") {
socket.authorized = true;
adapter.log.debug("local authentication 127.0.0.1");
next();
} else {
var error = false;
if (handshakeData.query["key"] === undefined) {
error = true;
adapter.log.warn("authentication failed. No key found.");
} else {
var text = handshakeData.query["key"];
var random = text.substring(0, 32);
text = text.substring(32);
var pos = text.indexOf('|');
if (pos != -1) {
var user = text.substring(0, pos);
text = text.substring(pos + 1);
adapter.getForeignObject('system.user.' + user, function (err, obj) {
var _error = false;
if (err || !obj || !obj.common || !obj.common.password) {
_error = true;
} else {
var authHash = crypto.createHash('md5').update(handshakeData.address.address.toString() + random + user + obj.common.password).digest("hex");
if (authHash != text) {
_error = true;
}
}
if (_error) {
adapter.log.warn("authetication error on " + handshakeData.address.address);
next(new Error("Invalid session key"));
} else{
adapter.log.debug("authetication successful on " + handshakeData.address.address);
socket.authorized = true;
next();
}
});
} else {
error = true;
}
}
if (error) {
adapter.log.warn("authetication error on " + handshakeData.address.address);
next(new Error("not authorized"));
}
}
}
>>>>>>>
function onAuthorizeSuccess(data, accept){
adapter.log.info('successful connection to socket.io');
adapter.log.info(JSON.stringify(data));
accept();
}
function onAuthorizeFail(data, message, error, accept){
if (error) adapter.log.error('failed connection to socket.io:', message);
accept(null, false);
if (error) accept(new Error(message));
// this error will be sent to the user as a special error-package
// see: http://socket.io/docs/client-api/#socket > error-object
} |
<<<<<<<
// Ein paar Attribute die jeder Adapter mitbringen muss
=======
>>>>>>>
// Ein paar Attribute die jeder Adapter mitbringen muss
<<<<<<<
// Event-Handler für Adapter-Installation
install: function (callback) {
if (typeof callback === 'function') callback();
},
// Wird aufgerufen wenn sich ein Objekt - das via adapter.subscribeObjects aboniert wurde - ändert.
=======
install: function (callback) {
if (typeof callback === 'function') callback();
},
>>>>>>>
install: function (callback) {
if (typeof callback === 'function') callback();
},
// Event-Handler fur Adapter-Installation
install: function (callback) {
if (typeof callback === 'function') callback();
},
// Wird aufgerufen wenn sich ein Objekt - das via adapter.subscribeObjects aboniert wurde - andert.
<<<<<<<
// Wird aufgerufen wenn sich ein Status - der via adapter.subscribeStates aboniert wurde - ändert.
=======
>>>>>>>
// Wird aufgerufen wenn sich ein Status - der via adapter.subscribeStates aboniert wurde - andert.
<<<<<<<
// Wird aufgerufen bevor der Adapter beendet wird - callback muss unbedingt aufgerufen werden!
=======
>>>>>>>
// Wird aufgerufen bevor der Adapter beendet wird - callback muss unbedingt aufgerufen werden!
<<<<<<<
// Wird aufgerufen wenn der Adapter mit den Datenbanken verbunden ist und seine Konfiguration erhalten hat.
// Hier einsteigen!
=======
>>>>>>>
// Wird aufgerufen wenn der Adapter mit den Datenbanken verbunden ist und seine Konfiguration erhalten hat.
// Hier einsteigen!
<<<<<<<
if (adapter.config.cache) {
app.use('/', express.static(__dirname + '/www', {maxAge: 30758400000}));
} else {
app.use('/', express.static(__dirname + '/www'));
}
=======
>>>>>>>
if (adapter.config.cache) {
app.use('/', express.static(__dirname + '/www', {maxAge: 30758400000}));
} else {
app.use('/', express.static(__dirname + '/www'));
} |
<<<<<<<
/*
var textRooms;
if (data.columns.indexOf ('room') !== -1) {
textRooms = '<select id="filter_room_' + data.instance + '" class="filter_' + data.instance + '" style="padding: 0; width: 150px"><option value="">' + data.texts.all + '</option>';
for (var i = 0; i < data.roomEnums.length; i++) {
textRooms += '<option value="' + data.objects[data.roomEnums[i]].common.name + '">' + data.objects[data.roomEnums[i]].common.name + '</option>';
}
textRooms += '</select>';
} else {
if (data.rooms) delete data.rooms;
if (data.roomsColored) delete data.roomsColored;
}
var textFuncs;
if (data.columns.indexOf ('function') !== -1) {
textFuncs = '<select id="filter_function_' + data.instance + '" class="filter_' + data.instance + '" style="padding: 0; width: 150px"><option value="">' + data.texts.all + '</option>';
for (var i = 0; i < data.funcEnums.length; i++) {
textFuncs += '<option value="' + data.objects[data.funcEnums[i]].common.name + '">' + data.objects[data.funcEnums[i]].common.name + '</option>';
}
textFuncs += '</select>';
} else {
if (data.funcs) delete data.funcs;
if (data.funcsColored) delete data.funcsColored;
}
var textRoles;
if (data.columns.indexOf ('role') !== -1) {
textRoles = '<select id="filter_role_' + data.instance + '" class="filter_' + data.instance + '" style="padding:0;width:150px"><option value="">' + data.texts.all + '</option>';
for (var j = 0; j < data.roles.length; j++) {
textRoles += '<option value="' + data.roles[j] + '">' + data.roles[j] + '</option>';
}
textRoles += '</select>';
}
var textTypes;
if (data.columns.indexOf ('type') !== -1) {
textTypes = '<select id="filter_type_' + data.instance + '" class="filter_' + data.instance + '" style="padding:0;width:150px"><option value="">' + data.texts.all + '</option>';
for (var k = 0; k < data.types.length; k++) {
textTypes += '<option value="' + data.types[k] + '">' + data.types[k] + '</option>';
}
textTypes += '</select>';
}
*/
var tds =
'<td><button class="ui-button-icon-only panel-button" id="btn_refresh_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_list_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_collapse_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_expand_' + data.instance + '"></button></td>' +
=======
// toolbar buttons
var tds =
'<td><button class="ui-button-icon-only panel-button" id="btn_refresh_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_list_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_collapse_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_expand_' + data.instance + '"></button></td>' +
>>>>>>>
// toolbar buttons
var tds =
'<td><button class="ui-button-icon-only panel-button" id="btn_refresh_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_list_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_collapse_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_expand_' + data.instance + '"></button></td>' +
<<<<<<<
tds +=
'<td style="padding-left: 10px"><button class="panel-button" id="btn_select_all_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_unselect_all_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_invert_selection_' + data.instance + '"></button></td>';
=======
tds +=
'<td style="padding-left: 10px"><button class="panel-button" id="btn_select_all_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_unselect_all_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_invert_selection_' + data.instance + '"></button></td>';
>>>>>>>
tds +=
'<td style="padding-left: 10px"><button class="panel-button" id="btn_select_all_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_unselect_all_' + data.instance + '"></button></td>' +
'<td><button class="panel-button" id="btn_invert_selection_' + data.instance + '"></button></td>';
<<<<<<<
tds +=
'<td style="padding-left: 10px"><button class="panel-button" id="btn_expert_' + data.instance + '"></button></td>';
=======
tds +=
'<td style="padding-left: 10px"><button class="panel-button" id="btn_expert_' + data.instance + '"></button></td>';
>>>>>>>
tds +=
'<td style="padding-left: 10px"><button class="panel-button" id="btn_expert_' + data.instance + '"></button></td>';
<<<<<<<
' <tr>' + tds + '<td style="width: 100%;"></td>' +
' </tr>' +
=======
' <tr>' + tds + '<td style="width: 100%;"></td></tr>' +
' </tr>' +
>>>>>>>
' <tr>' + tds + '<td style="width: 100%;"></td>' +
' </tr>' +
<<<<<<<
'<table id="selectID_header_' + data.instance + '" class="main-header-table">';
=======
'<table id="selectID_header_' + data.instance + '" class="main-header-table">'
;
//--
>>>>>>>
'<table id="selectID_header_' + data.instance + '" class="main-header-table">'
;
<<<<<<<
if (placeholder === undefined) {
placeholder = data.texts[filterNo.toLowerCase()];
}
var txt =
=======
if (placeholder === undefined) placeholder = data.texts[filterNo.toLowerCase()];
return '' +
>>>>>>>
if (placeholder === undefined) {
placeholder = data.texts[filterNo.toLowerCase()];
}
var txt =
<<<<<<<
//' <input placeholder="' + placeholder + '" style="width: 100%; padding: 0; padding-left: ' + lineIndent + ';font-size: 12px;border: 0;line-height: 1.5em;" type="text" id="filter_' + filterNo + '_' + data.instance + '" class="filter_' + data.instance + '">' +
' <input placeholder="' + placeholder + '" id="filter_' + filterNo + '_' + data.instance + '" class="filter_' + data.instance + '">' +
' </td>' +
=======
//' <input placeholder="' + placeholder + '" style="width: 100%; padding: 0; padding-left: ' + lineIndent + ';font-size: 12px;border: 0;line-height: 1.5em;" type="text" id="filter_' + filterNo + '_' + data.instance + '" class="filter_' + data.instance + '">' +
' <input placeholder="' + placeholder + '" type="text" id="filter_' + filterNo + '_' + data.instance + '" class="filter_' + data.instance + '">' +
' </td>' +
>>>>>>>
//' <input placeholder="' + placeholder + '" style="width: 100%; padding: 0; padding-left: ' + lineIndent + ';font-size: 12px;border: 0;line-height: 1.5em;" type="text" id="filter_' + filterNo + '_' + data.instance + '" class="filter_' + data.instance + '">' +
' <input placeholder="' + placeholder + '" id="filter_' + filterNo + '_' + data.instance + '" class="filter_' + data.instance + '">' +
' </td>' +
<<<<<<<
var cbEntries = getComboBoxEnums (filterNo);
=======
var cbEntries = getComboboxEnums (filterNo);
>>>>>>>
var cbEntries = getComboBoxEnums(filterNo);
<<<<<<<
if (typeof addAll2FilterCombobox !== 'undefined' && addAll2FilterCombobox) {
add('', placeholder + ' (' + data.texts.all + ')');
} else {
add('', placeholder);
}
=======
if (addAll2FilterCombobox) add ("", placeholder + ' (' + data.texts.all + ')');
else add ("", placeholder);
>>>>>>>
if (typeof addAll2FilterCombobox !== 'undefined' && addAll2FilterCombobox) {
add('', placeholder + ' (' + data.texts.all + ')');
} else {
add('', placeholder);
}
<<<<<<<
//'<table style="width: 100%;padding: 0;border: 1px solid #c0c0c0;border-spacing: 0;border-radius: 2px;">' +
'<table class="main-header-input-table">' +
=======
//'<table class="main-header-input-table" style="width: 100%;">' + // width is already in css
'<table class="main-header-input-table">' + // width is already in css
>>>>>>>
//'<table style="width: 100%;padding: 0;border: 1px solid #c0c0c0;border-spacing: 0;border-radius: 2px;">' +
'<table class="main-header-input-table">' +
<<<<<<<
=======
text += '<table class="main-header-input-table"><tbody><tr><td style="padding-left: ' + lineIndent + '">' + _(name) + '</td></tr></tbody></table>';
>>>>>>>
<<<<<<<
//var widths = {ID: data.firstMinWidth ? data.firstMinWidth : '20%', name: '20%', type: '10%', role: '10%', room: '10%', 'function': '10%', value: '10%', button: '5%', enum: '2%'};
var widths = {ID: data.firstMinWidth ? data.firstMinWidth : '20%', name: '20%', type: '6%', role: '10%', room: '10%', 'function': '10%', value: '10%', button: '9%', enum: '2%'};
forEachColumn(data, function(name, i) {
=======
//var widths = {ID: data.firstMinWidth ? data.firstMinWidth : '20%', name: '20%', type: '10%', role: '10%', room: '10%', 'function': '10%', value: '10%', button: '5%', enum: '2%'};
var widths = {ID: data.firstMinWidth ? data.firstMinWidth : '20%', name: '20%', type: '6%', role: '10%', room: '10%', 'function': '10%', value: '10%', button: '9%', enum: '2%'};
forEachColumn (data, function(name, i) {
>>>>>>>
var widths = {ID: data.firstMinWidth ? data.firstMinWidth : '20%', name: '20%', type: '6%', role: '10%', room: '10%', 'function': '10%', value: '10%', button: '9%', enum: '2%'};
forEachColumn(data, function(name, i) {
<<<<<<<
var $e = $('#process_running_' + data.instance);
=======
var $e = $ ('#process_running_' + data.instance);
>>>>>>>
var $e = $('#process_running_' + data.instance); |
<<<<<<<
//= require advanced_search
=======
//= require registration_form
>>>>>>>
//= require advanced_search
//= require registration_form
<<<<<<<
App.AdvancedSearch.initialize();
=======
App.RegistrationForm.initialize();
>>>>>>>
App.AdvancedSearch.initialize();
App.RegistrationForm.initialize(); |
<<<<<<<
//= require polls_admin
=======
//= require leaflet
//= require map
>>>>>>>
//= require polls_admin
//= require leaflet
//= require map
<<<<<<<
App.PollsAdmin.initialize();
=======
App.Map.initialize();
>>>>>>>
App.PollsAdmin.initialize();
App.Map.initialize(); |
<<<<<<<
const obj1Type = checkType(obj1);
const obj2Type = checkType(obj2);
if (obj1Type !== obj2Type ) {
return false
} else if (obj1Type === 'array' && obj1.length === obj2.length) {
return obj1.every((value, key) => (
deepCompare(value, obj2[key])
))
} else if (obj1Type === 'object') {
for (let key in obj1) {
if (!Object.keys(obj2).includes(key)) return false;
return deepCompare(obj1[key], obj2[key])
}
return false
=======
if (obj1 && obj2 && obj1.length !== obj2.length) {
return true
} else if (isArray(obj1) && isArray(obj2)) {
return obj1.some((value, key) => (
deepCompare(value, obj2[key])
))
} else if (isObject(obj1) && isObject(obj2)) {
for (let key in obj1) {
if (deepCompare(obj1[key], obj2[key])) {
return true
}
>>>>>>>
const obj1Type = checkType(obj1);
const obj2Type = checkType(obj2);
if (obj1Type !== obj2Type ) return false;
if (obj1Type === 'array' && obj1.length === obj2.length) {
return obj1.every((value, key) => (
deepCompare(value, obj2[key])
))
}
if (obj1Type === 'object') {
for (let key in obj1) {
if (!Object.keys(obj2).includes(key)) return false;
return deepCompare(obj1[key], obj2[key])
}
return false |
<<<<<<<
import Switch from './switch';
=======
import Form from './form';
import TimePicker from './time-picker';
>>>>>>>
import Switch from './switch';
import Form from './form';
import TimePicker from './time-picker';
<<<<<<<
'switch': { title: 'Switch 开关', component: Switch },
=======
'form': { title: 'Form 表单', component: Form },
>>>>>>>
'switch': { title: 'Switch 开关', component: Switch },
'form': { title: 'Form 表单', component: Form }, |
<<<<<<<
export { TimeSelect, TimePicker, TimeRangePicker, DatePicker, DateRangePicker } from './date-picker';
export { default as Carousel } from './carousel';
=======
export { TimeSelect, TimePicker, TimeRangePicker, DatePicker, DateRangePicker } from './date-picker';
export { default as Collapse } from './collapse';
>>>>>>>
export { TimeSelect, TimePicker, TimeRangePicker, DatePicker, DateRangePicker } from './date-picker';
export { default as Carousel } from './carousel';
export { default as Collapse } from './collapse'; |
<<<<<<<
22-10-2017 - Added trueshot statistic with average aimed pr trueshot, and average starting focus pr trueshot. (by Putro)
=======
22-10-2017 - Added a graph for applications of vulnerable. (by Putro)
>>>>>>>
22-10-2017 - Added trueshot statistic with average aimed pr trueshot, and average starting focus pr trueshot. (by Putro)
22-10-2017 - Added a graph for applications of vulnerable. (by Putro) |
<<<<<<<
var parser;
// TODO - pass the real environment
beforeEach(function () {
parser = new Parser({
classes: {
'Contract': {
interface: [{'constant': false, 'inputs': [{'name': 'x', 'type': 'uint256'}], 'name': 'set', 'outputs': [], 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'get', 'outputs': [{'name': 'retVal', 'type': 'uint256'}], 'type': 'function'}],
bytecode: '606060405260978060106000396000f360606040526000357c01000000000000000000000000000000000000000000000000000000009004806360fe47b11460415780636d4ce63c14605757603f565b005b605560048080359060200190919050506078565b005b606260048050506086565b6040518082815260200191505060405180910390f35b806000600050819055505b50565b600060006000505490506094565b9056'
}
},
environment: 'test',
environments: {
'test': {
'objects': {
'fizzbuzz': 'buzz buzz'
}
}
},
web3: 'internal',
// web3: {host: '192.168.59.103', port:'8545'},
silent: true,
confirmationBlocks: 0
});
});
// afterEach( function() {
// console.log(parser.interpreter.logs.join('\n') )
// })
it('should recognize an string assignment', function (done) {
parser.parse('var foo = "bar"', function (err, res) {
if (err) throw err;
assert(parser.interpreter.success);
assert(parser.interpreter.local.foo.value === 'bar');
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should recognize an number assignment', function (done) {
parser.parse('var foo = 42', function (err, res) {
if (err) throw err;
assert(parser.interpreter.success);
assert(parser.interpreter.local.foo.value === 42);
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it.skip('should fail if key is already taken', function (done) {
parser.parse('var foo = 42', function (err, res) {
if (err) throw err;
assert.ok(parser.interpreter.success);
assert(parser.interpreter.local.foo.value === 42);
parser.parse('var foo = 42\nvar foo = 17', function (err, res) {
if (err) throw err;
assert.notOk(parser.interpreter.success);
assert(parser.interpreter.local.foo.value === 42);
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
});
it('allows importing object values from the dappfile', function (done) {
parser.parse('import fizzbuzz\nlog fizzbuzz', function (err, res) {
if (err) throw err;
assert.ok(parser.interpreter.success);
assert.include(parser.interpreter.logs, 'buzz buzz\n');
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should export local variables to global scope', function (done) {
parser.parse('var foo = 17\nexport foo', function (err, res) {
if (err) throw err;
assert.ok(parser.interpreter.success);
assert(parser.interpreter.global.foo.value === 17);
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should fail export local variables to global scope if its taken', function (done) {
parser.parse('var foo = 17\nexport foo\nvar foo = 42\nexport foo', function (err, res) {
if (err) throw err;
assert.notOk(parser.interpreter.success);
assert(parser.interpreter.global.foo.value === 17);
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should deploy a class', function (done) {
parser.parse('var foo = new Contract()', function (err, res) {
if (err) throw err;
assert.ok(parser.interpreter.success);
assert(parser.interpreter.local.foo.value.length === 42);
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should pass an object as a deploy argument', function (done) {
parser.parse('var foo = new Contract()\n var bar = new Contract(foo)', function (err, res) {
// TODO: test if foo got passed as an correct address
if (err) throw err;
assert.ok(parser.interpreter.success);
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should fail deployment if a class is not known', function (done) {
parser.parse('var foo = new NoContract()', function (err, res) {
if (err) throw err;
assert.notOk(parser.interpreter.success);
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it.skip('should deploy contract with the right value', function (done) {
parser.parse('var foo = new NoContract.value(24)()', function (err, res) {
if (err) throw err;
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should deploy contract with the right gas');
it('should call an address', function (done) {
parser.parse('var foo = new Contract()\n foo.set(2) \n foo.get()', function (err, res) {
if (err) throw err;
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should fail calling a wrong address', function (done) {
parser.parse('var foo = new NoContract()\n foo.functionCall()', function (err, res) {
if (err) throw err;
assert.notOk(parser.interpreter.success);
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should allow logging via "log"', function (done) {
parser.parse('log "Logging test!"', function (err, res) {
if (err) throw err;
assert.ok(parser.interpreter.success);
assert.include(parser.interpreter.logs, 'Logging test!\n');
parser.interpreter.web3Interface._web3.currentProvider.stop(done);
});
});
it('should send value to an address');
it('should call an address with raw args');
it('should switch between keys');
it('should assert things');
=======
>>>>>>> |
<<<<<<<
date: new Date('2018-06-24'),
changes: 'Added tracking of potion cooldowns and split Healthstone into Healthstone and health pots.',
contributors: [Gebuz],
},
{
=======
date: new Date('2018-07-26'),
changes: <React.Fragment>Updated our GlobalCooldown module to automatically ignore certain casts if we've marked them as not being actual casts. BM Hunter casting two spells (one for buff, one for damage) per <SpellLink id={SPELLS.BARBED_SHOT.id} /> is an example.</React.Fragment>,
contributors: [Putro],
},
{
>>>>>>>
date: new Date('2018-06-24'),
changes: 'Added tracking of potion cooldowns and split Healthstone into Healthstone and health pots.',
contributors: [Gebuz],
},
{
date: new Date('2018-07-26'),
changes: <React.Fragment>Updated our GlobalCooldown module to automatically ignore certain casts if we've marked them as not being actual casts. BM Hunter casting two spells (one for buff, one for damage) per <SpellLink id={SPELLS.BARBED_SHOT.id} /> is an example.</React.Fragment>,
contributors: [Putro],
},
{ |
<<<<<<<
{
from: "/refguide8/inheritance-split",
to: "/refguide/object-type-decision"
},
{
from: "/refguide8/exclusive-split",
to: "/refguide/decision"
},
=======
{
from: "/howto/deploying-a-mendix-app-to-cloud-foundry",
to: "/developerportal/deploy/cloud-foundry-deploy"
},
>>>>>>>
{
from: "/refguide8/inheritance-split",
to: "/refguide/object-type-decision"
},
{
from: "/refguide8/exclusive-split",
to: "/refguide/decision"
{
from: "/howto/deploying-a-mendix-app-to-cloud-foundry",
to: "/developerportal/deploy/cloud-foundry-deploy"
}, |
<<<<<<<
/**
* angular-localforage - Angular service & directive for https://github.com/mozilla/localForage (Offline storage, improved.)
* @version v1.1.0
* @link https://github.com/ocombe/angular-localForage
* @license MIT
* @author Olivier Combe <[email protected]>
*/
(function(root, factory) {
'use strict';
if(typeof define === 'function' && define.amd) { // AMD
define(['localforage'], function(localforage) {
factory(root.angular, localforage);
});
} else if(typeof exports === 'object') {
var angular = root.angular || (window && window.angular);
module.exports = factory(angular, require('localforage')); // Node/Browserify
} else {
factory(root.angular, root.localforage); // Browser
}
})(this, function(angular, localforage, undefined) {
=======
(function(window, angular, localforage, undefined) {
>>>>>>>
/**
* angular-localforage - Angular service & directive for https://github.com/mozilla/localForage (Offline storage, improved.)
* @version v1.1.0
* @link https://github.com/ocombe/angular-localForage
* @license MIT
* @author Olivier Combe <[email protected]>
*/
(function(root, factory) {
'use strict';
if(typeof define === 'function' && define.amd) { // AMD
define(['localforage'], function(localforage) {
factory(root.angular, localforage);
});
} else if(typeof exports === 'object') {
var angular = root.angular || (window && window.angular);
module.exports = factory(angular, require('localforage')); // Node/Browserify
} else {
factory(root.angular, root.localforage); // Browser
}
})(this, function(angular, localforage, undefined) {
<<<<<<<
// Get all the values for which the filter function returns true
// filter should be a function that takes two parameters key, value and returns a boolean
// return a list of item
LocalForageInstance.prototype.search = function search(filter) {
// throw error on undefined key
if(angular.isUndefined(filter)) {
throw new Error("You must define a filter");
}
if(!angular.isFunction(filter)) {
throw new Error("filter must be a function");
}
var deferred = $q.defer(),
args = arguments,
self = this;
self._localforage.keys().then(function success(keyList) {
var promises = [],
datas = [],
ret = [];
angular.forEach(keyList, function(key){
var d = $q.defer()
self._localforage.getItem(self.prefix() + key)
.then(function success(item) {
datas.push({'key': key, 'value': item});
d.resolve();
},function failure(err){
self.onError(data, args, self.search, deferred);
});
promises.push(d.promise);
});
$q.all(promises).then(function(){
angular.forEach(datas, function(data){
var key = data['key'],
value = data['value'];
if(filter(key, value))
ret.push(value);
});
deferred.resolve(ret);
},function(err){
self.onError(data, args, self.search, deferred);
});
}, function error(data) {
self.onError(data, args, self.search, deferred);
deferred.reject(data)
});
return deferred.promise;
};
// Remove an item from storage
=======
// Directly get a value from storage
LocalForageInstance.prototype.iterate = function iterate(callback) {
// throw error on undefined key
if(angular.isUndefined(callback)) {
throw new Error("You must define a callback to iterate");
}
var deferred = $q.defer(),
args = arguments,
self = this;
self._localforage.iterate(callback).then(function success(item) {
deferred.resolve(item);
}, function error(data) {
self.onError(data, args, self.iterate, deferred);
});
return deferred.promise;
};
// Remove an item from storage
>>>>>>>
// Get all the values for which the filter function returns true
// filter should be a function that takes two parameters key, value and returns a boolean
// return a list of item
LocalForageInstance.prototype.search = function search(filter) {
// throw error on undefined key
if(angular.isUndefined(filter)) {
throw new Error("You must define a filter");
}
if(!angular.isFunction(filter)) {
throw new Error("filter must be a function");
}
var deferred = $q.defer(),
args = arguments,
self = this;
self._localforage.keys().then(function success(keyList) {
var promises = [],
datas = [],
ret = [];
angular.forEach(keyList, function(key){
var d = $q.defer()
self._localforage.getItem(self.prefix() + key)
.then(function success(item) {
datas.push({'key': key, 'value': item});
d.resolve();
},function failure(err){
self.onError(data, args, self.search, deferred);
});
promises.push(d.promise);
});
$q.all(promises).then(function(){
angular.forEach(datas, function(data){
var key = data['key'],
value = data['value'];
if(filter(key, value))
ret.push(value);
});
deferred.resolve(ret);
},function(err){
self.onError(data, args, self.search, deferred);
});
}, function error(data) {
self.onError(data, args, self.search, deferred);
deferred.reject(data)
});
return deferred.promise;
};
// Directly get a value from storage
LocalForageInstance.prototype.iterate = function iterate(callback) {
// throw error on undefined key
if(angular.isUndefined(callback)) {
throw new Error("You must define a callback to iterate");
}
var deferred = $q.defer(),
args = arguments,
self = this;
self._localforage.iterate(callback).then(function success(item) {
deferred.resolve(item);
}, function error(data) {
self.onError(data, args, self.iterate, deferred);
});
return deferred.promise;
};
// Remove an item from storage |
<<<<<<<
export function dispatchRemotely(store, payload) {
=======
function dispatchRemotely(emitTool, store, payload) {
>>>>>>>
function dispatchRemotely(emitTool, store, payload) {
<<<<<<<
=======
emitTool.init(initValue, getMethods(store));
>>>>>>>
<<<<<<<
dispatchRemotely(store, message.payload);
=======
dispatchRemotely(emitTool, store, message.payload);
>>>>>>>
dispatchRemotely(emitTool, store, message.payload); |
<<<<<<<
this.getData();
this.setState({ currentIndex: index });
const message = this.state.history[index];
message.type = 'DISPATCH';
message.dispatch = action;
handleMessages(message, { [message.instanceId]: true }, true);
=======
if(this.state.history[index]){
const message = parse(this.state.history[index]);
message.type = 'DISPATCH';
message.dispatch = action;
handleMessages(message, { [message.instanceId]: true }, 1);
}
>>>>>>>
this.getData();
this.setState({ currentIndex: index });
if(this.state.history[index]){
const message = parse(this.state.history[index]);
message.type = 'DISPATCH';
message.dispatch = action;
handleMessages(message, { [message.instanceId]: true }, 1);
} |
<<<<<<<
shrink: function(index) {
index = index || 0;
var image = this.viewer.world.getItemAt(index);
image.setWidth(image.getBounds().width * 0.3);
},
// ----------
move: function(index) {
index = index || 0;
var image = this.viewer.world.getItemAt(index);
var point = image.getBounds().getTopLeft();
point.x += image.getBounds().width * 0.3;
image.setPosition(point);
},
// ----------
add: function() {
var self = this;
this.viewer.addTiledImage({
tileSource: "../../data/testpattern.dzi",
width: 1,
success: function() {
self.viewer.viewport.goHome();
}
});
},
// ----------
=======
toggle: function() {
var $el = $(this.viewer.element);
$el.toggleClass('small');
},
// ----------
>>>>>>>
shrink: function(index) {
index = index || 0;
var image = this.viewer.world.getItemAt(index);
image.setWidth(image.getBounds().width * 0.3);
},
// ----------
move: function(index) {
index = index || 0;
var image = this.viewer.world.getItemAt(index);
var point = image.getBounds().getTopLeft();
point.x += image.getBounds().width * 0.3;
image.setPosition(point);
},
// ----------
add: function() {
var self = this;
this.viewer.addTiledImage({
tileSource: "../../data/testpattern.dzi",
width: 1,
success: function() {
self.viewer.viewport.goHome();
}
});
},
// ----------
toggle: function() {
var $el = $(this.viewer.element);
$el.toggleClass('small');
},
// ---------- |
<<<<<<<
import ExplosivePotential from './modules/azerite/ExplosivePotential';
=======
import UmbralBlaze from './modules/azerite/UmbralBlaze';
>>>>>>>
import ExplosivePotential from './modules/azerite/ExplosivePotential';
import UmbralBlaze from './modules/azerite/UmbralBlaze';
<<<<<<<
explosivePotential: ExplosivePotential,
=======
umbralBlaze: UmbralBlaze,
>>>>>>>
explosivePotential: ExplosivePotential,
umbralBlaze: UmbralBlaze,
<<<<<<<
=======
>>>>>>> |
<<<<<<<
/**
* Set the opacity of the drawer.
* @method
* @param {Number} opacity
* @return {OpenSeadragon.Drawer} Chainable.
*/
setOpacity: function( opacity ) {
this.opacity = opacity;
$.setElementOpacity( this.canvas, this.opacity, true );
return this;
},
/**
* Get the opacity of the drawer.
* @method
* @returns {Number}
*/
getOpacity: function() {
return this.opacity;
},
=======
>>>>>>>
/**
* Set the opacity of the drawer.
* @method
* @param {Number} opacity
* @return {OpenSeadragon.Drawer} Chainable.
*/
setOpacity: function( opacity ) {
this.opacity = opacity;
$.setElementOpacity( this.canvas, this.opacity, true );
return this;
},
/**
* Get the opacity of the drawer.
* @method
* @returns {Number}
*/
getOpacity: function() {
return this.opacity;
}, |
<<<<<<<
overlays: [].concat( _this.overlays ).concat( _this.source.overlays ),
opacity: _this.opacity,
=======
>>>>>>>
opacity: _this.opacity,
<<<<<<<
updateDrawers( viewer );
=======
viewer.drawer.update();
drawOverlays( viewer.viewport, viewer.currentOverlays, viewer.canvas );
>>>>>>>
updateDrawers( viewer );
drawOverlays( viewer.viewport, viewer.currentOverlays, viewer.canvas );
<<<<<<<
} else if ( THIS[ viewer.hash ].forceRedraw || drawersNeedUpdate( viewer ) ) {
updateDrawers( viewer );
=======
} else if ( THIS[ viewer.hash ].forceRedraw || viewer.drawer.needsUpdate() ) {
viewer.drawer.update();
drawOverlays( viewer.viewport, viewer.currentOverlays, viewer.canvas );
>>>>>>>
} else if ( THIS[ viewer.hash ].forceRedraw || drawersNeedUpdate( viewer ) ) {
updateDrawers( viewer );
drawOverlays( viewer.viewport, viewer.currentOverlays, viewer.canvas ); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.