conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
selected: function( event, ui ) {
var item = ui.item.data( "item.autocomplete" ),
previous = self.previous;
=======
select: function( event, ui ) {
var item = ui.item.data( "item.autocomplete" );
if ( false !== self._trigger( "select", event, { item: item } ) ) {
self.element.val( item.value );
}
self.close( event );
>>>>>>>
select: function( event, ui ) {
var item = ui.item.data( "item.autocomplete" ),
previous = self.previous;
<<<<<<<
}( jQuery ));
/*
* jQuery UI Menu (not officially released)
*
* This widget isn't yet finished and the API is subject to change. We plan to finish
* it for the next release. You're welcome to give it a try anyway and give us feedback,
* as long as you're okay with migrating your code later on. We can help with that, too.
*
* Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* http://docs.jquery.com/UI/Menu
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
*/
(function($) {
$.widget("ui.menu", {
_create: function() {
var self = this;
this.element
.addClass("ui-menu ui-widget ui-widget-content ui-corner-all")
.attr({
role: "listbox",
"aria-activedescendant": "ui-active-menuitem"
})
.click(function( event ) {
if ( !$( event.target ).closest( ".ui-menu-item a" ).length ) {
return;
}
// temporary
event.preventDefault();
self.select( event );
});
this.refresh();
},
refresh: function() {
var self = this;
// don't refresh list items that are already adapted
var items = this.element.children("li:not(.ui-menu-item):has(a)")
.addClass("ui-menu-item")
.attr("role", "menuitem");
items.children("a")
.addClass("ui-corner-all")
.attr("tabindex", -1)
// mouseenter doesn't work with event delegation
.mouseenter(function( event ) {
self.activate( event, $(this).parent() );
})
.mouseleave(function() {
self.deactivate();
});
},
activate: function( event, item ) {
this.deactivate();
if (this.hasScroll()) {
var offset = item.offset().top - this.element.offset().top,
scroll = this.element.attr("scrollTop"),
elementHeight = this.element.height();
if (offset < 0) {
this.element.attr("scrollTop", scroll + offset);
} else if (offset >= elementHeight) {
this.element.attr("scrollTop", scroll + offset - elementHeight + item.height());
}
}
this.active = item.eq(0)
.children("a")
.addClass("ui-state-hover")
.attr("id", "ui-active-menuitem")
.end();
this._trigger("focus", event, { item: item });
},
deactivate: function() {
if (!this.active) { return; }
this.active.children("a")
.removeClass("ui-state-hover")
.removeAttr("id");
this._trigger("blur");
this.active = null;
},
next: function(event) {
this.move("next", ".ui-menu-item:first", event);
},
previous: function(event) {
this.move("prev", ".ui-menu-item:last", event);
},
first: function() {
return this.active && !this.active.prevAll(".ui-menu-item").length;
},
last: function() {
return this.active && !this.active.nextAll(".ui-menu-item").length;
},
move: function(direction, edge, event) {
if (!this.active) {
this.activate(event, this.element.children(edge));
return;
}
var next = this.active[direction + "All"](".ui-menu-item").eq(0);
if (next.length) {
this.activate(event, next);
} else {
this.activate(event, this.element.children(edge));
}
},
// TODO merge with previousPage
nextPage: function(event) {
if (this.hasScroll()) {
// TODO merge with no-scroll-else
if (!this.active || this.last()) {
this.activate(event, this.element.children(".ui-menu-item:first"));
return;
}
var base = this.active.offset().top,
height = this.element.height(),
result = this.element.children(".ui-menu-item").filter(function() {
var close = $(this).offset().top - base - height + $(this).height();
// TODO improve approximation
return close < 10 && close > -10;
});
// TODO try to catch this earlier when scrollTop indicates the last page anyway
if (!result.length) {
result = this.element.children(".ui-menu-item:last");
}
this.activate(event, result);
} else {
this.activate(event, this.element.children(".ui-menu-item")
.filter(!this.active || this.last() ? ":first" : ":last"));
}
},
// TODO merge with nextPage
previousPage: function(event) {
if (this.hasScroll()) {
// TODO merge with no-scroll-else
if (!this.active || this.first()) {
this.activate(event, this.element.children(".ui-menu-item:last"));
return;
}
var base = this.active.offset().top,
height = this.element.height();
result = this.element.children(".ui-menu-item").filter(function() {
var close = $(this).offset().top - base + height - $(this).height();
// TODO improve approximation
return close < 10 && close > -10;
});
// TODO try to catch this earlier when scrollTop indicates the last page anyway
if (!result.length) {
result = this.element.children(".ui-menu-item:first");
}
this.activate(event, result);
} else {
this.activate(event, this.element.children(".ui-menu-item")
.filter(!this.active || this.first() ? ":last" : ":first"));
}
},
hasScroll: function() {
return this.element.height() < this.element.attr("scrollHeight");
},
select: function( event ) {
this._trigger("selected", event, { item: this.active });
}
});
}(jQuery));
=======
}( jQuery ));
>>>>>>>
}( jQuery )); |
<<<<<<<
.attr("aria-hidden", "true")
.attr("aria-expanded", "false")
;
=======
submenus
.prev("a")
.prepend('<span class="ui-menu-icon ui-icon ui-icon-carat-1-e"></span>');
>>>>>>>
.attr("aria-hidden", "true")
.attr("aria-expanded", "false")
;
<<<<<<<
self.element.attr("aria-activedescendant", self.active.children("a").attr("id"))
=======
// need to remove the attribute before adding it for the screenreader to pick up the change
// see http://groups.google.com/group/jquery-a11y/msg/929e0c1e8c5efc8f
this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant", self.itemId)
// highlight active parent menu item, if any
this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");
>>>>>>>
self.element.attr("aria-activedescendant", self.active.children("a").attr("id"))
// highlight active parent menu item, if any
this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active");
<<<<<<<
submenu.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(position);
this.active.find(">a:first").addClass("ui-state-active");
=======
submenu.show().position(position);
>>>>>>>
submenu.show().removeAttr("aria-hidden").attr("aria-expanded", "true").position(position); |
<<<<<<<
beforeAll(async () => await setupTest(), global.DATABASE_SETUP_TEARDOWN_TIMEOUT)
afterAll(async () => await cleanupTest(), global.DATABASE_SETUP_TEARDOWN_TIMEOUT)
describe('test assignment query', async () => {
it('works', async () => {
const testAdminUser = await createUser()
expect(testAdminUser.id).toBeDefined()
const invite = await createInvite()
expect(invite.data.createInvite).toBeDefined()
const organization = await createOrganization(testAdminUser, 'Impeachment', testAdminUser.id, invite.data.createInvite.id)
const campaign = await createCampaign(testAdminUser, 'Impeachment', 'Impeachment', organization.data.createOrganization.id)
let _ = await createUserOrganization(testAdminUser.id, organization.data.createOrganization.id, 'TEXTER')
const assignment = await createAssignment(testAdminUser.id, campaign.data.createCampaign.id, 1000)
const query = `
query Q($id:String!) {
assignment(id: $id) {
id
campaign {
id
}
}
}
`
const rootValue = {}
const executableSchema = makeExecutableSchema()
const context = getContext({user: testAdminUser})
const result = await graphql(executableSchema, query, rootValue, context, {id: assignment.id})
const {data} = result
expect(data.assignment.id).toBe(assignment.id.toString())
expect(data.assignment.campaign.id).toBe(campaign.data.createCampaign.id.toString())
})
})
=======
beforeAll(async () => await setupTest(), global.DATABASE_SETUP_TEARDOWN_TIMEOUT)
afterAll(async () => await cleanupTest(), global.DATABASE_SETUP_TEARDOWN_TIMEOUT)
describe('test assignment query', async () => {
it('works', async () => {
const testAdminUser = await createUser()
const invite = await createInvite()
const organization = await createOrganization(testAdminUser, 'Impeachment', testAdminUser.id, invite.data.createInvite.id)
const campaign = await createCampaign(testAdminUser, 'Impeachment', 'Impeachment', organization.data.createOrganization.id)
let _ = await createUserOrganization(testAdminUser.id, organization.data.createOrganization.id, 'TEXTER')
const assignment = await createAssignment(testAdminUser.id, campaign.data.createCampaign.id, 1000)
const query = `
query Q($id:String!) {
assignment(id: $id) {
id
campaign {
id
}
}
}
`
const rootValue = {}
const executableSchema = makeExecutableSchema()
const context = getContext({user: testAdminUser})
const result = await graphql(executableSchema, query, rootValue, context, {id: assignment.id})
const {data} = result
expect(data.assignment.id).toBe(assignment.id.toString())
expect(data.assignment.campaign.id).toBe(campaign.data.createCampaign.id.toString())
})
})
>>>>>>>
beforeAll(async () => await setupTest(), global.DATABASE_SETUP_TEARDOWN_TIMEOUT)
afterAll(async () => await cleanupTest(), global.DATABASE_SETUP_TEARDOWN_TIMEOUT)
describe('test assignment query', async () => {
it('works', async () => {
const testAdminUser = await createUser()
expect(testAdminUser.id).toBeDefined()
const invite = await createInvite()
expect(invite.data.createInvite).toBeDefined()
const invite = await createInvite()
const organization = await createOrganization(testAdminUser, 'Impeachment', testAdminUser.id, invite.data.createInvite.id)
const campaign = await createCampaign(testAdminUser, 'Impeachment', 'Impeachment', organization.data.createOrganization.id)
let _ = await createUserOrganization(testAdminUser.id, organization.data.createOrganization.id, 'TEXTER')
const assignment = await createAssignment(testAdminUser.id, campaign.data.createCampaign.id, 1000)
const query = `
query Q($id:String!) {
assignment(id: $id) {
id
campaign {
id
}
}
}
`
const rootValue = {}
const executableSchema = makeExecutableSchema()
const context = getContext({user: testAdminUser})
const result = await graphql(executableSchema, query, rootValue, context, {id: assignment.id})
const {data} = result
expect(data.assignment.id).toBe(assignment.id.toString())
expect(data.assignment.campaign.id).toBe(campaign.data.createCampaign.id.toString())
})
}) |
<<<<<<<
// Attach the ACE editor instance to the element. Useful for testing.
var $wfEditor = $('#' + editorId);
$wfEditor.get(0).aceEditor = editor;
acePack.addPackOverride('snippets/groovy.js', '../workflow-cps/snippets/workflow.js');
acePack.addScript('ext-language_tools.js', function() {
ace.require("ace/ext/language_tools");
editor.$blockScrolling = Infinity;
editor.session.setMode("ace/mode/groovy");
editor.setTheme("ace/theme/tomorrow");
editor.setAutoScrollEditorIntoView(true);
editor.setOption("minLines", 20);
// enable autocompletion and snippets
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: false
});
editor.setValue(textarea.val(), 1);
editor.getSession().on('change', function() {
textarea.val(editor.getValue());
showSamplesWidget();
});
editor.on('blur', function() {
editor.session.clearAnnotations();
var url = textarea.attr("checkUrl") + 'Compile';
$.ajax({
url: url,
data: {
value: editor.getValue()
},
method: textarea.attr('checkMethod') || 'POST',
success: function(data) {
var annotations = [];
if (data.status && data.status === 'success') {
// Fire script approval check - only if the script is syntactically correct
textarea.trigger('change');
return;
} else {
// Syntax errors
$.each(data, function(i, value) {
annotations.push({
row: value.line - 1,
column: value.column,
text: value.message,
type: 'error'
});
=======
editor.$blockScrolling = Infinity;
editor.session.setMode("ace/mode/groovy");
editor.setTheme("ace/theme/tomorrow");
editor.setAutoScrollEditorIntoView(true);
editor.setOption("minLines", 20);
// enable autocompletion and snippets
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: false
});
editor.setValue(textarea.val(), 1);
editor.getSession().on('change', function() {
textarea.val(editor.getValue());
showSamplesWidget();
});
editor.on('blur', function() {
editor.session.clearAnnotations();
var url = textarea.attr("checkUrl") + 'Compile';
new Ajax.Request(url, { // jshint ignore:line
method: textarea.attr('checkMethod') || 'POST',
parameters: {
value: editor.getValue()
},
onSuccess : function(data) {
var json = data.responseJSON;
var annotations = [];
if (json.status && json.status === 'success') {
// Fire script approval check - only if the script is syntactically correct
textarea.trigger('change');
return;
} else {
// Syntax errors
$.each(json, function(i, value) {
annotations.push({
row: value.line - 1,
column: value.column,
text: value.message,
type: 'error'
>>>>>>>
// Attach the ACE editor instance to the element. Useful for testing.
var $wfEditor = $('#' + editorId);
$wfEditor.get(0).aceEditor = editor;
acePack.addPackOverride('snippets/groovy.js', '../workflow-cps/snippets/workflow.js');
acePack.addScript('ext-language_tools.js', function() {
ace.require("ace/ext/language_tools");
editor.$blockScrolling = Infinity;
editor.session.setMode("ace/mode/groovy");
editor.setTheme("ace/theme/tomorrow");
editor.setAutoScrollEditorIntoView(true);
editor.setOption("minLines", 20);
// enable autocompletion and snippets
editor.setOptions({
enableBasicAutocompletion: true,
enableSnippets: true,
enableLiveAutocompletion: false
});
editor.setValue(textarea.val(), 1);
editor.getSession().on('change', function() {
textarea.val(editor.getValue());
showSamplesWidget();
});
editor.on('blur', function() {
editor.session.clearAnnotations();
var url = textarea.attr("checkUrl") + 'Compile';
new Ajax.Request(url, { // jshint ignore:line
method: textarea.attr('checkMethod') || 'POST',
parameters: {
value: editor.getValue()
},
onSuccess : function(data) {
var json = data.responseJSON;
var annotations = [];
if (json.status && json.status === 'success') {
// Fire script approval check - only if the script is syntactically correct
textarea.trigger('change');
return;
} else {
// Syntax errors
$.each(json, function(i, value) {
annotations.push({
row: value.line - 1,
column: value.column,
text: value.message,
type: 'error'
}); |
<<<<<<<
vl.toVegaSpec = function(enc, data) {
var mark = marks[enc.marktype()];
var spec = template();
var group = spec.marks[0];
var mdef = markdef(mark, enc);
=======
function toVegaSpec(enc, data) {
var spec = template(),
group = spec.marks[0],
mark = marks[enc.marktype()],
mdef = markdef(mark, enc);
>>>>>>>
vl.toVegaSpec = function(enc, data) {
var spec = template(),
group = spec.marks[0],
mark = marks[enc.marktype()],
mdef = markdef(mark, enc); |
<<<<<<<
proto.timeUnit = function(et) {
return this._enc[et].timeUnit;
};
proto.numberFormat = function(et, fieldStats) {
return this._enc[et].axis.numberFormat ||
this.config(
fieldStats && fieldStats.max > this.config('maxSmallNumber') ?
'largeNumberFormat' : 'smallNumberFormat'
);
};
=======
>>>>>>>
proto.numberFormat = function(et, fieldStats) {
return this._enc[et].axis.numberFormat ||
this.config(
fieldStats && fieldStats.max > this.config('maxSmallNumber') ?
'largeNumberFormat' : 'smallNumberFormat'
);
}; |
<<<<<<<
maxContacts: Int
=======
contactsCount: Int
>>>>>>>
maxContacts: Int
contactsCount: Int
<<<<<<<
bulkSendMessages(assignmentId: Int!): [CampaignContact]
=======
sendMessages(contactMessages: [ContactMessage]): [CampaignContact]
>>>>>>>
bulkSendMessages(assignmentId: Int!): [CampaignContact]
<<<<<<<
if (campaign.hasOwnProperty('interactionSteps')) {
await updateInteractionSteps(id, campaign.interactionSteps)
=======
if (JOBS_SAME_PROCESS) {
createInteractionSteps(job)
}
>>>>>>>
if (campaign.hasOwnProperty('interactionSteps')) {
await updateInteractionSteps(id, campaign.interactionSteps)
<<<<<<<
userAgreeTerms: async (_, { userId }, { user, loaders }) => {
const currentUser = await r.table('user')
.get(userId)
.update({
terms: true
})
return currentUser
},
sendReply: async (_, { id, message }, { loaders }) => {
if (process.env.NODE_ENV !== 'development') {
throw new GraphQLError({
status: 400,
message: 'You cannot send manual replies unless you are in development'
})
}
=======
sendReply: async (_, { id, message }, { user, loaders }) => {
>>>>>>>
userAgreeTerms: async (_, { userId }, { user, loaders }) => {
const currentUser = await r.table('user')
.get(userId)
.update({
terms: true
})
return currentUser
},
sendReply: async (_, { id, message }, { user, loaders }) => {
<<<<<<<
const currentRoles = await r.table('user_organization')
.getAll([organizationId, userId], { index: 'organization_user' })
.pluck('role')('role')
=======
const currentRoles = (await r.knex('user_organization')
.where({ organization_id: organizationId,
user_id: userId }).select('role')).map((res) => (res.role))
>>>>>>>
const currentRoles = (await r.knex('user_organization')
.where({ organization_id: organizationId,
user_id: userId }).select('role')).map((res) => (res.role))
<<<<<<<
bulkSendMessages: async(_, { assignmentId }, loaders) => {
if (!process.env.ALLOW_SEND_ALL) {
log.error('Not allowed to send all messages at once')
throw new GraphQLError({
status: 403,
message: 'Not allowed to send all messages at once'
})
}
const assignment = await Assignment.get(assignmentId)
const campaign = await Campaign.get(assignment.campaign_id)
// Assign some contacts
await rootMutations.RootMutation.findNewCampaignContact(_, { assignmentId: assignmentId, numberContacts: Number(process.env.BULK_SEND_CHUNK_SIZE) - 1 } , loaders)
const contacts = await r.knex('campaign_contact')
.where({message_status: 'needsMessage'})
.where({assignment_id: assignmentId})
.orderByRaw("updated_at")
.limit(process.env.BULK_SEND_CHUNK_SIZE)
const texter = camelCaseKeys(await User.get(assignment.user_id))
const customFields = Object.keys(JSON.parse(contacts[0].custom_fields))
const contactMessages = await contacts.map( async (contact) => {
const script = await campaignContactResolvers.CampaignContact.currentInteractionStepScript(contact)
contact.customFields = contact.custom_fields
const text = applyScript({
contact: camelCaseKeys(contact),
texter,
script,
customFields
})
const contactMessage = {
contactNumber: contact.cell,
userId: assignment.user_id,
text,
assignmentId
}
await rootMutations.RootMutation.sendMessage(_, {message: contactMessage, campaignContactId: contact.id}, loaders)
})
return []
},
=======
sendMessages: async(_, { contactMessages }, loaders) => {
if (process.env.ALLOW_SEND_ALL) {
const contacts = contactMessages.map(contactMessage => {
return rootMutations.RootMutation.sendMessage(_, contactMessage, loaders)
})
return contacts
}
log.error('Not allowed to send all messages at once')
throw new GraphQLError({
status: 403,
message: 'Not allowed to send all messages at once'
})
},
>>>>>>>
bulkSendMessages: async(_, { assignmentId }, loaders) => {
if (!process.env.ALLOW_SEND_ALL) {
log.error('Not allowed to send all messages at once')
throw new GraphQLError({
status: 403,
message: 'Not allowed to send all messages at once'
})
}
const assignment = await Assignment.get(assignmentId)
const campaign = await Campaign.get(assignment.campaign_id)
// Assign some contacts
await rootMutations.RootMutation.findNewCampaignContact(_, { assignmentId: assignmentId, numberContacts: Number(process.env.BULK_SEND_CHUNK_SIZE) - 1 } , loaders)
const contacts = await r.knex('campaign_contact')
.where({message_status: 'needsMessage'})
.where({assignment_id: assignmentId})
.orderByRaw("updated_at")
.limit(process.env.BULK_SEND_CHUNK_SIZE)
const texter = camelCaseKeys(await User.get(assignment.user_id))
const customFields = Object.keys(JSON.parse(contacts[0].custom_fields))
const contactMessages = await contacts.map( async (contact) => {
const script = await campaignContactResolvers.CampaignContact.currentInteractionStepScript(contact)
contact.customFields = contact.custom_fields
const text = applyScript({
contact: camelCaseKeys(contact),
texter,
script,
customFields
})
const contactMessage = {
contactNumber: contact.cell,
userId: assignment.user_id,
text,
assignmentId
}
await rootMutations.RootMutation.sendMessage(_, {message: contactMessage, campaignContactId: contact.id}, loaders)
})
return []
},
<<<<<<<
service: process.env.DEFAULT_SERVICE || '',
is_from_contact: false,
queued_at: new Date()
=======
service: orgFeatures.service || process.env.DEFAULT_SERVICE || '',
is_from_contact: false
>>>>>>>
service: orgFeatures.service || process.env.DEFAULT_SERVICE || '',
is_from_contact: false,
queued_at: new Date() |
<<<<<<<
return {
restrict: 'E',
bindToController: true,
scope: {
text: '='
},
controllerAs: 'ctrl',
template:'<button class="btn btn-default" type="button" ng-click="ctrl.openModal()">Preview</button>',
controller: function() {
var ctrl = this;
ctrl.openModal = function() {
if (ctrl.text) {
EventUtilsService.renderCommonMark(ctrl.text)
.then(function (res) {
return $uibModal.open({
size: 'sm',
template: '<div class="modal-header"><h1>Preview</h1></div><div class="modal-body" ng-bind-html="text"></div><div class="modal-footer"><button class="btn btn-default" data-ng-click="ok()">close</button></div>',
backdrop: 'static',
controller: function ($scope) {
$scope.ok = function () {
$scope.$close(true);
};
$scope.text = res.data;
}
})
}, function(res) {
return $uibModal.open({
size: 'sm',
template: '<div class="modal-body">There was an error fetching the preview</div><div class="modal-footer"><button class="btn btn-default" data-ng-click="ok()">close</button></div>',
backdrop: 'static',
controller: function ($scope) {
$scope.ok = function () {
$scope.$close(true);
};
}
})
}
);
}
};
}
}
}])
=======
return {
restrict: 'E',
bindToController: true,
scope: {
text: '='
},
controllerAs: 'ctrl',
template:'<button class="btn btn-default" type="button" ng-click="ctrl.openModal()">Preview</button>',
controller: function() {
var ctrl = this;
ctrl.openModal = function() {
EventUtilsService.renderCommonMark(ctrl.text).then(function(res) {
return $uibModal.open({
size:'sm',
template:'<div class="modal-header"><h1>Preview</h1></div><div class="modal-body" ng-bind-html="text"></div><div class="modal-footer"><button class="btn btn-default" data-ng-click="ok()">close</button></div>',
backdrop: 'static',
controller: function($scope) {
$scope.ok = function() {
$scope.$close(true);
};
$scope.text = res.data;
}
});
});
};
}
}
}]);
directives.directive('eventSidebar', ['EventService', '$state', '$window', '$rootScope', function(EventService, $state, $window, $rootScope) {
return {
restrict: 'E',
bindToController: true,
scope: {
event: '='
},
controllerAs: 'ctrl',
templateUrl: '/resources/angular-templates/admin/partials/event/fragment/event-sidebar.html',
controller: [function() {
var ctrl = this;
ctrl.internal = (ctrl.event.type === 'INTERNAL');
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
ctrl.showBackLink = !toState.data || !toState.data.detail;
});
ctrl.openDeleteWarning = function() {
EventService.deleteEvent(ctrl.event).then(function(result) {
$state.go('index');
});
};
ctrl.openFieldSelectionModal = function() {
EventService.exportAttendees(ctrl.event);
};
ctrl.downloadSponsorsScan = function() {
$window.open($window.location.pathname+"/api/events/"+ctrl.event.shortName+"/sponsor-scan/export.csv");
};
}]
}
}]);
>>>>>>>
return {
restrict: 'E',
bindToController: true,
scope: {
text: '='
},
controllerAs: 'ctrl',
template:'<button class="btn btn-default" type="button" ng-click="ctrl.openModal()">Preview</button>',
controller: function() {
var ctrl = this;
ctrl.openModal = function() {
if (ctrl.text) {
EventUtilsService.renderCommonMark(ctrl.text)
.then(function (res) {
return $uibModal.open({
size: 'sm',
template: '<div class="modal-header"><h1>Preview</h1></div><div class="modal-body" ng-bind-html="text"></div><div class="modal-footer"><button class="btn btn-default" data-ng-click="ok()">close</button></div>',
backdrop: 'static',
controller: function ($scope) {
$scope.ok = function () {
$scope.$close(true);
};
$scope.text = res.data;
}
})
}, function(res) {
return $uibModal.open({
size: 'sm',
template: '<div class="modal-body">There was an error fetching the preview</div><div class="modal-footer"><button class="btn btn-default" data-ng-click="ok()">close</button></div>',
backdrop: 'static',
controller: function ($scope) {
$scope.ok = function () {
$scope.$close(true);
};
}
})
}
);
}
};
}
}
}]);
directives.directive('eventSidebar', ['EventService', '$state', '$window', '$rootScope', function(EventService, $state, $window, $rootScope) {
return {
restrict: 'E',
bindToController: true,
scope: {
event: '='
},
controllerAs: 'ctrl',
templateUrl: '/resources/angular-templates/admin/partials/event/fragment/event-sidebar.html',
controller: [function() {
var ctrl = this;
ctrl.internal = (ctrl.event.type === 'INTERNAL');
$rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
ctrl.showBackLink = !toState.data || !toState.data.detail;
});
ctrl.openDeleteWarning = function() {
EventService.deleteEvent(ctrl.event).then(function(result) {
$state.go('index');
});
};
ctrl.openFieldSelectionModal = function() {
EventService.exportAttendees(ctrl.event);
};
ctrl.downloadSponsorsScan = function() {
$window.open($window.location.pathname+"/api/events/"+ctrl.event.shortName+"/sponsor-scan/export.csv");
};
}]
}
}]); |
<<<<<<<
var isDownloading = false;
var isPausing = false;
=======
var isDownloading = 0;
>>>>>>>
var isDownloading = false;
var isPausing = false;
<<<<<<<
function generateZip(isFromFS, fs, isRetry, forced){
=======
function generateZip(isFromFS, fs, isRetry){
// remove pause button
if (ehDownloadDialog.contains(ehDownloadPauseBtn)) {
ehDownloadDialog.removeChild(ehDownloadPauseBtn);
}
>>>>>>>
function generateZip(isFromFS, fs, isRetry, forced){
// remove pause button
if (ehDownloadDialog.contains(ehDownloadPauseBtn)) {
ehDownloadDialog.removeChild(ehDownloadPauseBtn);
}
<<<<<<<
if (needTitleStatus) document.title = '[' + (downloadedCount < totalCount ? '↓ ' + downloadedCount + '/' + totalCount : totalCount === 0 ? '↓' : '√' ) + '] ' + pretitle;
=======
if (needTitleStatus) document.title = '[EHD: ' + (isDownloading === 1 ? (downloadedCount < totalCount ? '↓ ' + downloadedCount + '/' + totalCount : totalCount === 0 ? '↓' : '√' ) : '❙❙') + '] ' + pretitle;
>>>>>>>
if (needTitleStatus) document.title = '[' + (isPausing ? '❙❙' : downloadedCount < totalCount ? '↓ ' + downloadedCount + '/' + totalCount : totalCount === 0 ? '↓' : '√' ) + '] ' + pretitle;
<<<<<<<
for (var i = 0; i < fetchThread.length; i++) {
if (typeof fetchThread[i] !== 'undefined' && 'abort' in fetchThread[i]) fetchThread[i].abort();
}
if (setting['number-auto-retry'] || confirm('Some images were failed to download. Would you like to try them again?')) {
=======
for (var i = 0; i < fetchThread.length; i++) {
if ('abort' in fetchThread[i]) fetchThread[i].abort();
}
if (confirm('Some images were failed to download. Would you like to try them again?')) {
>>>>>>>
for (var i = 0; i < fetchThread.length; i++) {
if (typeof fetchThread[i] !== 'undefined' && 'abort' in fetchThread[i]) fetchThread[i].abort();
}
if (setting['number-auto-retry'] || confirm('Some images were failed to download. Would you like to try them again?')) {
<<<<<<<
if (!isDownloading || imageData[index] instanceof ArrayBuffer) return; // Temporarily fixes #31
=======
if (isDownloading === 2) return;
>>>>>>>
if (!isDownloading || imageData[index] instanceof ArrayBuffer) return; // Temporarily fixes #31
// if (isPausing) return;
<<<<<<<
if (!isDownloading || imageData[index] instanceof ArrayBuffer) return; // Temporarily fixes #31
if (typeof fetchThread[index] !== 'undefined' && 'abort' in fetchThread[index]) fetchThread[index].abort();
=======
if (isDownloading === 2) return;
fetchThread[index].abort();
>>>>>>>
if (!isDownloading || imageData[index] instanceof ArrayBuffer) return; // Temporarily fixes #31
// if (isPausing) return;
if (typeof fetchThread[index] !== 'undefined' && 'abort' in fetchThread[index]) fetchThread[index].abort();
<<<<<<<
else if (
byteLength === 142 || // Image Viewing Limits String Byte Size (exhentai)
byteLength === 144 || // Image Viewing Limits String Byte Size (g.e-hentai)
byteLength === 28658 || // '509 Bandwidth Exceeded' Image Byte Size
(mime[0] === 'text' && (new TextDecoder()).decode(new DataView(response)).indexOf('You have exceeded your image viewing limits') >= 0) // directly detect response content in case byteLength will be modified
) {
// thought exceed the limits, downloading image is still accessable
/*for (var i = 0; i < fetchThread.length; i++) {
if (typeof fetchThread[i] !== 'undefined' && 'abort' in fetchThread[i]) fetchThread[i].abort();
}*/
console.log('[EHD] #' + (index + 1) + ': Exceed Image Viewing Limits / 509 Bandwidth Exceeded');
=======
else if (byteLength === 141) { // Image Viewing Limits String Byte Size
for (var i = 0; i < fetchThread.length; i++) {
if ('abort' in fetchThread[i]) fetchThread[i].abort();
}
console.log('[EHD] #' + (index + 1) + ': Exceed Image Viewing Limits');
>>>>>>>
else if (
byteLength === 142 || // Image Viewing Limits String Byte Size (exhentai)
byteLength === 144 || // Image Viewing Limits String Byte Size (g.e-hentai)
byteLength === 28658 || // '509 Bandwidth Exceeded' Image Byte Size
(mime[0] === 'text' && (new TextDecoder()).decode(new DataView(response)).indexOf('You have exceeded your image viewing limits') >= 0) // directly detect response content in case byteLength will be modified
) {
// thought exceed the limits, downloading image is still accessable
/*for (var i = 0; i < fetchThread.length; i++) {
if (typeof fetchThread[i] !== 'undefined' && 'abort' in fetchThread[i]) fetchThread[i].abort();
}*/
console.log('[EHD] #' + (index + 1) + ': Exceed Image Viewing Limits / 509 Bandwidth Exceeded');
<<<<<<<
=======
isDownloading = 0;
>>>>>>>
<<<<<<<
if (!isDownloading || imageData[index] instanceof ArrayBuffer) return; // Temporarily fixes #31
if (typeof fetchThread[index] !== 'undefined' && 'abort' in fetchThread[index]) fetchThread[index].abort();
removeTimerHandler();
=======
if (!fetchThread[index]) return;
fetchThread[index].abort();
>>>>>>>
if (!isDownloading || imageData[index] instanceof ArrayBuffer) return; // Temporarily fixes #31
if (typeof fetchThread[index] !== 'undefined' && 'abort' in fetchThread[index]) fetchThread[index].abort();
removeTimerHandler();
<<<<<<<
isDownloading = false;
//alert('We can\'t get request content from response content. It\'s possible that E-Hentai changes source code format so that we can\'t find them, or your ISP modifies (or say hijacks) the page content. If it\'s sure that you can access to any pages of E-Hentai, including current page: ' + location.pathname + '?p=' + curPage + ' , please report a bug.');
=======
isDownloading = 0;
alert('We can\'t get request content from response content. It\'s possible that E-Hentai changes source code format so that we can\'t find them, or your ISP modifies (or say hijacks) the page content. If it\'s sure that you can access to any pages of E-Hentai, including current page: ' + location.pathname + '?p=' + curPage + ' , please report a bug.');
>>>>>>>
isDownloading = false;
//alert('We can\'t get request content from response content. It\'s possible that E-Hentai changes source code format so that we can\'t find them, or your ISP modifies (or say hijacks) the page content. If it\'s sure that you can access to any pages of E-Hentai, including current page: ' + location.pathname + '?p=' + curPage + ' , please report a bug.');
<<<<<<<
for (var i = 0; i < fetchThread.length; i++) {
if (typeof fetchThread[i] !== 'undefined' && 'abort' in fetchThread[i]) fetchThread[i].abort();
}
=======
for (var i = 0; i < fetchThread.length; i++) {
if ('abort' in fetchThread[i]) fetchThread[i].abort();
}
>>>>>>>
for (var i = 0; i < fetchThread.length; i++) {
if (typeof fetchThread[i] !== 'undefined' && 'abort' in fetchThread[i]) fetchThread[i].abort();
}
<<<<<<<
ehDownloadDialog.appendChild(forceDownloadTips);
=======
ehDownloadDialog.appendChild(ehDownloadPauseBtn);
>>>>>>>
ehDownloadDialog.appendChild(forceDownloadTips);
ehDownloadDialog.appendChild(ehDownloadPauseBtn); |
<<<<<<<
var minStamp = opts.min && new Date(opts.min).getTime();
var maxStamp = opts.max && new Date(opts.max).getTime();
=======
var initialInRange = inRange(currentDate);
if (!initialInRange) {
currentDate = (opts.min) ? opts.parse(opts.min) : opts.parse(opts.max);
input.value = opts.format(currentDate);
}
>>>>>>>
var minStamp = opts.min && new Date(opts.min).getTime();
var maxStamp = opts.max && new Date(opts.max).getTime();
var initialInRange = inRange(currentDate);
if (!initialInRange) {
currentDate = (opts.min) ? opts.parse(opts.min) : opts.parse(opts.max);
input.value = opts.format(currentDate);
} |
<<<<<<<
for (var i=0; i<rules.length; i++) {
=======
for (var i = 0; i < rules.length; i++) {
>>>>>>>
for (var i = 0; i < rules.length; i++) {
<<<<<<<
return {regexp: regexp, groups: groups, fast: fast, error: errorRule}
=======
return {regexp: combined, groups: groups, error: errorRule}
>>>>>>>
return {regexp: combined, groups: groups, fast: fast, error: errorRule} |
<<<<<<<
test('sorts literals by length', () => {
let lexer = moo.compile({
op: ['=', '==', '===', '+', '+='],
space: / +/,
})
lexer.reset('=== +=')
expect(lexer.next()).toMatchObject({value: '==='})
expect(lexer.next()).toMatchObject({type: 'space'})
expect(lexer.next()).toMatchObject({value: '+='})
})
test('but doesn\'t sort literals across rules', () => {
let lexer = moo.compile({
one: 'moo',
two: 'moomintroll',
})
lexer.reset('moomintroll')
expect(lexer.next()).toMatchObject({value: 'moo'})
})
test("deals with keyword literals", () => {
=======
})
describe('keywords', () => {
test('supports explicit keywords', () => {
>>>>>>>
test('sorts literals by length', () => {
let lexer = moo.compile({
op: ['=', '==', '===', '+', '+='],
space: / +/,
})
lexer.reset('=== +=')
expect(lexer.next()).toMatchObject({value: '==='})
expect(lexer.next()).toMatchObject({type: 'space'})
expect(lexer.next()).toMatchObject({value: '+='})
})
test('but doesn\'t sort literals across rules', () => {
let lexer = moo.compile({
one: 'moo',
two: 'moomintroll',
})
lexer.reset('moomintroll')
expect(lexer.next()).toMatchObject({value: 'moo'})
})
})
describe('keywords', () => {
test('supports explicit keywords', () => { |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
// gogo
streamsb: {
match: ['*://streamsb.net/*', '*://streamsb.com/*'],
},
// gogo
dood: {
match: ['*://dood.to/*', '*://dood.watch/*', '*://doodstream.com/*'],
},
=======
// animedao.to
vcdn: {
match: ['*://vcdn.space/v/*'],
},
// otakustv.com
youtubeEmbed: {
match: ['*://youtube.googleapis.com/embed/*drive.google.com*'],
},
>>>>>>>
// gogo
streamsb: {
match: ['*://streamsb.net/*', '*://streamsb.com/*'],
},
// gogo
dood: {
match: ['*://dood.to/*', '*://dood.watch/*', '*://doodstream.com/*'],
},
// animedao.to
vcdn: {
match: ['*://vcdn.space/v/*'],
},
// otakustv.com
youtubeEmbed: {
match: ['*://youtube.googleapis.com/embed/*drive.google.com*'],
}, |
<<<<<<<
MangaSee: {
match: ['*://mangasee123.com/manga*', '*://mangasee123.com/read-online*'],
},
=======
AnimeTribes: {
match: ['*://animetribes.ru/watch/*'],
},
>>>>>>>
MangaSee: {
match: ['*://mangasee123.com/manga*', '*://mangasee123.com/read-online*'],
},
AnimeTribes: {
match: ['*://animetribes.ru/watch/*'],
}, |
<<<<<<<
PrimeVideo: {
match: [
'*://*.primevideo.com/*',
]
},
MangaKatana: {
match: [
'*://mangakatana.com/manga/*'
]
},
manga4life: {
match: [
'*://manga4life.com/*'
]
},
=======
bato: {
match: [
'*://bato.to/*',
]
},
>>>>>>>
PrimeVideo: {
match: [
'*://*.primevideo.com/*',
]
},
MangaKatana: {
match: [
'*://mangakatana.com/manga/*'
]
},
manga4life: {
match: [
'*://manga4life.com/*'
]
},
bato: {
match: [
'*://bato.to/*',
]
}, |
<<<<<<<
MangaHere: {
match: ['*://*.mangahere.cc/manga/*'],
},
MangaFox: {
match: ['*://*.fanfox.net/manga/*', '*://*.mangafox.la/manga/*'],
},
=======
AnimeUnity: {
match: ['*://animeunity.it/anime/*'],
},
>>>>>>>
AnimeUnity: {
match: ['*://animeunity.it/anime/*'],
},
MangaHere: {
match: ['*://*.mangahere.cc/manga/*'],
},
MangaFox: {
match: ['*://*.fanfox.net/manga/*', '*://*.mangafox.la/manga/*'],
}, |
<<<<<<<
AnimeSimple: {
match: ['*://*.animesimple.com/*'],
},
AnimeUnity: {
match: ['*://animeunity.it/anime/*'],
},
MangaHere: {
match: ['*://*.mangahere.cc/manga/*'],
},
MangaFox: {
match: ['*://*.fanfox.net/manga/*', '*://*.mangafox.la/manga/*'],
},
=======
JustAnime: {
match: ['*://justanime.app/*'],
},
>>>>>>>
AnimeSimple: {
match: ['*://*.animesimple.com/*'],
},
AnimeUnity: {
match: ['*://animeunity.it/anime/*'],
},
MangaHere: {
match: ['*://*.mangahere.cc/manga/*'],
},
MangaFox: {
match: ['*://*.fanfox.net/manga/*', '*://*.mangafox.la/manga/*'],
},
JustAnime: {
match: ['*://justanime.app/*'],
}, |
<<<<<<<
AniMixPlay: {
match: ['*://animixplay.com/v*'],
},
=======
MyAnimeListVideo: {
match: ['*://myanimelist.net/anime/*/*/episode/*'],
},
>>>>>>>
AniMixPlay: {
match: ['*://animixplay.com/v*'],
},
MyAnimeListVideo: {
match: ['*://myanimelist.net/anime/*/*/episode/*'],
}, |
<<<<<<<
{
title: 'animestrue',
url: 'https://www.animestrue.net/',
testCases: [
{//season 1 syncpage
url: 'https://www.animestrue.net/anime/highschool-dxd/temporada1/episodio2',
expected: {
sync: true,
title: 'Highschool DxD',
identifier: 'highschool-dxd?s=1',
overviewUrl: 'https://www.animestrue.net/anime/highschool-dxd/temporada1',
episode: 2,
nextEpUrl: 'https://www.animestrue.net/anime/highschool-dxd/temporada1/episodio3',
uiSelector: false,
}
},
{//season 1 overview
url: 'https://www.animestrue.net/anime/highschool-dxd/temporada1',
expected: {
sync: false,
title: 'Highschool DxD',
identifier: 'highschool-dxd?s=1',
uiSelector: true,
epList: {
5: 'https://www.animestrue.net/anime/highschool-dxd/temporada1/episodio5'
}
}
},
{//season 4 syncpage
url: 'https://www.animestrue.net/anime/highschool-dxd/temporada4/episodio2',
expected: {
sync: true,
title: 'Highschool DxD season 4',
identifier: 'highschool-dxd?s=4',
overviewUrl: 'https://www.animestrue.net/anime/highschool-dxd/temporada4',
episode: 2,
nextEpUrl: 'https://www.animestrue.net/anime/highschool-dxd/temporada4/episodio3',
uiSelector: false,
}
},
{//season 4 overview
url: 'https://www.animestrue.net/anime/highschool-dxd/temporada4',
expected: {
sync: false,
title: 'Highschool DxD season 4',
identifier: 'highschool-dxd?s=4',
uiSelector: true,
epList: {
5: 'https://www.animestrue.net/anime/highschool-dxd/temporada4/episodio5'
}
}
}
]
},
=======
{
title: 'myanime',
url: 'https://myanime.moe/',
testCases: [
{
url: 'https://myanime.moe/anime/great-teacher-onizuka/42',
expected: {
sync: true,
title: 'Great Teacher Onizuka',
identifier: 'great-teacher-onizuka',
overviewUrl: 'https://myanime.moe/anime/great-teacher-onizuka',
nextEpUrl: 'https://myanime.moe/anime/great-teacher-onizuka/43',
episode: 42,
uiSelector: false,
}
},
{
url: 'https://myanime.moe/anime/great-teacher-onizuka',
expected: {
sync: false,
title: 'Great Teacher Onizuka',
identifier: 'great-teacher-onizuka',
uiSelector: true,
epList: {
5: 'https://myanime.moe/anime/great-teacher-onizuka/5',
42: 'https://myanime.moe/anime/great-teacher-onizuka/42'
}
}
},
]
},
>>>>>>>
{
title: 'myanime',
url: 'https://myanime.moe/',
testCases: [
{
url: 'https://myanime.moe/anime/great-teacher-onizuka/42',
expected: {
sync: true,
title: 'Great Teacher Onizuka',
identifier: 'great-teacher-onizuka',
overviewUrl: 'https://myanime.moe/anime/great-teacher-onizuka',
nextEpUrl: 'https://myanime.moe/anime/great-teacher-onizuka/43',
episode: 42,
uiSelector: false,
}
},
{
url: 'https://myanime.moe/anime/great-teacher-onizuka',
expected: {
sync: false,
title: 'Great Teacher Onizuka',
identifier: 'great-teacher-onizuka',
uiSelector: true,
epList: {
5: 'https://myanime.moe/anime/great-teacher-onizuka/5',
42: 'https://myanime.moe/anime/great-teacher-onizuka/42'
}
}
},
]
},
{
title: 'animestrue',
url: 'https://www.animestrue.net/',
testCases: [
{//season 1 syncpage
url: 'https://www.animestrue.net/anime/highschool-dxd/temporada1/episodio2',
expected: {
sync: true,
title: 'Highschool DxD',
identifier: 'highschool-dxd?s=1',
overviewUrl: 'https://www.animestrue.net/anime/highschool-dxd/temporada1',
episode: 2,
nextEpUrl: 'https://www.animestrue.net/anime/highschool-dxd/temporada1/episodio3',
uiSelector: false,
}
},
{//season 1 overview
url: 'https://www.animestrue.net/anime/highschool-dxd/temporada1',
expected: {
sync: false,
title: 'Highschool DxD',
identifier: 'highschool-dxd?s=1',
uiSelector: true,
epList: {
5: 'https://www.animestrue.net/anime/highschool-dxd/temporada1/episodio5'
}
}
},
{//season 4 syncpage
url: 'https://www.animestrue.net/anime/highschool-dxd/temporada4/episodio2',
expected: {
sync: true,
title: 'Highschool DxD season 4',
identifier: 'highschool-dxd?s=4',
overviewUrl: 'https://www.animestrue.net/anime/highschool-dxd/temporada4',
episode: 2,
nextEpUrl: 'https://www.animestrue.net/anime/highschool-dxd/temporada4/episodio3',
uiSelector: false,
}
},
{//season 4 overview
url: 'https://www.animestrue.net/anime/highschool-dxd/temporada4',
expected: {
sync: false,
title: 'Highschool DxD season 4',
identifier: 'highschool-dxd?s=4',
uiSelector: true,
epList: {
5: 'https://www.animestrue.net/anime/highschool-dxd/temporada4/episodio5'
}
}
}
]
}, |
<<<<<<<
animestrue: {
match: [
'*://*.animestrue.net/anime/*/temporada*'
]
},
PrimeVideo: {
match: [
'*://*.primevideo.com/*',
]
},
=======
MangaKatana: {
match: [
'*://mangakatana.com/manga/*'
]
},
>>>>>>>
animestrue: {
match: [
'*://*.animestrue.net/anime/*/temporada*'
]
},
PrimeVideo: {
match: [
'*://*.primevideo.com/*',
]
},
MangaKatana: {
match: [
'*://mangakatana.com/manga/*'
]
}, |
<<<<<<<
// 9anime
vidstream: {
match: ['*://vidstream.pro/e/*'],
},
=======
AnimeLab: {
match: ['*://www.animelab.com/*'],
},
>>>>>>>
AnimeLab: {
match: ['*://www.animelab.com/*'],
},
// 9anime
vidstream: {
match: ['*://vidstream.pro/e/*'],
}, |
<<<<<<<
Fastani: {
match: ['*://fastani.net/*'],
},
=======
BSTO: {
match: ['*://bs.to/serie/*'],
},
>>>>>>>
BSTO: {
match: ['*://bs.to/serie/*'],
},
Fastani: {
match: ['*://fastani.net/*'],
}, |
<<<<<<<
AnimeFever: {
match: [
'*://*.animefever.tv/*'
]
},
=======
serimanga: {
match: [
'*://serimanga.com/*'
]
},
>>>>>>>
AnimeFever: {
match: [
'*://*.animefever.tv/*'
]
},
serimanga: {
match: [
'*://serimanga.com/*'
]
}, |
<<<<<<<
window.SHOW_TAGS=${process.env.SHOW_TAGS || false}
=======
window.EXPERIMENTAL_TEXTERUI="${process.env.EXPERIMENTAL_TEXTERUI || ""}"
>>>>>>>
window.SHOW_TAGS=${process.env.SHOW_TAGS || false}
window.EXPERIMENTAL_TEXTERUI="${process.env.EXPERIMENTAL_TEXTERUI || ""}" |
<<<<<<<
import { getConfig } from "./lib/config";
import { r, Organization } from "../models";
=======
import { r, Organization, cacheableData } from "../models";
>>>>>>>
import { getConfig } from "./lib/config";
import { r, Organization, cacheableData } from "../models";
<<<<<<<
textingHoursEnd: organization => organization.texting_hours_end,
cacheable: (org, _, { user }) =>
//quanery logic. levels are 0, 1, 2
r.redis ? (getConfig("REDIS_CONTACT_CACHE", org) ? 2 : 1) : 0
=======
textingHoursEnd: organization => organization.texting_hours_end,
twilioAccountSid: organization =>
organization.features.indexOf("TWILIO_ACCOUNT_SID") !== -1
? JSON.parse(organization.features).TWILIO_ACCOUNT_SID
: null,
twilioAuthToken: organization =>
organization.features.indexOf("TWILIO_AUTH_TOKEN_ENCRYPTED") !== -1
? JSON.parse(organization.features).TWILIO_AUTH_TOKEN_ENCRYPTED
: null,
twilioMessageServiceSid: organization =>
organization.features.indexOf("TWILIO_MESSAGE_SERVICE_SID") !== -1
? JSON.parse(organization.features).TWILIO_MESSAGE_SERVICE_SID
: null,
fullyConfigured: async organization => {
const serviceName =
getConfig("service", organization)
|| getConfig("DEFAULT_SERVICE");
if (serviceName === 'twilio') {
const { authToken, accountSid } =
await cacheableData.organization.getTwilioAuth(organization);
const messagingServiceSid =
await cacheableData.organization.getMessageServiceSid(organization);
if (!(authToken && accountSid && messagingServiceSid)) {
return false;
}
}
return true;
},
>>>>>>>
textingHoursEnd: organization => organization.texting_hours_end,
cacheable: (org, _, { user }) =>
//quanery logic. levels are 0, 1, 2
r.redis ? (getConfig("REDIS_CONTACT_CACHE", org) ? 2 : 1) : 0,
twilioAccountSid: organization =>
organization.features.indexOf("TWILIO_ACCOUNT_SID") !== -1
? JSON.parse(organization.features).TWILIO_ACCOUNT_SID
: null,
twilioAuthToken: organization =>
organization.features.indexOf("TWILIO_AUTH_TOKEN_ENCRYPTED") !== -1
? JSON.parse(organization.features).TWILIO_AUTH_TOKEN_ENCRYPTED
: null,
twilioMessageServiceSid: organization =>
organization.features.indexOf("TWILIO_MESSAGE_SERVICE_SID") !== -1
? JSON.parse(organization.features).TWILIO_MESSAGE_SERVICE_SID
: null,
fullyConfigured: async organization => {
const serviceName =
getConfig("service", organization) || getConfig("DEFAULT_SERVICE");
if (serviceName === "twilio") {
const {
authToken,
accountSid
} = await cacheableData.organization.getTwilioAuth(organization);
const messagingServiceSid = await cacheableData.organization.getMessageServiceSid(
organization
);
if (!(authToken && accountSid && messagingServiceSid)) {
return false;
}
}
return true;
} |
<<<<<<<
"Ctrl-F": () => {
dialog.setSearchOpen(!dialog.isSearchOpen);
},
=======
"Ctrl-Alt-S": () => {
// Converting between sans serif and serif
},
"Ctrl-Alt-L": () => {
keyEvents.parseLinkToFoot(content.content, content);
},
"Ctrl-Alt-P": () => {
keyEvents.formatDoc(content.content, content);
},
>>>>>>>
"Ctrl-Alt-S": () => {
// Converting between sans serif and serif
},
"Ctrl-Alt-L": () => {
keyEvents.parseLinkToFoot(content.content, content);
},
"Ctrl-Alt-P": () => {
keyEvents.formatDoc(content.content, content);
},
"Ctrl-F": () => {
dialog.setSearchOpen(!dialog.isSearchOpen);
},
<<<<<<<
"Cmd-F": () => {
dialog.setSearchOpen(!dialog.isSearchOpen);
},
=======
"Cmd-Alt-S": () => {
// Converting between sans serif and serif
},
"Cmd-Alt-L": () => {
keyEvents.parseLinkToFoot(content.content, content);
},
"Cmd-Alt-P": () => {
keyEvents.formatDoc(content.content, content);
},
>>>>>>>
"Cmd-Alt-S": () => {
// Converting between sans serif and serif
},
"Cmd-Alt-L": () => {
keyEvents.parseLinkToFoot(content.content, content);
},
"Cmd-Alt-P": () => {
keyEvents.formatDoc(content.content, content);
},
"Cmd-F": () => {
dialog.setSearchOpen(!dialog.isSearchOpen);
}, |
<<<<<<<
export default Ember.Route.extend(styleBody, {
titleToken: '安装',
=======
const {Route, inject} = Ember;
export default Route.extend(styleBody, {
titleToken: 'Setup',
>>>>>>>
const {Route, inject} = Ember;
export default Route.extend(styleBody, {
titleToken: '安装', |
<<<<<<<
obj = Array.isArray(obj) ? obj : [obj];
callback(null, obj);
=======
process.nextTick(callback.bind(null, null, obj));
>>>>>>>
obj = Array.isArray(obj) ? obj : [obj];
process.nextTick(callback.bind(null, null, obj)); |
<<<<<<<
Popup: dataTable.Popup,
=======
LocalStorage: localStorageSink$,
>>>>>>>
Popup: dataTable.Popup,
LocalStorage: localStorageSink$, |
<<<<<<<
return getUsers(organizationId, cursor, campaignsFilter, role, sortBy);
},
tags: async (_, { organizationId }, { user }) => {
await accessRequired(user, organizationId, "SUPERVOLUNTEER");
return getTags(organizationId);
=======
return getUsers(
organizationId,
cursor,
campaignsFilter,
role,
sortBy,
filterString,
filterBy
);
>>>>>>>
return getUsers(
organizationId,
cursor,
campaignsFilter,
role,
sortBy,
filterString,
filterBy
);
},
tags: async (_, { organizationId }, { user }) => {
await accessRequired(user, organizationId, "SUPERVOLUNTEER");
return getTags(organizationId); |
<<<<<<<
icon_inline: true
};
=======
icon_inline: true,
rounded_corners: true
}
>>>>>>>
icon_inline: true,
rounded_corners: true
}; |
<<<<<<<
'select-tree': 'SelectTree 选择器',
=======
search: 'Search 搜索框',
>>>>>>>
'select-tree': 'SelectTree 选择器',
search: 'Search 搜索框', |
<<<<<<<
it("handleDeliveryReport delivered", async () => {
const org = await cacheableData.organization.load(organizationId);
let campaign = await cacheableData.campaign.load(testCampaign.id, {
forceLoad: true
});
await cacheableData.campaignContact.loadMany(campaign, org, {});
queryLog = [];
const messageSid = "123123123";
await cacheableData.message.save({
contact: dbCampaignContact,
messageInstance: new Message({
campaign_contact_id: dbCampaignContact.id,
contact_number: dbCampaignContact.cell,
messageservice_sid: "fakeSid_MK123",
is_from_contact: false,
send_status: "SENT",
service: "twilio",
text: "some message",
user_id: testTexterUser.id,
service_id: messageSid
})
});
await handleDeliveryReport({
MessageSid: messageSid,
MessagingServiceSid: "fakeSid_MK123",
To: dbCampaignContact.cell,
MessageStatus: "delivered",
From: "+14145551010"
});
const messages = await r.knex("message").where("service_id", messageSid);
expect(messages.length).toBe(1);
expect(messages[0].error_code).toBe(null);
expect(messages[0].send_status).toBe("DELIVERED");
const contacts = await r
.knex("campaign_contact")
.where("id", dbCampaignContact.id);
expect(contacts.length).toBe(1);
expect(contacts[0].error_code).toBe(null);
if (r.redis) {
campaign = await cacheableData.campaign.load(testCampaign.id);
expect(campaign.errorCount).toBe(null);
}
});
it("handleDeliveryReport error", async () => {
const org = await cacheableData.organization.load(organizationId);
let campaign = await cacheableData.campaign.load(testCampaign.id, {
forceLoad: true
});
await cacheableData.campaignContact.loadMany(campaign, org, {});
queryLog = [];
const messageSid = "123123123";
await cacheableData.message.save({
contact: dbCampaignContact,
messageInstance: new Message({
campaign_contact_id: dbCampaignContact.id,
contact_number: dbCampaignContact.cell,
messageservice_sid: "fakeSid_MK123",
is_from_contact: false,
send_status: "SENT",
service: "twilio",
text: "some message",
user_id: testTexterUser.id,
service_id: messageSid
})
});
await handleDeliveryReport({
MessageSid: messageSid,
MessagingServiceSid: "fakeSid_MK123",
To: dbCampaignContact.cell,
MessageStatus: "failed",
From: "+14145551010",
ErrorCode: "98989"
});
const messages = await r.knex("message").where("service_id", messageSid);
expect(messages.length).toBe(1);
expect(messages[0].error_code).toBe(98989);
expect(messages[0].send_status).toBe("ERROR");
const contacts = await r
.knex("campaign_contact")
.where("id", dbCampaignContact.id);
expect(contacts.length).toBe(1);
expect(contacts[0].error_code).toBe(98989);
if (r.redis) {
campaign = await cacheableData.campaign.load(testCampaign.id);
expect(campaign.errorCount).toBe("1");
}
});
=======
it("orgs should have separate twilio credentials",
async () => {
const org1 = await cacheableData.organization.load(organizationId);
const org1Auth = await cacheableData.organization.getTwilioAuth(org1);
expect(org1Auth.authToken).toBeUndefined();
expect(org1Auth.accountSid).toBeUndefined();
const org2 = await cacheableData.organization.load(organizationId2);
const org2Auth = await cacheableData.organization.getTwilioAuth(org2);
expect(org2Auth.authToken).toBe("test_twlio_auth_token");
expect(org2Auth.accountSid).toBe("test_twilio_account_sid");
});
>>>>>>>
it("handleDeliveryReport delivered", async () => {
const org = await cacheableData.organization.load(organizationId);
let campaign = await cacheableData.campaign.load(testCampaign.id, {
forceLoad: true
});
await cacheableData.campaignContact.loadMany(campaign, org, {});
queryLog = [];
const messageSid = "123123123";
await cacheableData.message.save({
contact: dbCampaignContact,
messageInstance: new Message({
campaign_contact_id: dbCampaignContact.id,
contact_number: dbCampaignContact.cell,
messageservice_sid: "fakeSid_MK123",
is_from_contact: false,
send_status: "SENT",
service: "twilio",
text: "some message",
user_id: testTexterUser.id,
service_id: messageSid
})
});
await handleDeliveryReport({
MessageSid: messageSid,
MessagingServiceSid: "fakeSid_MK123",
To: dbCampaignContact.cell,
MessageStatus: "delivered",
From: "+14145551010"
});
const messages = await r.knex("message").where("service_id", messageSid);
expect(messages.length).toBe(1);
expect(messages[0].error_code).toBe(null);
expect(messages[0].send_status).toBe("DELIVERED");
const contacts = await r
.knex("campaign_contact")
.where("id", dbCampaignContact.id);
expect(contacts.length).toBe(1);
expect(contacts[0].error_code).toBe(null);
if (r.redis) {
campaign = await cacheableData.campaign.load(testCampaign.id);
expect(campaign.errorCount).toBe(null);
}
});
it("handleDeliveryReport error", async () => {
const org = await cacheableData.organization.load(organizationId);
let campaign = await cacheableData.campaign.load(testCampaign.id, {
forceLoad: true
});
await cacheableData.campaignContact.loadMany(campaign, org, {});
queryLog = [];
const messageSid = "123123123";
await cacheableData.message.save({
contact: dbCampaignContact,
messageInstance: new Message({
campaign_contact_id: dbCampaignContact.id,
contact_number: dbCampaignContact.cell,
messageservice_sid: "fakeSid_MK123",
is_from_contact: false,
send_status: "SENT",
service: "twilio",
text: "some message",
user_id: testTexterUser.id,
service_id: messageSid
})
});
await handleDeliveryReport({
MessageSid: messageSid,
MessagingServiceSid: "fakeSid_MK123",
To: dbCampaignContact.cell,
MessageStatus: "failed",
From: "+14145551010",
ErrorCode: "98989"
});
const messages = await r.knex("message").where("service_id", messageSid);
expect(messages.length).toBe(1);
expect(messages[0].error_code).toBe(98989);
expect(messages[0].send_status).toBe("ERROR");
const contacts = await r
.knex("campaign_contact")
.where("id", dbCampaignContact.id);
expect(contacts.length).toBe(1);
expect(contacts[0].error_code).toBe(98989);
if (r.redis) {
campaign = await cacheableData.campaign.load(testCampaign.id);
expect(campaign.errorCount).toBe("1");
}
});
it("orgs should have separate twilio credentials", async () => {
const org1 = await cacheableData.organization.load(organizationId);
const org1Auth = await cacheableData.organization.getTwilioAuth(org1);
expect(org1Auth.authToken).toBeUndefined();
expect(org1Auth.accountSid).toBeUndefined();
const org2 = await cacheableData.organization.load(organizationId2);
const org2Auth = await cacheableData.organization.getTwilioAuth(org2);
expect(org2Auth.authToken).toBe("test_twlio_auth_token");
expect(org2Auth.accountSid).toBe("test_twilio_account_sid");
}); |
<<<<<<<
export { default as Timeline } from './timeline'
=======
export { default as Transfer } from './transfer'
export { default as Switch } from './switch'
export { default as Rate } from './rate'
>>>>>>>
export { default as Timeline } from './timeline'
export { default as Transfer } from './transfer'
export { default as Switch } from './switch'
export { default as Rate } from './rate' |
<<<<<<<
<input type="text" onFocus={onFocus} onBlur={onBlur} readOnly className="hi-select__input-readOnly" />
=======
<input type="text" onKeyDown={handleKeyDown} onFocus={onFocus} readOnly />
>>>>>>>
<input type="text" onFocus={onFocus} readOnly className="hi-select__input-readOnly" /> |
<<<<<<<
// input 框内的显示的时间内容
texts: ['', ''],
placeholder: '',
=======
text: '',
rText: '',
leftPlaceholder: '',
rightPlaceholder: '',
>>>>>>>
// input 框内的显示的时间内容
texts: ['', ''],
placeholder: '',
rText: '',
leftPlaceholder: '',
rightPlaceholder: '',
<<<<<<<
{this._input(this.state.texts[0], 'input')}
=======
{this._input(this.state.text, 'input', this.state.leftPlaceholder)}
>>>>>>>
{this._input(this.state.texts[0], 'input', this.state.leftPlaceholder)}
<<<<<<<
{this._input(this.state.texts[1], 'rInput')}
=======
{this._input(this.state.rText, 'rInput', this.state.rightPlaceholder)}
>>>>>>>
{this._input(this.state.texts[1], 'rInput', this.state.rightPlaceholder)}
<<<<<<<
{this._input(this.state.texts[0], 'input')}
=======
{this._input(this.state.text, 'input', this.state.leftPlaceholder)}
>>>>>>>
{this._input(this.state.texts[0], 'input', this.state.leftPlaceholder)} |
<<<<<<<
import $$ from './tool.js'
import Provider from '../context'
=======
>>>>>>>
import Provider from '../context' |
<<<<<<<
// - erp.support(params) gives either an array of support elements
// - (for discrete distributions with finite support) or an object
// - with 'lower' and 'upper' properties (for continuous distributions
// - with bounded support).
// - erp.proposer is an erp for making mh proposals conditioned on the previous value
=======
// - erp.support() gives either an array of support elements (for
// discrete distributions with finite support) or an object with
// 'lower' and 'upper' properties (for continuous distributions with
// bounded support).
// - erp.grad(val) gives the gradient of score at val wrt params.
// - erp.driftKernel(prevVal) is an erp for making mh proposals
// conditioned on the previous value
//
// All erp should also satisfy the following:
//
// - All erp of a particular type should share the same set of
// parameters.
// - All erp constructors should take a single params object argument
// and store a reference to it as `this.params`. See `clone`.
>>>>>>>
// - erp.support() gives either an array of support elements (for
// discrete distributions with finite support) or an object with
// 'lower' and 'upper' properties (for continuous distributions with
// bounded support).
// - erp.driftKernel(prevVal) is an erp for making mh proposals
// conditioned on the previous value
//
// All erp should also satisfy the following:
//
// - All erp of a particular type should share the same set of
// parameters.
// - All erp constructors should take a single params object argument
// and store a reference to it as `this.params`. See `clone`.
<<<<<<<
=======
},
grad: function(val) {
//FIXME: check domain
return val ? [1 / this.params.p] : [-1 / this.params.p];
>>>>>>>
<<<<<<<
return ad.tensor.sumreduce(ad.tensor.sub(
ad.tensor.mul(x, logp),
ad.tensor.mul(xSub1, ad.tensor.log(ad.tensor.neg(pSub1)))
));
}
var mvBernoulliERP = new ERP({
sample: function(params) {
var p = params[0];
assert.ok(p.rank === 2);
assert.ok(p.dims[1] === 1);
var d = p.dims[0];
var x = new Tensor([d, 1]);
var n = x.length;
while (n--) {
x.data[n] = util.random() < p.data[n];
}
return x;
},
score: mvBernoulliScore,
isContinuous: false
});
var randomIntegerERP = new ERP({
sample: function(params) {
return Math.floor(util.random() * params[0]);
=======
var randomInteger = makeErpType({
name: 'randomInteger',
mixins: [finiteSupport],
sample: function() {
return Math.floor(util.random() * this.params.n);
>>>>>>>
return ad.tensor.sumreduce(ad.tensor.sub(
ad.tensor.mul(x, logp),
ad.tensor.mul(xSub1, ad.tensor.log(ad.tensor.neg(pSub1)))
));
}
var mvBernoulli = makeErpType({
name: 'mvBernoulli',
mixins: [finiteSupport],
sample: function() {
var p = ad.value(this.params.p);
assert.ok(p.rank === 2);
assert.ok(p.dims[1] === 1);
var d = p.dims[0];
var x = new Tensor([d, 1]);
var n = x.length;
while (n--) {
x.data[n] = util.random() < p.data[n];
}
return x;
},
score: function(x) {
return mvBernoulliScore(this.params.p, x);
}
});
var randomInteger = makeErpType({
name: 'randomInteger',
mixins: [finiteSupport],
sample: function() {
return Math.floor(util.random() * this.params.n);
<<<<<<<
var shape = params[0];
var scale = params[1];
var x = val;
return (shape - 1) * Math.log(x) - x / scale - Math.logGamma(shape) - shape * Math.log(scale);
=======
return (this.params.shape - 1) * Math.log(x) - x / this.params.scale - logGamma(this.params.shape) - this.params.shape * Math.log(this.params.scale);
>>>>>>>
var shape = this.params.shape;
var scale = this.params.scale;
return (shape - 1) * Math.log(x) - x / scale - Math.logGamma(shape) - shape * Math.log(scale);
<<<<<<<
support: function(params) {
var probs = params[0];
var k = params[1];
var combinations = allDiscreteCombinations(k, probs, [], 0); // support of repeat(k, discrete(probs))
var toHist = function(l){ return buildHistogramFromCombinations(l, probs); };
=======
support: function() {
// support of repeat(n, discrete(ps))
var combinations = allDiscreteCombinations(this.params.n, this.params.ps, [], 0);
var toHist = function(l) { return buildHistogramFromCombinations(l, this.params.ps); }.bind(this);
>>>>>>>
support: function() {
// support of repeat(n, discrete(ps))
var combinations = allDiscreteCombinations(this.params.n, this.params.ps, [], 0);
var toHist = function(l) { return buildHistogramFromCombinations(l, this.params.ps); }.bind(this);
<<<<<<<
function dirichletSample(params) {
var alpha = params[0];
assert.ok(alpha.rank === 2);
assert.ok(alpha.dims[1] === 1); // i.e. vector
var d = alpha.dims[0];
=======
function dirichletSample(alpha) {
>>>>>>>
function dirichletSample(alpha) {
assert.ok(alpha.rank === 2);
assert.ok(alpha.dims[1] === 1); // i.e. vector
var d = alpha.dims[0];
<<<<<<<
for (var i = 0; i < d; i++) {
t = gammaSample([alpha.data[i], 1]);
theta.data[i] = t;
ssum += t;
=======
for (var i = 0; i < alpha.length; i++) {
t = gammaSample(alpha[i], 1);
theta[i] = t;
ssum = ssum + t;
>>>>>>>
for (var i = 0; i < d; i++) {
t = gammaSample(alpha.data[i], 1);
theta.data[i] = t;
ssum += t;
<<<<<<<
multinomialSample: multinomialSample,
multivariateGaussianERP: multivariateGaussianERP,
diagCovGaussianERP: diagCovGaussianERP,
matrixGaussianERP: matrixGaussianERP,
logisticNormalERP: logisticNormalERP,
logistic: logistic,
cauchyERP: cauchyERP,
poissonERP: poissonERP,
randomIntegerERP: randomIntegerERP,
uniformERP: uniformERP,
makeMarginalERP: makeMarginalERP,
makeCategoricalERP: makeCategoricalERP,
makeMultiplexERP: makeMultiplexERP,
gaussianDriftERP: gaussianDriftERP,
dirichletDriftERP: dirichletDriftERP,
gaussianProposerERP: gaussianProposerERP,
dirichetProposerERP: dirichletProposerERP,
=======
gaussianSample: gaussianSample,
gammaSample: gammaSample,
// helpers
serialize: serialize,
deserialize: deserialize,
withImportanceDist: withImportanceDist,
>>>>>>>
gaussianSample: gaussianSample,
gammaSample: gammaSample,
// helpers
serialize: serialize,
deserialize: deserialize,
withImportanceDist: withImportanceDist,
logistic: logistic, |
<<<<<<<
function gaussianProposalParams(params, prevVal) {
var mu = prevVal;
var sigma = params[1] * 0.7;
return [mu, sigma];
}
function dirichletProposalParams(params, prevVal) {
var concentration = 0.1; // TODO: choose the right parameters.
var driftParams = params.map(function(x) {return concentration * x});
return driftParams;
}
function buildProposer(baseERP, getProposalParams) {
return new ERP(
function sample(params) {
var baseParams = params[0];
var prevVal = params[1];
var proposalParams = getProposalParams(baseParams, prevVal);
return baseERP.sample(proposalParams);
},
function score(params, val) {
var baseParams = params[0];
var prevVal = params[1];
var proposalParams = getProposalParams(baseParams, prevVal);
return baseERP.score(proposalParams, val);
}
);
}
var gaussianProposer = buildProposer(gaussianERP, gaussianProposalParams);
var dirichletProposer = buildProposer(dirichletERP, dirichletProposalParams);
var gaussianDriftERP = new ERP(
gaussianERP.sample,
gaussianERP.score,
{ proposer: gaussianProposer });
var dirichletDriftERP = new ERP(
dirichletERP.sample,
dirichletERP.score,
{ proposer: dirichletProposer });
=======
function isErp(x) {
return x && _.isFunction(x.score) && _.isFunction(x.sample);
}
function isErpWithSupport(x) {
return isErp(x) && _.isFunction(x.support);
}
>>>>>>>
function gaussianProposalParams(params, prevVal) {
var mu = prevVal;
var sigma = params[1] * 0.7;
return [mu, sigma];
}
function dirichletProposalParams(params, prevVal) {
var concentration = 0.1; // TODO: choose the right parameters.
var driftParams = params.map(function(x) {return concentration * x});
return driftParams;
}
function buildProposer(baseERP, getProposalParams) {
return new ERP(
function sample(params) {
var baseParams = params[0];
var prevVal = params[1];
var proposalParams = getProposalParams(baseParams, prevVal);
return baseERP.sample(proposalParams);
},
function score(params, val) {
var baseParams = params[0];
var prevVal = params[1];
var proposalParams = getProposalParams(baseParams, prevVal);
return baseERP.score(proposalParams, val);
}
);
}
var gaussianProposer = buildProposer(gaussianERP, gaussianProposalParams);
var dirichletProposer = buildProposer(dirichletERP, dirichletProposalParams);
var gaussianDriftERP = new ERP(
gaussianERP.sample,
gaussianERP.score,
{ proposer: gaussianProposer });
var dirichletDriftERP = new ERP(
dirichletERP.sample,
dirichletERP.score,
{ proposer: dirichletProposer });
function isErp(x) {
return x && _.isFunction(x.score) && _.isFunction(x.sample);
}
function isErpWithSupport(x) {
return isErp(x) && _.isFunction(x.support);
}
<<<<<<<
makeMultiplexERP: makeMultiplexERP,
gaussianDriftERP: gaussianDriftERP,
dirichletDriftERP: dirichletDriftERP
=======
makeMultiplexERP: makeMultiplexERP,
isErp: isErp,
isErpWithSupport: isErpWithSupport
>>>>>>>
makeMultiplexERP: makeMultiplexERP,
gaussianDriftERP: gaussianDriftERP,
dirichletDriftERP: dirichletDriftERP,
isErp: isErp,
isErpWithSupport: isErpWithSupport |
<<<<<<<
var gaussianERP = new ERP(
function gaussianSample(params){
var mu = params[0];
var sigma = params[1];
var u, v, x, y, q;
do {
u = 1 - Math.random();
v = 1.7156 * (Math.random() - .5);
x = u - 0.449871;
y = Math.abs(v) + 0.386595;
q = x*x + y*(0.196*y - 0.25472*x);
} while(q >= 0.27597 && (q > 0.27846 || v*v > -4 * u * u * Math.log(u)))
return mu + sigma*v/u;
},
function gaussianScore(params, x){
var mu = params[0];
var sigma = params[1];
return -.5*(1.8378770664093453 + 2*Math.log(sigma) + (x - mu)*(x - mu)/(sigma*sigma));
}
);
=======
var discreteERP = new ERP(
function discreteSample(params){return multinomialSample(params[0])},
function discreteScore(params, val) {
var probs = params[0];
var stop = probs.length;
var inSupport = (val == Math.floor(val)) && (0 <= val) && (val < stop);
return inSupport ? Math.log(probs[val]) : -Infinity;
},
function discreteSupport(params) {
return _.range(params[0].length);
}
);
>>>>>>>
var gaussianERP = new ERP(
function gaussianSample(params){
var mu = params[0];
var sigma = params[1];
var u, v, x, y, q;
do {
u = 1 - Math.random();
v = 1.7156 * (Math.random() - .5);
x = u - 0.449871;
y = Math.abs(v) + 0.386595;
q = x*x + y*(0.196*y - 0.25472*x);
} while(q >= 0.27597 && (q > 0.27846 || v*v > -4 * u * u * Math.log(u)))
return mu + sigma*v/u;
},
function gaussianScore(params, x){
var mu = params[0];
var sigma = params[1];
return -.5*(1.8378770664093453 + 2*Math.log(sigma) + (x - mu)*(x - mu)/(sigma*sigma));
}
);
var discreteERP = new ERP(
function discreteSample(params){return multinomialSample(params[0])},
function discreteScore(params, val) {
var probs = params[0];
var stop = probs.length;
var inSupport = (val == Math.floor(val)) && (0 <= val) && (val < stop);
return inSupport ? Math.log(probs[val]) : -Infinity;
},
function discreteSupport(params) {
return _.range(params[0].length);
}
);
<<<<<<<
gaussianERP: gaussianERP,
=======
discreteERP: discreteERP,
>>>>>>>
gaussianERP: gaussianERP,
discreteERP: discreteERP, |
<<<<<<<
var paramStruct = require('../paramStruct');
var guide = require('../guide');
=======
>>>>>>>
var guide = require('../guide');
<<<<<<<
importance: 'default',
onlyMAP: false,
params: {}
=======
ignoreGuide: false,
onlyMAP: false
>>>>>>>
importance: 'default',
onlyMAP: false |
<<<<<<<
importance: 'default',
=======
ignoreGuide: false,
onlyMAP: false,
>>>>>>>
importance: 'default',
onlyMAP: false,
<<<<<<<
this.importanceOpt = options.importance;
=======
this.ignoreGuide = options.ignoreGuide;
this.onlyMAP = options.onlyMAP;
>>>>>>>
this.importanceOpt = options.importance;
this.onlyMAP = options.onlyMAP;
<<<<<<<
var val = this.adRequired && dist.isContinuous ? ad.lift(_val) : _val;
// Optimization: Choices are not required for PF without rejuvenation.
if (this.performRejuv || this.saveTraces) {
particle.trace.addChoice(dist, val, a, s, k, options);
}
return k(s, val);
}.bind(this));
=======
var val = this.adRequired && dist.isContinuous ? ad.lift(_val) : _val;
// Optimization: Choices are not required for PF without rejuvenation.
if (this.performRejuv || this.saveTraces) {
particle.trace.addChoice(dist, val, a, s, k, options);
} else {
particle.trace.score = ad.scalar.add(particle.trace.score, choiceScore);
}
return k(s, val);
>>>>>>>
var val = this.adRequired && dist.isContinuous ? ad.lift(_val) : _val;
// Optimization: Choices are not required for PF without rejuvenation.
if (this.performRejuv || this.saveTraces) {
particle.trace.addChoice(dist, val, a, s, k, options);
} else {
particle.trace.score = ad.scalar.add(particle.trace.score, choiceScore);
}
return k(s, val);
}.bind(this)); |
<<<<<<<
return assembleAnswerOptions(allSteps)
=======
.orderBy('id')
>>>>>>>
.orderBy('id')
return assembleAnswerOptions(allSteps) |
<<<<<<<
env.sample = function(s, k, a, erp, options) {
return env.coroutine.sample(s, k, a, erp, options);
=======
env.sample = function(s, k, a, dist) {
if (!dists.isDist(dist)) {
throw 'sample() expected a distribution but received \"' + JSON.stringify(dist) + '\".';
}
return env.coroutine.sample(s, k, a, dist);
>>>>>>>
env.sample = function(s, k, a, dist, options) {
if (!dists.isDist(dist)) {
throw 'sample() expected a distribution but received \"' + JSON.stringify(dist) + '\".';
}
return env.coroutine.sample(s, k, a, dist, options);
<<<<<<<
nn: nn,
T: ad.tensor,
erp: erp
=======
dists: dists
>>>>>>>
nn: nn,
T: ad.tensor,
dists: dists |
<<<<<<<
const layout = new Layout1d({itemSize: {height: 50}});
// render(
// html`${scroller({
// items,
// template: (item, idx) => html`
// <section><div class="title">${idx} - ${item.name}</div></section>
// `,
// layout,
// })}`,
// container);
=======
const layout = new Layout({itemSize: {height: 50}});
>>>>>>>
const layout = new Layout1d({itemSize: {height: 50}}); |
<<<<<<<
import {VirtualScroller} from '../../src/VirtualScroller.js';
import {Layout1d} from '../../src/layouts/Layout1d.js';
import {scroller} from '../../lit-html/lit-scroller.js';
import {html, render} from '../../node_modules/lit-html/lib/lit-extended.js';
=======
import Layout from '../../layouts/layout-1d.js';
import {VirtualScroller} from '../../virtual-scroller.js';
>>>>>>>
import {VirtualScroller} from '../../src/VirtualScroller.js';
import {Layout1d} from '../../src/layouts/Layout1d.js'; |
<<<<<<<
import postcss from '../transforms/postcss'
import { debounce, resolveModule } from '../../utils/common'
=======
import resolve from 'resolve'
import { debounce } from '../../utils/common'
>>>>>>>
import resolve from 'resolve'
import postcss from '../transforms/postcss'
import { debounce } from '../../utils/common' |
<<<<<<<
// import cssModulesify from 'css-modulesify'
import stylus from 'stylus'
import nib from 'nib'
=======
>>>>>>>
import stylus from 'stylus'
import nib from 'nib' |
<<<<<<<
entry: {
app: path.join(__dirname, './src/client/index.js')
},
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/'
},
mode: process.env.NODE_ENV,
module: {
rules: [
{
test: /\.jsx?/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['@babel/env', '@babel/react'],
}
},
{
test: /\.scss$/,
exclude: /node_modules/,
use: [
// style-loader
{ loader: 'style-loader' },
// css-loader
{loader: 'css-loader'},
// sass-loader
{ loader: 'sass-loader' }
]
},
{
test: /\.css$/,
use: [
{ loader: 'style-loader' },
// css-loader
{loader: 'css-loader'},
]
}
]
}
,
devServer: {
publicPath: 'http://localhost:8080/build',
historyApiFallback: true,
// compress: true,
// port: 8080,
contentBase: path.join(__dirname, "./src/assets"),
proxy: {
'/':'http://localhost:3000'
}
=======
entry: {
app: path.join(__dirname, './src/client/index.js'),
},
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/',
},
mode: process.env.NODE_ENV,
module: {
rules: [
{
test: /\.jsx?/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['@babel/env', '@babel/react'],
plugins: ['@babel/plugin-transform-runtime', '@babel/transform-async-to-generator'],
},
},
{
test: /\.scss$/,
exclude: /node_modules/,
use: [
// style-loader
{ loader: 'style-loader' },
// css-loader
{ loader: 'css-loader' },
// sass-loader
{ loader: 'sass-loader' },
],
>>>>>>>
entry: {
app: path.join(__dirname, './src/client/index.js'),
},
output: {
path: path.resolve(__dirname, 'build'),
filename: 'bundle.js',
publicPath: '/',
},
mode: process.env.NODE_ENV,
module: {
rules: [
{
test: /\.jsx?/,
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['@babel/env', '@babel/react'],
},
},
{
test: /\.scss$/,
exclude: /node_modules/,
use: [
// style-loader
{ loader: 'style-loader' },
// css-loader
{ loader: 'css-loader' },
// sass-loader
{ loader: 'sass-loader' },
], |
<<<<<<<
const { closeOnBackdropClick } = this.props;
if (
!event.target.classList.contains(className('view')) ||
!closeOnBackdropClick
)
return;
=======
if ( !this.props.closeOnBackdropClick ) return;
>>>>>>>
if ( !this.props.closeOnBackdropClick ) return;
if (
!event.target.classList.contains(className('view')) ||
!closeOnBackdropClick
)
return; |
<<<<<<<
Boost,
=======
Promote,
>>>>>>>
Boost,
Promote,
<<<<<<<
[ROUTES.SCREENS.BOOST]: {
screen: Boost,
navigationOptions: {
header: () => null,
},
},
=======
[ROUTES.SCREENS.PROMOTE]: {
screen: RootComponent()(Promote),
navigationOptions: {
header: () => null,
},
},
>>>>>>>
[ROUTES.SCREENS.BOOST]: {
screen: Boost,
navigationOptions: {
header: () => null,
},
},
[ROUTES.SCREENS.PROMOTE]: {
screen: RootComponent()(Promote),
navigationOptions: {
header: () => null,
},
}, |
<<<<<<<
isConnected: state.application.isConnected,
=======
nav: state.nav.routes,
>>>>>>>
isConnected: state.application.isConnected,
nav: state.nav.routes, |
<<<<<<<
const { menuItems, isAddAccountIconActive } = this.state;
const { buildVersion, appVersion } = VersionNumber;
=======
const { menuItems, isAddAccountIconActive, storageT } = this.state;
const { version } = PackageJson;
const { buildVersion } = VersionNumber;
>>>>>>>
const { menuItems, isAddAccountIconActive, storageT } = this.state;
const { buildVersion, appVersion } = VersionNumber;
<<<<<<<
<Text style={styles.versionText}>{`v${appVersion}, ${buildVersion}`}</Text>
=======
<Text style={styles.versionText}>{`v${version}, ${buildVersion}${storageT}`}</Text>
>>>>>>>
<Text style={styles.versionText}>{`v${appVersion}, ${buildVersion}${storageT}`}</Text> |
<<<<<<<
import ProfileEdit from './profileEdit/screen/profileEditScreen';
=======
import Redeem from './redeem/screen/redeemScreen';
>>>>>>>
import ProfileEdit from './profileEdit/screen/profileEditScreen';
import Redeem from './redeem/screen/redeemScreen';
<<<<<<<
ProfileEdit,
Promote,
Reblogs,
=======
>>>>>>>
ProfileEdit,
Reblogs,
<<<<<<<
=======
Reblogs,
Redeem,
>>>>>>>
Redeem, |
<<<<<<<
console.log(res);
getUserData().then((userData) => {
if (userData.length > 0) {
realmData = userData;
userData.forEach((accountData) => {
dispatch(
addOtherAccount({ username: accountData.username }),
);
});
}
});
=======
if (authStatus.isLoggedIn) {
getUserData().then((userData) => {
if (userData.length > 0) {
realmData = userData;
userData.forEach((accountData) => {
dispatch(
addOtherAccount({ username: accountData.username }),
);
});
}
});
}
>>>>>>>
getUserData().then((userData) => {
if (userData.length > 0) {
realmData = userData;
userData.forEach((accountData) => {
dispatch(
addOtherAccount({ username: accountData.username }),
);
});
}
}); |
<<<<<<<
export async function runDatabaseMigrations(event, context, eventCallback) {
=======
export async function updateOptOuts(event, awsContext) {
// Especially for auto-optouts, campaign_contact.is_opted_out is not
// always updated and depends on this batch job to run
// We avoid it in-process to avoid db-write thrashing on optouts
// so they don't appear in queries
await cacheableData.optOut.updateIsOptedOuts(query =>
query
.join("opt_out", {
"opt_out.cell": "campaign_contact.cell",
...(!process.env.OPTOUTS_SHARE_ALL_ORGS
? { "opt_out.organization_id": "campaign.organization_id" }
: {})
})
.where(
"opt_out.created_at",
">",
new Date(
new Date() - ((event && event.milliseconds_past) || 1000 * 60 * 60) // default 1 hour back
)
)
);
}
export async function runDatabaseMigrations(event, dispatcher, eventCallback) {
>>>>>>>
export async function updateOptOuts(event, context, eventCallback) {
// Especially for auto-optouts, campaign_contact.is_opted_out is not
// always updated and depends on this batch job to run
// We avoid it in-process to avoid db-write thrashing on optouts
// so they don't appear in queries
await cacheableData.optOut.updateIsOptedOuts(query =>
query
.join("opt_out", {
"opt_out.cell": "campaign_contact.cell",
...(!process.env.OPTOUTS_SHARE_ALL_ORGS
? { "opt_out.organization_id": "campaign.organization_id" }
: {})
})
.where(
"opt_out.created_at",
">",
new Date(
new Date() - ((event && event.milliseconds_past) || 1000 * 60 * 60) // default 1 hour back
)
)
);
}
export async function runDatabaseMigrations(event, context, eventCallback) { |
<<<<<<<
getUserDataWithUsername(currentAccount.name).then(realmData => {
const _currentAccount = currentAccount;
_currentAccount.username = _currentAccount.name;
[_currentAccount.local] = realmData;
dispatch(updateCurrentAccount({ ..._currentAccount }));
dispatch(closePinCodeModal());
if (callback) callback(pin, oldPinCode);
if (navigateTo) {
const navigateAction = NavigationActions.navigate({
routeName: navigateTo,
params: navigateParams,
action: NavigationActions.navigate({ routeName: navigateTo }),
});
dispatch(navigateAction);
}
});
=======
const realmData = getUserDataWithUsername(currentAccount.name);
const _currentAccount = currentAccount;
_currentAccount.username = _currentAccount.name;
[_currentAccount.local] = realmData;
dispatch(updateCurrentAccount({ ..._currentAccount }));
dispatch(closePinCodeModal());
if (callback) callback(pin, oldPinCode);
if (navigateTo) {
NavigationService.navigate({
routeName: navigateTo,
params: navigateParams,
});
}
>>>>>>>
getUserDataWithUsername(currentAccount.name).then(realmData => {
const _currentAccount = currentAccount;
_currentAccount.username = _currentAccount.name;
[_currentAccount.local] = realmData;
dispatch(updateCurrentAccount({ ..._currentAccount }));
dispatch(closePinCodeModal());
if (callback) callback(pin, oldPinCode);
if (navigateTo) {
NavigationService.navigate({
routeName: navigateTo,
params: navigateParams,
});
}
}); |
<<<<<<<
isLoading: true,
navigationParams: {},
=======
isLoading: true,
>>>>>>>
isLoading: true,
navigationParams: {},
<<<<<<<
this.fetchInterval = setInterval(this._fetchuserPointActivities, 6 * 60 * 1000);
}
if (get(navigation, 'state.params', null)) {
const navigationParams = get(navigation, 'state.params');
this.setState({ navigationParams });
=======
this.fetchInterval = setInterval(this._fetchuserPointActivities, 6 * 60 * 1000);
>>>>>>>
this.fetchInterval = setInterval(this._fetchuserPointActivities, 6 * 60 * 1000);
}
if (get(navigation, 'state.params', null)) {
const navigationParams = get(navigation, 'state.params');
this.setState({ navigationParams });
<<<<<<<
((nextProps.activeBottomTab === ROUTES.TABBAR.POINTS && _username) ||
(_username !== username && _username))
=======
((nextProps.activeBottomTab === ROUTES.TABBAR.POINTS && nextProps.username) ||
(nextProps.username !== username && nextProps.username))
>>>>>>>
((nextProps.activeBottomTab === ROUTES.TABBAR.POINTS && _username) ||
(_username !== username && _username))
<<<<<<<
dispatch(
openPinCodeModal({
navigateTo,
navigateParams,
}),
);
=======
if (isPinCodeOpen) {
dispatch(
openPinCodeModal({
navigateTo,
navigateParams,
}),
);
} else {
navigation.navigate({
routeName: navigateTo,
params: navigateParams,
});
}
>>>>>>>
if (isPinCodeOpen) {
dispatch(
openPinCodeModal({
navigateTo,
navigateParams,
}),
);
} else {
navigation.navigate({
routeName: navigateTo,
params: navigateParams,
});
}
<<<<<<<
=======
dispatch(toastNotification(intl.formatMessage({ id: 'alert.successful' })));
>>>>>>>
<<<<<<<
=======
balance,
>>>>>>>
<<<<<<<
=======
handleOnPressTransfer: this._handleOnPressTransfer,
balance,
getUserBalance: this._getUserBalance,
promote: this._promote,
getAccount,
getUserDataWithUsername,
>>>>>>>
handleOnPressTransfer: this._handleOnPressTransfer,
balance,
getUserBalance: this._getUserBalance,
promote: this._promote,
getAccount,
getUserDataWithUsername,
<<<<<<<
pinCode: state.application.pin,
=======
pinCode: state.account.pin,
isPinCodeOpen: state.application.isPinCodeOpen,
>>>>>>>
pinCode: state.account.pin,
isPinCodeOpen: state.application.isPinCodeOpen, |
<<<<<<<
<Fragment>
<View style={styles.container}>
<SearchInput
onChangeText={text => console.log('text :', text)}
handleOnModalClose={navigationGoBack}
placeholder={`#${tag}`}
editable={false}
autoFocus={false}
/>
<ScrollableTabView
style={globalStyles.tabView}
renderTabBar={() => (
<TabBar
style={styles.tabbar}
tabUnderlineDefaultWidth={80}
tabUnderlineScaleX={2}
tabBarPosition="overlayTop"
/>
)}
=======
<View style={styles.container}>
<SearchInput
onChangeText={() => {}}
handleOnModalClose={navigationGoBack}
placeholder={tag}
editable={false}
/>
<ScrollableTabView
style={globalStyles.tabView}
renderTabBar={() => (
<TabBar
style={styles.tabbar}
tabUnderlineDefaultWidth={80}
tabUnderlineScaleX={2}
tabBarPosition="overlayTop"
/>
)}
>
<View
tabLabel={intl.formatMessage({
id: 'search.posts',
})}
style={styles.tabbarItem}
>>>>>>>
<View style={styles.container}>
<SearchInput
onChangeText={() => {}}
handleOnModalClose={navigationGoBack}
placeholder={`#${tag}`}
editable={false}
/>
<ScrollableTabView
style={globalStyles.tabView}
renderTabBar={() => (
<TabBar
style={styles.tabbar}
tabUnderlineDefaultWidth={80}
tabUnderlineScaleX={2}
tabBarPosition="overlayTop"
/>
)}
>
<View
tabLabel={intl.formatMessage({
id: 'search.posts',
})}
style={styles.tabbarItem} |
<<<<<<<
async componentDidMount() {
await getAuthStatus()
.then(result => {
if (result === true) {
goToAuthScreens();
} else {
goToNoAuthScreens();
}
})
.catch(() => {
goToAuthScreens();
});
}
=======
async componentDidMount() {
await getAuthStatus()
.then(result => {
if (result) {
goToAuthScreens();
} else {
goToNoAuthScreens();
}
})
.catch(error => {
console.log(error);
goToAuthScreens();
});
}
>>>>>>>
async componentDidMount() {
await getAuthStatus()
.then(result => {
if (result) {
goToAuthScreens();
} else {
goToNoAuthScreens();
}
})
.catch(() => {
goToAuthScreens();
});
} |
<<<<<<<
import {
Splash, Login, PinCode, SteemConnect,
} from '../screens';
=======
import {
Editor, Login, PinCode, Splash,
} from '../screens';
>>>>>>>
import {
Splash, Login, PinCode, SteemConnect, Editor,
} from '../screens';
<<<<<<<
[ROUTES.SCREENS.STEEM_CONNECT]: { screen: SteemConnect },
[ROUTES.DRAWER.MAIN]: mainNavigation,
=======
[ROUTES.SCREENS.SPLASH]: { screen: Splash },
>>>>>>>
[ROUTES.SCREENS.STEEM_CONNECT]: { screen: SteemConnect },
[ROUTES.SCREENS.SPLASH]: { screen: Splash }, |
<<<<<<<
=======
>>>>>>> |
<<<<<<<
refreshControl = () => {
const { fetchUserActivity, refreshing, isDarkTheme } = this.props;
return (
<RefreshControl
refreshing={refreshing}
onRefresh={fetchUserActivity}
progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
);
}
_renderLoading = () => {
const { isLoading, intl } = this.props;
if (isLoading) {
return <ListPlaceHolder />;
}
return <Text style={styles.subText}>{intl.formatMessage({ id: 'points.no_activity' })}</Text>;
}
render() {
const {
claimPoints, intl, isClaiming, userActivities, userPoints,
} = this.props;
// TODO: this feature temporarily closed.
const isActiveIcon = false;
return (
<Fragment>
<LineBreak height={12} />
<ScrollView
style={styles.scrollContainer}
refreshControl={this.refreshControl()}
>
<Text style={styles.pointText}>{userPoints.points}</Text>
<Text style={styles.subText}>eSteem Points</Text>
{userPoints.unclaimed_points > 0
&& (
<MainButton
isLoading={isClaiming}
isDisable={isClaiming}
style={styles.mainButton}
height={50}
onPress={() => claimPoints()}
>
<View style={styles.mainButtonWrapper}>
<Text style={styles.unclaimedText}>{userPoints.unclaimed_points}</Text>
<View style={styles.mainIconWrapper}>
<Icon name="add" iconType="MaterialIcons" color="#357ce6" size={23} />
</View>
</View>
</MainButton>
)
}
<View style={styles.iconsWrapper}>
<FlatList
style={styles.iconsList}
data={POINTS_KEYS}
horizontal
renderItem={({ item }) => (
<PopoverController key={item.type}>
{({
openPopover, closePopover, popoverVisible, setPopoverAnchor, popoverAnchorRect,
}) => (
<View styles={styles.iconWrapper} key={item.type}>
<View style={styles.iconWrapper}>
<TouchableOpacity
ref={setPopoverAnchor}
onPress={openPopover}
>
<IconButton
iconStyle={styles.icon}
style={styles.iconButton}
iconType={POINTS[item.type].iconType}
name={POINTS[item.type].icon}
badgeCount={POINTS[item.type].point}
badgeStyle={styles.badge}
badgeTextStyle={styles.badgeText}
disabled
/>
</TouchableOpacity>
</View>
<Text style={styles.subText}>
{intl.formatMessage({ id: POINTS[item.type].nameKey })}
</Text>
<Popover
backgroundStyle={styles.overlay}
contentStyle={styles.popoverDetails}
arrowStyle={styles.arrow}
visible={popoverVisible}
onClose={() => {
closePopover();
}}
fromRect={popoverAnchorRect}
placement="top"
supportedOrientations={['portrait', 'landscape']}
>
<View style={styles.popoverWrapper}>
<Text style={styles.popoverText}>
{intl.formatMessage({ id: POINTS[item.type].descriptionKey })}
</Text>
</View>
</Popover>
</View>
)}
</PopoverController>
)}
/>
</View>
<View style={styles.listWrapper}>
{!userActivities
? this._renderLoading()
: (
<FlatList
data={userActivities}
renderItem={({ item, index }) => (
<WalletLineItem
key={item.id.toString()}
index={index + 1}
text={intl.formatMessage({ id: item.textKey })}
description={getTimeFromNow(item.created)}
isCircleIcon
isThin
isBlackText
iconName={item.icon}
iconType={item.iconType}
rightText={`${item.amount} ESTM`}
/>
)}
/>
)
}
</View>
</ScrollView>
</Fragment>
);
}
=======
refreshControl = () => {
const { fetchUserActivity, refreshing, isDarkTheme } = this.props;
return (
<RefreshControl
refreshing={refreshing}
onRefresh={fetchUserActivity}
progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
);
};
render() {
const {
userActivities,
userPoints,
intl,
isClaiming,
claimPoints,
} = this.props;
return (
<Fragment>
<LineBreak height={12} />
<ScrollView
style={styles.scrollContainer}
refreshControl={this.refreshControl()}
>
<Text style={styles.pointText}>{userPoints.points}</Text>
<Text style={styles.subText}>eSteem Points</Text>
{get(userPoints, 'unclaimed_points') > 0 && (
<MainButton
isLoading={isClaiming}
isDisable={isClaiming}
style={styles.mainButton}
height={50}
onPress={() => claimPoints()}
>
<View style={styles.mainButtonWrapper}>
<Text style={styles.unclaimedText}>
{userPoints.unclaimed_points}
</Text>
<View style={styles.mainIconWrapper}>
<Icon
name="add"
iconType="MaterialIcons"
color="#357ce6"
size={23}
/>
</View>
</View>
</MainButton>
)}
<View style={styles.iconsWrapper}>
<FlatList
style={styles.iconsList}
data={POINTS_KEYS}
horizontal
keyExtractor={(item, index) => (item.type + index).toString()}
renderItem={({ item }) => (
<PopoverController>
{({
openPopover,
closePopover,
popoverVisible,
setPopoverAnchor,
popoverAnchorRect,
}) => (
<View styles={styles.iconWrapper}>
<View style={styles.iconWrapper}>
<TouchableOpacity
ref={setPopoverAnchor}
onPress={openPopover}
>
<IconButton
iconStyle={styles.icon}
style={styles.iconButton}
iconType={POINTS[item.type].iconType}
name={POINTS[item.type].icon}
badgeCount={POINTS[item.type].point}
badgeStyle={styles.badge}
badgeTextStyle={styles.badgeText}
disabled
/>
</TouchableOpacity>
</View>
<Text style={styles.subText}>
{intl.formatMessage({ id: POINTS[item.type].nameKey })}
</Text>
<Popover
backgroundStyle={styles.overlay}
contentStyle={styles.popoverDetails}
arrowStyle={styles.arrow}
visible={popoverVisible}
onClose={() => {
closePopover();
}}
fromRect={popoverAnchorRect}
placement="top"
supportedOrientations={['portrait', 'landscape']}
>
<View style={styles.popoverWrapper}>
<Text style={styles.popoverText}>
{intl.formatMessage({
id: POINTS[item.type].descriptionKey,
})}
</Text>
</View>
</Popover>
</View>
)}
</PopoverController>
)}
/>
</View>
<View style={styles.listWrapper}>
{size(userActivities) < 1 ? (
<Text style={styles.subText}>
{intl.formatMessage({ id: 'points.no_activity' })}
</Text>
) : (
<FlatList
data={userActivities}
keyExtractor={item => item.id.toString()}
renderItem={({ item, index }) => (
<WalletLineItem
index={index + 1}
text={intl.formatMessage({ id: item.textKey })}
description={getTimeFromNow(get(item, 'created'))}
isCircleIcon
isThin
isBlackText
iconName={get(item, 'icon')}
iconType={get(item, 'iconType')}
rightText={`${get(item, 'amount')} ESTM`}
/>
)}
/>
)}
</View>
</ScrollView>
</Fragment>
);
}
>>>>>>>
refreshControl = () => {
const { fetchUserActivity, refreshing, isDarkTheme } = this.props;
return (
<RefreshControl
refreshing={refreshing}
onRefresh={fetchUserActivity}
progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
);
}
_renderLoading = () => {
const { isLoading, intl } = this.props;
if (isLoading) {
return <ListPlaceHolder />;
}
return <Text style={styles.subText}>{intl.formatMessage({ id: 'points.no_activity' })}</Text>;
}
render() {
const {
claimPoints, intl, isClaiming, userActivities, userPoints,
} = this.props;
return (
<Fragment>
<LineBreak height={12} />
<ScrollView
style={styles.scrollContainer}
refreshControl={this.refreshControl()}
>
<Text style={styles.pointText}>{userPoints.points}</Text>
<Text style={styles.subText}>eSteem Points</Text>
{userPoints.unclaimed_points > 0
&& (
<MainButton
isLoading={isClaiming}
isDisable={isClaiming}
style={styles.mainButton}
height={50}
onPress={() => claimPoints()}
>
<View style={styles.mainButtonWrapper}>
<Text style={styles.unclaimedText}>{userPoints.unclaimed_points}</Text>
<View style={styles.mainIconWrapper}>
<Icon name="add" iconType="MaterialIcons" color="#357ce6" size={23} />
</View>
</View>
</MainButton>
)
}
<View style={styles.iconsWrapper}>
<FlatList
style={styles.iconsList}
data={POINTS_KEYS}
horizontal
renderItem={({ item }) => (
<PopoverController key={item.type}>
{({
openPopover, closePopover, popoverVisible, setPopoverAnchor, popoverAnchorRect,
}) => (
<View styles={styles.iconWrapper} key={item.type}>
<View style={styles.iconWrapper}>
<TouchableOpacity
ref={setPopoverAnchor}
onPress={openPopover}
>
<IconButton
iconStyle={styles.icon}
style={styles.iconButton}
iconType={POINTS[item.type].iconType}
name={POINTS[item.type].icon}
badgeCount={POINTS[item.type].point}
badgeStyle={styles.badge}
badgeTextStyle={styles.badgeText}
disabled
/>
</TouchableOpacity>
</View>
<Text style={styles.subText}>
{intl.formatMessage({ id: POINTS[item.type].nameKey })}
</Text>
<Popover
backgroundStyle={styles.overlay}
contentStyle={styles.popoverDetails}
arrowStyle={styles.arrow}
visible={popoverVisible}
onClose={() => {
closePopover();
}}
fromRect={popoverAnchorRect}
placement="top"
supportedOrientations={['portrait', 'landscape']}
>
<View style={styles.popoverWrapper}>
<Text style={styles.popoverText}>
{intl.formatMessage({ id: POINTS[item.type].descriptionKey })}
</Text>
</View>
</Popover>
</View>
)}
</PopoverController>
)}
/>
</View>
<View style={styles.listWrapper}>
{!userActivities
? this._renderLoading()
: (
<FlatList
data={userActivities}
keyExtractor={item => item.id.toString()}
renderItem={({ item, index }) => (
<WalletLineItem
index={index + 1}
text={intl.formatMessage({ id: item.textKey })}
description={getTimeFromNow(get(item, 'created'))}
isCircleIcon
isThin
isBlackText
iconName={get(item, 'icon')}
iconType={get(item, 'iconType')}
rightText={`${get(item, 'amount')} ESTM`}
/>
)}
/>
)
}
</View>
</ScrollView>
</Fragment>
);
} |
<<<<<<<
nsfw,
isNotificationMenuOpen,
commentNotification,
followNotification,
mentionNotification,
reblogNotification,
transfersNotification,
voteNotification,
=======
>>>>>>>
isNotificationMenuOpen,
commentNotification,
followNotification,
mentionNotification,
reblogNotification,
transfersNotification,
voteNotification,
<<<<<<<
<ScrollView>
<View style={styles.settingsCard}>
<SettingsItem
title={intl.formatMessage({
id: 'settings.general',
})}
titleStyle={styles.cardTitle}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.currency',
})}
type="dropdown"
actionType="currency"
options={CURRENCY}
selectedOptionIndex={CURRENCY_VALUE.indexOf(selectedCurrency.currency)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.language',
})}
type="dropdown"
actionType="language"
options={LANGUAGE}
selectedOptionIndex={LANGUAGE_VALUE.indexOf(selectedLanguage)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.server',
})}
type="dropdown"
actionType="api"
options={serverList.map(serverName => groomingServerName(serverName))}
selectedOptionIndex={serverList.indexOf(selectedApi)}
defaultText={groomingServerName(selectedApi)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.nsfw_content',
})}
type="dropdown"
actionType="nsfw"
options={NSFW.map(item => intl.formatMessage({
id: item,
}))}
selectedOptionIndex={parseInt(nsfw, 10)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.dark_theme',
})}
type="toggle"
actionType="theme"
isOn={isDarkTheme}
handleOnChange={handleOnChange}
/>
{!!isLoggedIn && (
<SettingsItem
title={intl.formatMessage({
id: 'settings.pincode',
})}
text={intl.formatMessage({
id: 'settings.reset',
})}
type="button"
actionType="pincode"
handleOnChange={handleOnChange}
/>
)}
</View>
{!!isLoggedIn && (
<View style={styles.settingsCard}>
<CollapsibleCard
titleComponent={(
<SettingsItem
title={intl.formatMessage({
id: 'settings.push_notification',
})}
titleStyle={styles.cardTitle}
type="toggle"
actionType="notification"
isOn={isNotificationSettingsOpen}
handleOnChange={handleOnChange}
/>
)}
noBorder
fitContent
locked
isExpanded={isNotificationSettingsOpen}
expanded={isNotificationMenuOpen}
>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.follow',
})}
type="toggle"
actionType="notification.follow"
isOn={followNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.vote',
})}
type="toggle"
actionType="notification.vote"
isOn={voteNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.comment',
})}
type="toggle"
actionType="notification.comment"
isOn={commentNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.mention',
})}
type="toggle"
actionType="notification.mention"
isOn={mentionNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.reblog',
})}
type="toggle"
actionType="notification.reblog"
isOn={reblogNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.transfers',
})}
type="toggle"
actionType="notification.transfers"
isOn={transfersNotification}
handleOnChange={handleOnChange}
/>
</CollapsibleCard>
</View>
=======
<ScrollView style={globalStyles.settingsContainer}>
<SettingsItem
title={intl.formatMessage({
id: 'settings.currency',
})}
type="dropdown"
actionType="currency"
options={CURRENCY}
selectedOptionIndex={CURRENCY_VALUE.indexOf(selectedCurrency.currency)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.language',
})}
type="dropdown"
actionType="language"
options={LANGUAGE}
selectedOptionIndex={LANGUAGE_VALUE.indexOf(selectedLanguage)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.server',
})}
type="dropdown"
actionType="api"
options={serverList.map(serverName => groomingServerName(serverName))}
selectedOptionIndex={serverList.indexOf(selectedApi)}
defaultText={groomingServerName(selectedApi)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.nsfw_content',
})}
type="dropdown"
actionType="nsfw"
options={NSFW.map(item => intl.formatMessage({
id: item,
}))}
selectedOptionIndex={parseInt(nsfw, 10)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.dark_theme',
})}
type="toggle"
actionType="theme"
isOn={isDarkTheme}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.push_notification',
})}
type="toggle"
actionType="notification"
isOn={isNotificationSettingsOpen}
handleOnChange={handleOnChange}
/>
{!!isLoggedIn && (
<Fragment>
{/* <SettingsItem
title={intl.formatMessage({
id: 'settings.default_footer',
})}
type="toggle"
actionType="default_footer"
isOn={isDefaultFooter}
handleOnChange={handleOnChange}
/> */}
<SettingsItem
title={intl.formatMessage({
id: 'settings.pincode',
})}
text={intl.formatMessage({
id: 'settings.reset',
})}
type="button"
actionType="pincode"
handleOnChange={handleOnChange}
/>
</Fragment>
>>>>>>>
<ScrollView>
<View style={styles.settingsCard}>
<SettingsItem
title={intl.formatMessage({
id: 'settings.general',
})}
titleStyle={styles.cardTitle}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.currency',
})}
type="dropdown"
actionType="currency"
options={CURRENCY}
selectedOptionIndex={CURRENCY_VALUE.indexOf(selectedCurrency.currency)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.language',
})}
type="dropdown"
actionType="language"
options={LANGUAGE}
selectedOptionIndex={LANGUAGE_VALUE.indexOf(selectedLanguage)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.server',
})}
type="dropdown"
actionType="api"
options={serverList.map(serverName => groomingServerName(serverName))}
selectedOptionIndex={serverList.indexOf(selectedApi)}
defaultText={groomingServerName(selectedApi)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.nsfw_content',
})}
type="dropdown"
actionType="nsfw"
options={NSFW.map(item => intl.formatMessage({
id: item,
}))}
selectedOptionIndex={parseInt(nsfw, 10)}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.dark_theme',
})}
type="toggle"
actionType="theme"
isOn={isDarkTheme}
handleOnChange={handleOnChange}
/>
{!!isLoggedIn && (
<SettingsItem
title={intl.formatMessage({
id: 'settings.pincode',
})}
text={intl.formatMessage({
id: 'settings.reset',
})}
type="button"
actionType="pincode"
handleOnChange={handleOnChange}
/>
// <SettingsItem
// title={intl.formatMessage({
// id: 'settings.default_footer',
// })}
// type="toggle"
// actionType="default_footer"
// isOn={isDefaultFooter}
// handleOnChange={handleOnChange}
// />
)}
</View>
{!!isLoggedIn && (
<View style={styles.settingsCard}>
<CollapsibleCard
titleComponent={(
<SettingsItem
title={intl.formatMessage({
id: 'settings.push_notification',
})}
titleStyle={styles.cardTitle}
type="toggle"
actionType="notification"
isOn={isNotificationSettingsOpen}
handleOnChange={handleOnChange}
/>
)}
noBorder
fitContent
locked
isExpanded={isNotificationSettingsOpen}
expanded={isNotificationMenuOpen}
>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.follow',
})}
type="toggle"
actionType="notification.follow"
isOn={followNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.vote',
})}
type="toggle"
actionType="notification.vote"
isOn={voteNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.comment',
})}
type="toggle"
actionType="notification.comment"
isOn={commentNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.mention',
})}
type="toggle"
actionType="notification.mention"
isOn={mentionNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.reblog',
})}
type="toggle"
actionType="notification.reblog"
isOn={reblogNotification}
handleOnChange={handleOnChange}
/>
<SettingsItem
title={intl.formatMessage({
id: 'settings.notification.transfers',
})}
type="toggle"
actionType="notification.transfers"
isOn={transfersNotification}
handleOnChange={handleOnChange}
/>
</CollapsibleCard>
</View> |
<<<<<<<
if (isConnected) {
this._fetchApp();
} else {
Alert.alert('No internet connection');
}
=======
this._refreshGlobalProps();
await this._getUserData();
await this._getSettings();
this.globalInterval = setInterval(this._refreshGlobalProps, 60000);
>>>>>>>
if (isConnected) {
this._fetchApp();
} else {
Alert.alert('No internet connection');
}
this.globalInterval = setInterval(this._refreshGlobalProps, 60000);
<<<<<<<
NetInfo.isConnected.removeEventListener('connectionChange', this._handleConntectionChange);
=======
clearInterval(this.globalInterval);
>>>>>>>
NetInfo.isConnected.removeEventListener('connectionChange', this._handleConntectionChange);
clearInterval(this.globalInterval);
<<<<<<<
const mapStateToProps = state => ({
// Application
isDarkTheme: state.application.isDarkTheme,
selectedLanguage: state.application.language,
notificationSettings: state.application.isNotificationOpen,
isLogingOut: state.application.isLogingOut,
isLoggedIn: state.application.isLoggedIn,
isConnected: state.application.isConnected,
nav: state.nav.routes,
// Account
unreadActivityCount: state.account.currentAccount.unread_activity_count,
currentAccount: state.account.currentAccount,
otherAccounts: state.account.otherAccounts,
pinCode: state.account.pin,
});
export default connect(mapStateToProps)(ApplicationContainer);
=======
export default connect(
state => ({
// Application
isDarkTheme: state.application.isDarkTheme,
selectedLanguage: state.application.language,
notificationSettings: state.application.isNotificationOpen,
isLogingOut: state.application.isLogingOut,
isLoggedIn: state.application.isLoggedIn,
// Account
unreadActivityCount: state.account.currentAccount.unread_activity_count,
currentAccount: state.account.currentAccount,
otherAccounts: state.account.otherAccounts,
pinCode: state.account.pin,
}),
(dispatch, props) => ({
dispatch,
actions: {
...bindActionCreators({ fetchGlobalProperties }, dispatch),
},
}),
)(ApplicationContainer);
>>>>>>>
export default connect(
state => ({
// Application
isDarkTheme: state.application.isDarkTheme,
selectedLanguage: state.application.language,
notificationSettings: state.application.isNotificationOpen,
isLogingOut: state.application.isLogingOut,
isLoggedIn: state.application.isLoggedIn,
nav: state.nav.routes,
// Account
unreadActivityCount: state.account.currentAccount.unread_activity_count,
currentAccount: state.account.currentAccount,
otherAccounts: state.account.otherAccounts,
pinCode: state.account.pin,
}),
(dispatch, props) => ({
dispatch,
actions: {
...bindActionCreators({ fetchGlobalProperties }, dispatch),
},
}),
)(ApplicationContainer); |
<<<<<<<
getUserDataWithUsername(currentAccount.name).then(realmData => {
const _currentAccount = currentAccount;
_currentAccount.username = _currentAccount.name;
[_currentAccount.local] = realmData;
dispatch(updateCurrentAccount({ ..._currentAccount }));
dispatch(closePinCodeModal());
if (callback) callback(pin, oldPinCode);
if (navigateTo) {
const navigateAction = NavigationActions.navigate({
routeName: navigateTo,
params: navigateParams,
action: NavigationActions.navigate({ routeName: navigateTo }),
});
dispatch(navigateAction);
}
});
=======
const realmData = getUserDataWithUsername(currentAccount.name);
const _currentAccount = currentAccount;
_currentAccount.username = _currentAccount.name;
[_currentAccount.local] = realmData;
dispatch(updateCurrentAccount({ ..._currentAccount }));
dispatch(closePinCodeModal());
if (callback) callback(pin, oldPinCode);
if (navigateTo) {
NavigationService.navigate({
routeName: navigateTo,
params: navigateParams,
});
}
>>>>>>>
getUserDataWithUsername(currentAccount.name).then(realmData => {
const _currentAccount = currentAccount;
_currentAccount.username = _currentAccount.name;
[_currentAccount.local] = realmData;
dispatch(updateCurrentAccount({ ..._currentAccount }));
dispatch(closePinCodeModal());
if (callback) callback(pin, oldPinCode);
if (navigateTo) {
NavigationService.navigate({
routeName: navigateTo,
params: navigateParams,
});
}
}); |
<<<<<<<
isLoading: true,
navigationParams: {},
=======
isLoading: true,
>>>>>>>
isLoading: true,
navigationParams: {},
<<<<<<<
this.fetchInterval = setInterval(this._fetchuserPointActivities, 6 * 60 * 1000);
}
if (get(navigation, 'state.params', null)) {
const navigationParams = get(navigation, 'state.params');
this.setState({ navigationParams });
=======
this.fetchInterval = setInterval(this._fetchuserPointActivities, 6 * 60 * 1000);
>>>>>>>
this.fetchInterval = setInterval(this._fetchuserPointActivities, 6 * 60 * 1000);
}
if (get(navigation, 'state.params', null)) {
const navigationParams = get(navigation, 'state.params');
this.setState({ navigationParams });
<<<<<<<
((nextProps.activeBottomTab === ROUTES.TABBAR.POINTS && _username) ||
(_username !== username && _username))
=======
((nextProps.activeBottomTab === ROUTES.TABBAR.POINTS && nextProps.username) ||
(nextProps.username !== username && nextProps.username))
>>>>>>>
((nextProps.activeBottomTab === ROUTES.TABBAR.POINTS && _username) ||
(_username !== username && _username))
<<<<<<<
dispatch(
openPinCodeModal({
navigateTo,
navigateParams,
}),
);
=======
if (isPinCodeOpen) {
dispatch(
openPinCodeModal({
navigateTo,
navigateParams,
}),
);
} else {
navigation.navigate({
routeName: navigateTo,
params: navigateParams,
});
}
>>>>>>>
if (isPinCodeOpen) {
dispatch(
openPinCodeModal({
navigateTo,
navigateParams,
}),
);
} else {
navigation.navigate({
routeName: navigateTo,
params: navigateParams,
});
}
<<<<<<<
=======
dispatch(toastNotification(intl.formatMessage({ id: 'alert.successful' })));
>>>>>>>
<<<<<<<
=======
balance,
>>>>>>>
<<<<<<<
=======
handleOnPressTransfer: this._handleOnPressTransfer,
balance,
getUserBalance: this._getUserBalance,
promote: this._promote,
getAccount,
getUserDataWithUsername,
>>>>>>>
handleOnPressTransfer: this._handleOnPressTransfer,
balance,
getUserBalance: this._getUserBalance,
promote: this._promote,
getAccount,
getUserDataWithUsername,
<<<<<<<
pinCode: state.application.pin,
=======
pinCode: state.account.pin,
isPinCodeOpen: state.application.isPinCodeOpen,
>>>>>>>
pinCode: state.account.pin,
isPinCodeOpen: state.application.isPinCodeOpen, |
<<<<<<<
type ActionChoice {
name: String!
details: String!
}
type Action {
name: String
displayName: String
instructions: String
clientChoiceData: [ActionChoice]
}
=======
type PhoneNumberCounts {
areaCode: String!
availableCount: Int!
allocatedCount: Int!
}
type BuyPhoneNumbersJobRequest {
id: String!
assigned: Boolean!
status: Int
resultMessage: String
areaCode: String!
limit: Int!
}
>>>>>>>
type ActionChoice {
name: String!
details: String!
}
type Action {
name: String
displayName: String
instructions: String
clientChoiceData: [ActionChoice]
}
type PhoneNumberCounts {
areaCode: String!
availableCount: Int!
allocatedCount: Int!
}
type BuyPhoneNumbersJobRequest {
id: String!
assigned: Boolean!
status: Int
resultMessage: String
areaCode: String!
limit: Int!
} |
<<<<<<<
refreshControl = () => {
const { fetchUserActivity, refreshing, isDarkTheme } = this.props;
return (
<RefreshControl
refreshing={refreshing}
onRefresh={fetchUserActivity}
progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
);
}
_renderLoading = () => {
const { isLoading, intl } = this.props;
if (isLoading) {
return <ListPlaceHolder />;
}
return <Text style={styles.subText}>{intl.formatMessage({ id: 'points.no_activity' })}</Text>;
}
render() {
const {
claimPoints, intl, isClaiming, userActivities, userPoints,
} = this.props;
// TODO: this feature temporarily closed.
const isActiveIcon = false;
return (
<Fragment>
<LineBreak height={12} />
<ScrollView
style={styles.scrollContainer}
refreshControl={this.refreshControl()}
>
<Text style={styles.pointText}>{userPoints.points}</Text>
<Text style={styles.subText}>eSteem Points</Text>
{userPoints.unclaimed_points > 0
&& (
<MainButton
isLoading={isClaiming}
isDisable={isClaiming}
style={styles.mainButton}
height={50}
onPress={() => claimPoints()}
>
<View style={styles.mainButtonWrapper}>
<Text style={styles.unclaimedText}>{userPoints.unclaimed_points}</Text>
<View style={styles.mainIconWrapper}>
<Icon name="add" iconType="MaterialIcons" color="#357ce6" size={23} />
</View>
</View>
</MainButton>
)
}
<View style={styles.iconsWrapper}>
<FlatList
style={styles.iconsList}
data={POINTS_KEYS}
horizontal
renderItem={({ item }) => (
<PopoverController key={item.type}>
{({
openPopover, closePopover, popoverVisible, setPopoverAnchor, popoverAnchorRect,
}) => (
<View styles={styles.iconWrapper} key={item.type}>
<View style={styles.iconWrapper}>
<TouchableOpacity
ref={setPopoverAnchor}
onPress={openPopover}
>
<IconButton
iconStyle={styles.icon}
style={styles.iconButton}
iconType={POINTS[item.type].iconType}
name={POINTS[item.type].icon}
badgeCount={POINTS[item.type].point}
badgeStyle={styles.badge}
badgeTextStyle={styles.badgeText}
disabled
/>
</TouchableOpacity>
</View>
<Text style={styles.subText}>
{intl.formatMessage({ id: POINTS[item.type].nameKey })}
</Text>
<Popover
backgroundStyle={styles.overlay}
contentStyle={styles.popoverDetails}
arrowStyle={styles.arrow}
visible={popoverVisible}
onClose={() => {
closePopover();
}}
fromRect={popoverAnchorRect}
placement="top"
supportedOrientations={['portrait', 'landscape']}
>
<View style={styles.popoverWrapper}>
<Text style={styles.popoverText}>
{intl.formatMessage({ id: POINTS[item.type].descriptionKey })}
</Text>
</View>
</Popover>
</View>
)}
</PopoverController>
)}
/>
</View>
<View style={styles.listWrapper}>
{!userActivities
? this._renderLoading()
: (
<FlatList
data={userActivities}
renderItem={({ item, index }) => (
<WalletLineItem
key={item.id.toString()}
index={index + 1}
text={intl.formatMessage({ id: item.textKey })}
description={getTimeFromNow(item.created)}
isCircleIcon
isThin
isBlackText
iconName={item.icon}
iconType={item.iconType}
rightText={`${item.amount} ESTM`}
/>
)}
/>
)
}
</View>
</ScrollView>
</Fragment>
);
}
=======
refreshControl = () => {
const { fetchUserActivity, refreshing, isDarkTheme } = this.props;
return (
<RefreshControl
refreshing={refreshing}
onRefresh={fetchUserActivity}
progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
);
};
render() {
const {
userActivities,
userPoints,
intl,
isClaiming,
claimPoints,
} = this.props;
return (
<Fragment>
<LineBreak height={12} />
<ScrollView
style={styles.scrollContainer}
refreshControl={this.refreshControl()}
>
<Text style={styles.pointText}>{userPoints.points}</Text>
<Text style={styles.subText}>eSteem Points</Text>
{get(userPoints, 'unclaimed_points') > 0 && (
<MainButton
isLoading={isClaiming}
isDisable={isClaiming}
style={styles.mainButton}
height={50}
onPress={() => claimPoints()}
>
<View style={styles.mainButtonWrapper}>
<Text style={styles.unclaimedText}>
{userPoints.unclaimed_points}
</Text>
<View style={styles.mainIconWrapper}>
<Icon
name="add"
iconType="MaterialIcons"
color="#357ce6"
size={23}
/>
</View>
</View>
</MainButton>
)}
<View style={styles.iconsWrapper}>
<FlatList
style={styles.iconsList}
data={POINTS_KEYS}
horizontal
keyExtractor={(item, index) => (item.type + index).toString()}
renderItem={({ item }) => (
<PopoverController>
{({
openPopover,
closePopover,
popoverVisible,
setPopoverAnchor,
popoverAnchorRect,
}) => (
<View styles={styles.iconWrapper}>
<View style={styles.iconWrapper}>
<TouchableOpacity
ref={setPopoverAnchor}
onPress={openPopover}
>
<IconButton
iconStyle={styles.icon}
style={styles.iconButton}
iconType={POINTS[item.type].iconType}
name={POINTS[item.type].icon}
badgeCount={POINTS[item.type].point}
badgeStyle={styles.badge}
badgeTextStyle={styles.badgeText}
disabled
/>
</TouchableOpacity>
</View>
<Text style={styles.subText}>
{intl.formatMessage({ id: POINTS[item.type].nameKey })}
</Text>
<Popover
backgroundStyle={styles.overlay}
contentStyle={styles.popoverDetails}
arrowStyle={styles.arrow}
visible={popoverVisible}
onClose={() => {
closePopover();
}}
fromRect={popoverAnchorRect}
placement="top"
supportedOrientations={['portrait', 'landscape']}
>
<View style={styles.popoverWrapper}>
<Text style={styles.popoverText}>
{intl.formatMessage({
id: POINTS[item.type].descriptionKey,
})}
</Text>
</View>
</Popover>
</View>
)}
</PopoverController>
)}
/>
</View>
<View style={styles.listWrapper}>
{size(userActivities) < 1 ? (
<Text style={styles.subText}>
{intl.formatMessage({ id: 'points.no_activity' })}
</Text>
) : (
<FlatList
data={userActivities}
keyExtractor={item => item.id.toString()}
renderItem={({ item, index }) => (
<WalletLineItem
index={index + 1}
text={intl.formatMessage({ id: item.textKey })}
description={getTimeFromNow(get(item, 'created'))}
isCircleIcon
isThin
isBlackText
iconName={get(item, 'icon')}
iconType={get(item, 'iconType')}
rightText={`${get(item, 'amount')} ESTM`}
/>
)}
/>
)}
</View>
</ScrollView>
</Fragment>
);
}
>>>>>>>
refreshControl = () => {
const { fetchUserActivity, refreshing, isDarkTheme } = this.props;
return (
<RefreshControl
refreshing={refreshing}
onRefresh={fetchUserActivity}
progressBackgroundColor="#357CE6"
tintColor={!isDarkTheme ? '#357ce6' : '#96c0ff'}
titleColor="#fff"
colors={['#fff']}
/>
);
}
_renderLoading = () => {
const { isLoading, intl } = this.props;
if (isLoading) {
return <ListPlaceHolder />;
}
return <Text style={styles.subText}>{intl.formatMessage({ id: 'points.no_activity' })}</Text>;
}
render() {
const {
claimPoints, intl, isClaiming, userActivities, userPoints,
} = this.props;
return (
<Fragment>
<LineBreak height={12} />
<ScrollView
style={styles.scrollContainer}
refreshControl={this.refreshControl()}
>
<Text style={styles.pointText}>{userPoints.points}</Text>
<Text style={styles.subText}>eSteem Points</Text>
{userPoints.unclaimed_points > 0
&& (
<MainButton
isLoading={isClaiming}
isDisable={isClaiming}
style={styles.mainButton}
height={50}
onPress={() => claimPoints()}
>
<View style={styles.mainButtonWrapper}>
<Text style={styles.unclaimedText}>{userPoints.unclaimed_points}</Text>
<View style={styles.mainIconWrapper}>
<Icon name="add" iconType="MaterialIcons" color="#357ce6" size={23} />
</View>
</View>
</MainButton>
)
}
<View style={styles.iconsWrapper}>
<FlatList
style={styles.iconsList}
data={POINTS_KEYS}
horizontal
renderItem={({ item }) => (
<PopoverController key={item.type}>
{({
openPopover, closePopover, popoverVisible, setPopoverAnchor, popoverAnchorRect,
}) => (
<View styles={styles.iconWrapper} key={item.type}>
<View style={styles.iconWrapper}>
<TouchableOpacity
ref={setPopoverAnchor}
onPress={openPopover}
>
<IconButton
iconStyle={styles.icon}
style={styles.iconButton}
iconType={POINTS[item.type].iconType}
name={POINTS[item.type].icon}
badgeCount={POINTS[item.type].point}
badgeStyle={styles.badge}
badgeTextStyle={styles.badgeText}
disabled
/>
</TouchableOpacity>
</View>
<Text style={styles.subText}>
{intl.formatMessage({ id: POINTS[item.type].nameKey })}
</Text>
<Popover
backgroundStyle={styles.overlay}
contentStyle={styles.popoverDetails}
arrowStyle={styles.arrow}
visible={popoverVisible}
onClose={() => {
closePopover();
}}
fromRect={popoverAnchorRect}
placement="top"
supportedOrientations={['portrait', 'landscape']}
>
<View style={styles.popoverWrapper}>
<Text style={styles.popoverText}>
{intl.formatMessage({ id: POINTS[item.type].descriptionKey })}
</Text>
</View>
</Popover>
</View>
)}
</PopoverController>
)}
/>
</View>
<View style={styles.listWrapper}>
{!userActivities
? this._renderLoading()
: (
<FlatList
data={userActivities}
keyExtractor={item => item.id.toString()}
renderItem={({ item, index }) => (
<WalletLineItem
index={index + 1}
text={intl.formatMessage({ id: item.textKey })}
description={getTimeFromNow(get(item, 'created'))}
isCircleIcon
isThin
isBlackText
iconName={get(item, 'icon')}
iconType={get(item, 'iconType')}
rightText={`${get(item, 'amount')} ESTM`}
/>
)}
/>
)
}
</View>
</ScrollView>
</Fragment>
);
} |
<<<<<<<
InteractionStep,
=======
datawarehouse,
>>>>>>>
InteractionStep,
datawarehouse, |
<<<<<<<
[ROUTES.SCREENS.PROFILE]: { screen: RootComponent()(Profile) },
[ROUTES.SCREENS.SPLASH]: { screen: Splash },
=======
[ROUTES.SCREENS.SPLASH]: { screen: RootComponent()(Splash) },
>>>>>>>
[ROUTES.SCREENS.SPLASH]: { screen: Splash }, |
<<<<<<<
import FreeEstm from './freeEstm/screen/freeEstmScreen';
=======
import Voters from './voters';
>>>>>>>
import FreeEstm from './freeEstm/screen/freeEstmScreen';
import Voters from './voters'; |
<<<<<<<
} from '../../../providers/steem/dsteem';
=======
} from "../../../providers/steem/dsteem";
import { getFormatedCreatedDate } from "../../../utils/time";
>>>>>>>
} from '../../../providers/steem/dsteem';
import { getUserData, getAuthStatus } from '../../../realm/realm';
import { getFormatedCreatedDate } from '../../../utils/time';
<<<<<<<
import styles from './profileStyles';
/* eslint-enable no-unused-vars */
=======
import styles from "./profileStyles";
import { CollapsibleCard } from "../../../components/collapsibleCard";
>>>>>>>
import styles from './profileStyles';
<<<<<<<
await getAuthStatus().then((res) => {
const isLoggedIn = res;
=======
let isLoggedIn;
await getAuthStatus().then(res => {
isLoggedIn = res;
>>>>>>>
let isLoggedIn;
await getAuthStatus().then((res) => {
isLoggedIn = res;
<<<<<<<
user,
isLoggedIn,
follows,
about: about.profile,
=======
user: user,
isLoggedIn: isLoggedIn,
follows: follows,
about: about && about.profile,
>>>>>>>
user,
isLoggedIn,
follows,
about: about && about.profile,
<<<<<<<
this.getBlog(userData[0].username);
this.getComments(userData[0].username);
},
=======
this._getBlog(userData[0].username);
this._getComments(userData[0].username);
}
>>>>>>>
this._getBlog(userData[0].username);
this._getComments(userData[0].username);
},
<<<<<<<
getBlog = (user) => {
this.setState({ loading: true });
getPosts('blog', { tag: user, limit: 10 }, user)
.then((result) => {
=======
_getBlog = user => {
this.setState({ isLoading: true });
getPosts("blog", { tag: user, limit: 10 }, user)
.then(result => {
>>>>>>>
_getBlog = (user) => {
this.setState({ isLoading: true });
getPosts('blog', { tag: user, limit: 10 }, user)
.then((result) => {
<<<<<<<
getMore = async () => {
console.log('get more');
=======
_getMore = async () => {
console.log("get more");
>>>>>>>
_getMore = async () => {
console.log('get more');
<<<<<<<
getComments = async (user) => {
=======
_getComments = async user => {
>>>>>>>
_getComments = async (user) => {
<<<<<<<
// TODO: Refactor ME !
=======
const {
user,
follows,
posts,
commments,
isLoggedIn,
isLoading,
about,
} = this.state;
let _about, cover_image, location, website;
const votingPower = user && user.voting_power && user.voting_power / 100;
const fullInHour = Math.ceil((100 - votingPower) * 0.833333);
if (about) {
location = about.location;
_about = about.about;
website = about.website;
cover_image = about.cover_image;
}
console.log(this.state);
>>>>>>>
const {
user, follows, posts, commments, isLoggedIn, isLoading, about,
} = this.state;
let _about;
let coverImage;
let location;
let website;
const votingPower = user && user.voting_power && user.voting_power / 100;
const fullInHour = Math.ceil((100 - votingPower) * 0.833333);
if (about) {
_about = about.about;
coverImage = about.cover_image;
location = about.location;
website = about.website;
}
<<<<<<<
<Body style={{ top: -40 }}>
<Text style={{ fontWeight: 'bold' }}>
{this.state.user.name}
</Text>
<Text>{this.state.about.about}</Text>
</Body>
<Card style={{ margin: 0 }}>
<CardItem style={styles.about}>
<View style={{ flex: 0.3 }}>
<Text>
{this.state.user.post_count}
{' '}
Posts
</Text>
</View>
<View style={{ flex: 0.4 }}>
<Text>
{this.state.follows.follower_count}
{' '}
Followers
</Text>
</View>
<View style={{ flex: 0.4 }}>
<Text>
{this.state.follows.following_count}
{' '}
Following
</Text>
</View>
</CardItem>
<CardItem style={styles.info}>
<View style={{ flex: 0.5 }}>
<Text
style={{
marginLeft: 20,
alignSelf: 'flex-start',
}}
>
<Icon
style={{
fontSize: 20,
alignSelf: 'flex-start',
}}
name="md-pin"
/>
{this.state.about.location}
</Text>
</View>
<View style={{ flex: 0.5 }}>
<Text>
<Icon
style={{
fontSize: 20,
marginRight: 10,
}}
name="md-calendar"
/>
{getTimeFromNow(this.state.user.created)}
</Text>
</View>
</CardItem>
</Card>
</View>
<ScrollableTabView
style={styles.tabs}
style={{ flex: 1 }}
renderTabBar={() => (
<TabBar
style={styles.tabbar}
tabUnderlineDefaultWidth={30} // default containerWidth / (numberOfTabs * 4)
tabUnderlineScaleX={3} // default 3
activeColor="#222"
inactiveColor="#222"
/>
)}
>
<View tabLabel="Blog" style={styles.tabbarItem}>
<FlatList
data={this.state.posts}
showsVerticalScrollIndicator={false}
renderItem={({ item }) => (
<PostCard
style={{ shadowColor: 'white' }}
content={item}
user={this.state.user}
isLoggedIn
/>
)}
keyExtractor={(post, index) => index.toString()}
onEndReached={(info) => {
if (!this.state.loading) {
console.log(info);
this.getMore();
}
}}
onEndThreshold={0}
bounces={false}
ListFooterComponent={this.renderFooter}
/>
</View>
<View tabLabel="Comments" style={styles.tabbarItem}>
<FlatList
data={this.state.commments}
showsVerticalScrollIndicator={false}
renderItem={({ item }) => (
<Comment
comment={item}
isLoggedIn
user={this.state.user}
/>
)}
keyExtractor={(post, index) => index.toString()}
onEndThreshold={0}
bounces={false}
ListFooterComponent={this.renderFooter}
/>
</View>
<View tabLabel="Replies" style={styles.tabbarItem} />
<View tabLabel="Wallet" style={styles.tabbarItem}>
<Card>
<Text>
STEEM Balance:
{this.state.user.balance}
</Text>
</Card>
<Card>
<Text>
SBD Balance:
{this.state.user.sbd_balance}
</Text>
</Card>
<Card>
<Text>
STEEM Power:
{this.state.user.steem_power}
{' '}
SP
</Text>
<Text>
Received STEEM Power:
{' '}
{this.state.user.received_steem_power}
{' '}
SP
</Text>
<Text>
Delegated Power Power:
{' '}
{this.state.user.delegated_steem_power}
{' '}
SP
</Text>
</Card>
<Card>
<Text>
Saving STEEM Balance:
{' '}
{this.state.user.savings_balance}
</Text>
<Text>
Saving STEEM Balance:
{' '}
{this.state.user.savings_sbd_balance}
</Text>
</Card>
</View>
</ScrollableTabView>
=======
) : (
<NoPost name={user.name} text="haven't commented anything yet" />
)}
</View>
<View tabLabel={"$" + user.balance}>
<Card>
<Text>STEEM Balance: {user.balance}</Text>
</Card>
<Card>
<Text>SBD Balance: {user.sbd_balance}</Text>
</Card>
<Card>
<Text>STEEM Power: {user.steem_power} SP</Text>
<Text>Received STEEM Power: {user.received_steem_power} SP</Text>
<Text>
Delegated Power Power: {user.delegated_steem_power} SP
</Text>
</Card>
<Card>
<Text>Saving STEEM Balance: {user.savings_balance}</Text>
<Text>Saving STEEM Balance: {user.savings_sbd_balance}</Text>
</Card>
>>>>>>>
) : (
<NoPost
name={user.name}
text="haven't commented anything yet"
defaultText="Login to see!"
/>
)}
</View>
<View tabLabel={user.balance ? `$${user.balance}` : 'Wallet'}>
<Wallet /> |
<<<<<<<
import RNIap, { purchaseErrorListener, purchaseUpdatedListener } from 'react-native-iap';
=======
import { withNavigation } from 'react-navigation';
import RNIap, {
purchaseErrorListener,
purchaseUpdatedListener,
ProductPurchase,
PurchaseError,
} from 'react-native-iap';
// import { Alert } from 'react-native';
>>>>>>>
import { withNavigation } from 'react-navigation';
import RNIap, { purchaseErrorListener, purchaseUpdatedListener } from 'react-native-iap';
<<<<<<<
// Services
import { purchaseOrder } from '../../../providers/esteem/esteem';
import bugsnag from '../../../config/bugsnag';
// Utilities
=======
// import { toastNotification } from '../../../redux/actions/uiAction';
// Constants
import { default as ROUTES } from '../../../constants/routeNames';
>>>>>>>
// Services
import { purchaseOrder } from '../../../providers/esteem/esteem';
import bugsnag from '../../../config/bugsnag';
// Utilities
import { default as ROUTES } from '../../../constants/routeNames';
<<<<<<<
=======
>>>>>>>
<<<<<<<
bugsnag.notify(err);
=======
Alert.alert(
`Fetching data from server failed, please try again or notify us at [email protected] \n${err.message.substr(
0,
20,
)}`,
);
>>>>>>>
bugsnag.notify(err);
Alert.alert(
`Fetching data from server failed, please try again or notify us at [email protected] \n${err.message.substr(
0,
20,
)}`,
);
<<<<<<<
try {
RNIap.requestPurchase(sku, false);
} catch (err) {
bugsnag.notify(err, report => {
report.metadata = {
sku,
};
});
=======
const { navigation } = this.props;
await this.setState({ isProccesing: true });
if (sku !== 'freePoints') {
try {
await RNIap.requestPurchase(sku);
} catch (err) {
console.warn(err.code, err.message);
}
} else {
navigation.navigate({
routeName: ROUTES.SCREENS.FREE_ESTM,
});
>>>>>>>
const { navigation } = this.props;
await this.setState({ isProccesing: true });
if (sku !== 'freePoints') {
try {
await RNIap.requestPurchase(sku, false);
} catch (err) {
bugsnag.notify(err, report => {
report.metadata = {
sku,
};
});
}
} else {
navigation.navigate({
routeName: ROUTES.SCREENS.FREE_ESTM,
}); |
<<<<<<<
=======
isHideReblogOption,
isHideImage,
hanldeImagesHide,
>>>>>>>
isHideImage,
hanldeImagesHide, |
<<<<<<<
=======
const routingAction = navigation.state && navigation.state.params;
// Routing action state ex if coming for video or image or only text
if (routingAction && routingAction.action) {
this._handleRoutingAction(routingAction.action);
} else {
this.setState({ autoFocusText: true });
}
>>>>>>>
let isReply;
let post;
if (navigation.state && navigation.state.params) {
const navigationParams = navigation.state.params;
if (navigationParams.isReply) {
isReply = navigationParams.isReply;
post = navigationParams.post;
this.setState({ isReply, post });
}
if (navigationParams.action) {
this._handleRoutingAction(navigationParams.action);
}
} else {
this.setState({ autoFocusText: true });
}
// Routing action state ex if coming for video or image or only text
// if (routingAction && routingAction.action) {
// this._handleRoutingAction(routingAction.action);
// } else {
// this.setState({ autoFocusText: true });
// }
if (!isReply) {
<<<<<<<
isPostSending, isDraftSaving, isDraftSaved, draftPost, isReply
=======
draftPost,
isDraftSaved,
isDraftSaving,
isOpenCamera,
isCameraOrPickerOpen,
autoFocusText,
uploadedImage,
isPostSending,
isUploading,
>>>>>>>
autoFocusText,
draftPost,
isCameraOrPickerOpen,
isDraftSaved,
isDraftSaving,
isOpenCamera,
isPostSending,
isReply,
isUploading,
uploadedImage,
<<<<<<<
isPostSending={isPostSending}
isReply={isReply}
=======
isOpenCamera={isOpenCamera}
uploadedImage={uploadedImage}
isUploading={isUploading}
>>>>>>>
isOpenCamera={isOpenCamera}
isPostSending={isPostSending}
isReply={isReply}
isUploading={isUploading}
uploadedImage={uploadedImage} |
<<<<<<<
import SteemConnect from './steem-connect/steemConnect';
=======
import { Profile } from './profile';
>>>>>>>
import SteemConnect from './steem-connect/steemConnect';
import { Profile } from './profile';
<<<<<<<
Notification,
SteemConnect,
=======
Splash,
>>>>>>>
SteemConnect,
Splash, |
<<<<<<<
ProfileEdit,
Promote,
Reblogs,
SearchResult,
=======
Reblogs,
Redeem,
SearchResult,
>>>>>>>
ProfileEdit,
Reblogs,
Redeem,
SearchResult, |
<<<<<<<
return Math.round(rating * 10) / 10;
=======
return Math.round((rating / 2) * 10) / 10;
}
function formatSubtitle(subtitle) {
return {
kind: 'captions',
label: subtitle.langName,
srclang: subtitle.lang,
src: `${subtitlesEndpoint}/${encodeURIComponent(subtitle.url)}`,
default: subtitle.lang === 'en'
};
>>>>>>>
return Math.round(rating * 10) / 10;
}
function formatSubtitle(subtitle) {
return {
kind: 'captions',
label: subtitle.langName,
srclang: subtitle.lang,
src: `${subtitlesEndpoint}/${encodeURIComponent(subtitle.url)}`,
default: subtitle.lang === 'en'
}; |
<<<<<<<
import Torrent from '../../api/Torrent';
=======
import Torrent, { formatSpeeds } from '../../api/Torrent';
import {
convertFromBuffer,
startServer
} from '../../api/Subtitle';
>>>>>>>
import Torrent from '../../api/Torrent';
import {
convertFromBuffer,
startServer
} from '../../api/Subtitle';
<<<<<<<
async startTorrent(magnetURI, activeMode) {
=======
/**
* 1. Retrieve list of subtitles
* 2. If the torrent has subtitles, get the subtitle buffer
* 3. Convert the buffer (srt) to vtt, save the file to a tmp dir
* 4. Serve the file through http
* 5. Override the default subtitle retrieved from the API
*/
async getSubtitles(subtitleTorrentFile = {}, activeMode, item) {
// Retrieve list of subtitles
const subtitles = await this.butter.getSubtitles(
item.imdbId,
subtitleTorrentFile.name,
subtitleTorrentFile.length,
{
activeMode
}
);
if (!subtitleTorrentFile) {
return subtitles;
}
const { filename, port } = await new Promise((resolve, reject) => {
subtitleTorrentFile.getBuffer((err, srtSubtitleBuffer) => {
if (err) reject(err);
// Convert to vtt, get filename
resolve(convertFromBuffer(srtSubtitleBuffer));
});
});
// Override the default subtitle
const mergedResults = subtitles.map(subtitle => (
subtitle.default === true
? {
...subtitle,
src: `http://localhost:${port}/${filename}`
}
: subtitle
));
return mergedResults;
}
async startTorrent(magnet, activeMode) {
>>>>>>>
/**
* 1. Retrieve list of subtitles
* 2. If the torrent has subtitles, get the subtitle buffer
* 3. Convert the buffer (srt) to vtt, save the file to a tmp dir
* 4. Serve the file through http
* 5. Override the default subtitle retrieved from the API
*/
async getSubtitles(subtitleTorrentFile = {}, activeMode, item) {
// Retrieve list of subtitles
const subtitles = await this.butter.getSubtitles(
item.imdbId,
subtitleTorrentFile.name,
subtitleTorrentFile.length,
{
activeMode
}
);
if (!subtitleTorrentFile) {
return subtitles;
}
const { filename, port } = await new Promise((resolve, reject) => {
subtitleTorrentFile.getBuffer((err, srtSubtitleBuffer) => {
if (err) reject(err);
// Convert to vtt, get filename
resolve(convertFromBuffer(srtSubtitleBuffer));
});
});
// Override the default subtitle
const mergedResults = subtitles.map(subtitle => (
subtitle.default === true
? {
...subtitle,
src: `http://localhost:${port}/${filename}`
}
: subtitle
));
return mergedResults;
}
async startTorrent(magnet, activeMode) {
<<<<<<<
=======
const filename = file.name;
const subtitles = subtitle && process.env.FLAG_ENG_SUBTITLES === 'true'
? await this.getSubtitles(
subtitle,
this.props.activeMode,
this.state.item
)
: [];
console.log(torrent.files.map(_file => _file.name));
console.log(subtitles);
this.torrentInfoInterval = setInterval(() => {
const { downloadSpeed, uploadSpeed, progress, numPeers, ratio } = formatSpeeds(torrent);
this.setState({ downloadSpeed, uploadSpeed, progress, numPeers, ratio });
console.log('----------------------------------------------------');
console.log('Download Speed:', downloadSpeed);
console.log('Upload Speed:', uploadSpeed);
console.log('Progress:', progress);
console.log('Peers:', numPeers);
console.log('Ratio:', ratio);
console.log('----------------------------------------------------');
}, 10000);
>>>>>>>
const filename = file.name;
const subtitles = subtitle && process.env.FLAG_ENG_SUBTITLES === 'true'
? await this.getSubtitles(
subtitle,
this.props.activeMode,
this.state.item
)
: [];
<<<<<<<
this.player.initPlyr(servingUrl, {
poster: this.state.item.images.fanart.full
});
} else if (Player.isFormatSupported(filename, [
...Player.nativePlaybackFormats,
...Player.experimentalPlaybackFormats
])) {
=======
this.player = this.player.initPlyr(servingUrl, {
tracks: subtitles
});
} else {
>>>>>>>
this.player.initPlyr(servingUrl, {
poster: this.state.item.images.fanart.full,
tracks: subtitles
});
} else if (Player.isFormatSupported(filename, [
...Player.nativePlaybackFormats,
...Player.experimentalPlaybackFormats
])) {
<<<<<<<
<Rating rating={this.state.item.rating} />
=======
<Rating
renderStarIcon={() => <span className="ion-android-star" />}
starColor={'white'}
name={'rating'}
value={this.state.item.rating}
editing={false}
/>
<h5>{this.state.item.rating}</h5>
>>>>>>>
<Rating rating={this.state.item.rating} /> |
<<<<<<<
* @typedef {(parent: Node, value: Node | string | number, endMark: Node?) => Node | Frag} hAdd
=======
* @typedef {Node | string | number} Value
* @typedef {(parent: Node, value: Value | Value[], endMark?: Node) => Node | Frag} hAdd
>>>>>>>
* @typedef {Node | string | number} Value
* @typedef {(parent: Node, value: Value | Value[], endMark: Node?) => Node | Frag} hAdd |
<<<<<<<
displayDateFormat = 'YYYY-MM-DD @ HH:mm';
=======
const displayDateFormat = 'DD MMM YY @ HH:mm';
>>>>>>>
const displayDateFormat = 'YYYY-MM-DD @ HH:mm'; |
<<<<<<<
// new webpack.BannerPlugin(
// 'require("source-map-support").install();',
// { raw: true, entryOnly: false }
// ),
=======
// Add source map support for stack traces in node
// https://github.com/evanw/node-source-map-support
new webpack.BannerPlugin(
'require("source-map-support").install();',
{ raw: true, entryOnly: false }
),
// NODE_ENV should be production so that modules do not perform certain development checks
>>>>>>>
// Add source map support for stack traces in node
// https://github.com/evanw/node-source-map-support
// new webpack.BannerPlugin(
// 'require("source-map-support").install();',
// { raw: true, entryOnly: false }
// ), |
<<<<<<<
=======
/*
editor.getSession().on("changeScrollTop", function() {
console.log("changeScrollTop");
var nodes = document.getElementsByClassName("ace_content");
console.log(nodes[0].offsetTop);
console.log(nodes[0].style["margin-top"]);
});
editor.getSession().on("changeScrollLeft", function() {
console.log("changeScrollLeft");
var nodes = document.getElementsByClassName("ace_content");
console.log(nodes[0].offsetLeft);
console.log(nodes[0].style["margin-left"]);
});
*/
>>>>>>>
/*
editor.getSession().on("changeScrollTop", function() {
console.log("changeScrollTop");
var nodes = document.getElementsByClassName("ace_content");
console.log(nodes[0].offsetTop);
console.log(nodes[0].style["margin-top"]);
});
editor.getSession().on("changeScrollLeft", function() {
console.log("changeScrollLeft");
var nodes = document.getElementsByClassName("ace_content");
console.log(nodes[0].offsetLeft);
console.log(nodes[0].style["margin-left"]);
});
*/ |
<<<<<<<
export function fetchImage({ imageId, imageExt, key }, callback) {
Hyperfile.fetch(HYPERFILE_DATA_PATH, imageId, key, (error, blobPath) => {
=======
function fetchImage({ imageId, imageExt, key }, callback) {
Hyperfile.fetch(HYPERFILE_DATA_PATH, imageId, key, (error, blob) => {
>>>>>>>
export function fetchImage({ imageId, imageExt, key }, callback) {
Hyperfile.fetch(HYPERFILE_DATA_PATH, imageId, key, (error, blob) => { |
<<<<<<<
//// Contants
=======
// // Contants
>>>>>>>
// ## Constants
<<<<<<<
//// Imperative top-levels.
mkdirp.sync(HYPERFILE_DATA_PATH)
mkdirp.sync(HYPERFILE_CACHE_PATH)
//// Pure helper functions.
=======
// // Helper functions - may be called within action functions or from UI code.
>>>>>>>
// ## Imperative top-levels.
mkdirp.sync(HYPERFILE_DATA_PATH)
mkdirp.sync(HYPERFILE_CACHE_PATH)
// ## Pure helper functions.
<<<<<<<
=======
x,
y,
>>>>>>>
x,
y,
<<<<<<<
export function cardCreated(state, { x, y, width, height, selected, type, typeAttrs }) {
=======
// Snap given num to nearest multiple of our grid size.
function snapToGrid(num) {
const resto = num % GRID_SIZE
if (resto <= (GRID_SIZE / 2)) {
return num - resto
}
return num + GRID_SIZE - resto
}
function cardCreated(hm, state, { x, y, width, height, selected, type, typeAttrs }) {
>>>>>>>
export function cardCreated(state, { x, y, width, height, selected, type, typeAttrs }) {
<<<<<<<
export function cardResized(state, {id, width, height }) {
const newBoard = state.hm.change(state.board, (b) => {
=======
function cardResized(hm, state, { id, width, height }) {
const newBoard = hm.change(state.board, (b) => {
>>>>>>>
export function cardResized(state, { id, width, height }) {
const newBoard = state.hm.change(state.board, (b) => {
<<<<<<<
export function cardSelected(state, { id }) {
return Object.assign({}, state, {selected: id})
=======
function cardSelected(hm, state, { id }) {
return Object.assign({}, state, { selected: id })
>>>>>>>
export function cardSelected(state, { id }) {
return Object.assign({}, state, { selected: id })
<<<<<<<
export function clearSelections(state) {
return Object.assign({}, state, {selected: null})
=======
function clearSelections(hm, state) {
return Object.assign({}, state, { selected: null })
>>>>>>>
export function clearSelections(state) {
return Object.assign({}, state, { selected: null }) |
<<<<<<<
{ type: 'naive', id: 're-frame', url: './re-frame/index.html', label: 're-frame (Reagent)' },
=======
{ type: 'naive', id: 'd3', url: './d3/index.html', label: 'DBMON D3' },
{ type: 'naive', id: 'morphdom', url: './morphdom/index.html', label: 'DBMON Morphdom' },
>>>>>>>
{ type: 'naive', id: 're-frame', url: './re-frame/index.html', label: 're-frame (Reagent)' },
{ type: 'naive', id: 'd3', url: './d3/index.html', label: 'DBMON D3' },
{ type: 'naive', id: 'morphdom', url: './morphdom/index.html', label: 'DBMON Morphdom' }, |
<<<<<<<
{ type: 'naive', id: 'elem', url: './elm', label: 'DBMON elm' },
=======
{ type: 'naive', id: 'elm', url: './elm', label: 'DBMON elm' },
>>>>>>>
{ type: 'naive', id: 'elm', url: './elm', label: 'DBMON elm' },
<<<<<<<
{ type: 'optimized', id: "cycle + snabbdom", label: "DBMON Cycle.js + Snabbdom", url: "./cycle-snabbdom"},
{ type: 'optimized', id: 'motorcycle', label: 'DBMON Motorcycle.js', url: './motorcycle'},
=======
{ type: 'naive', id: 'domvm', url: './domvm/index.html', label: 'DBMON domvm' },
{ type: 'naive', id: 'once', url: './once/index.html', label: 'DBMON once' },
{ type: 'naive', id: 'ripple', url: './ripple/index.html', label: 'DBMON ripple' },
{ type: 'naive', id: 'diffhtml', url: './diffhtml/index.html', label: 'DBMON diffHTML' },
>>>>>>>
{ type: 'optimized', id: "cycle + snabbdom", label: "DBMON Cycle.js + Snabbdom", url: "./cycle-snabbdom"},
{ type: 'optimized', id: 'motorcycle', label: 'DBMON Motorcycle.js', url: './motorcycle'},
{ type: 'naive', id: 'domvm', url: './domvm/index.html', label: 'DBMON domvm' },
{ type: 'naive', id: 'once', url: './once/index.html', label: 'DBMON once' },
{ type: 'naive', id: 'ripple', url: './ripple/index.html', label: 'DBMON ripple' },
{ type: 'naive', id: 'diffhtml', url: './diffhtml/index.html', label: 'DBMON diffHTML' }, |
<<<<<<<
if (hidden === '0') { // we want to hide this element
hiddenBy[legendIndex] = true; // add legendIndex to the data object for later use
elems[id].mapElem.animate({"opacity":legendOptions.hideElemsOnClick.opacity}, legendOptions.hideElemsOnClick.animDuration, "linear", function() {
=======
if (hidden === '0') {
elems[id].mapElem.animate({"opacity":legendOptions.hideElemsOnClick.opacity}, animDuration, "linear", function() {
>>>>>>>
if (hidden === '0') { // we want to hide this element
hiddenBy[legendIndex] = true; // add legendIndex to the data object for later use
elems[id].mapElem.animate({"opacity":legendOptions.hideElemsOnClick.opacity}, animDuration, "linear", function() { |
<<<<<<<
Generate = require('../../generate'),
path = require('path'),
Q = require('q');
=======
Generate = require('../../generate');
>>>>>>>
Generate = require('../../generate'),
path = require('path'),
Q = require('q');
<<<<<<<
Generate.inquirer.prompt({message: 'Enter the ' + Generator.numberNames[tabIndex] + ' tab name:', name: 'name', type: 'input'}, function(nameResult) {
Generator.tabs.push({ appDirectory: options.appDirectory, cssClassName: Generate.cssClassName(nameResult.name), fileName: Generate.fileName(nameResult.name), jsClassName: Generate.jsClassName(nameResult.name), name: nameResult.name });
=======
inquirer.prompt({message: 'Enter the ' + Generator.numberNames[tabIndex] + ' tab name:', name: 'name', type: 'input'}, function(nameResult) {
Generator.tabs.push({ appDirectory: options.appDirectory, fileAndClassName: Generate.fileAndClassName(nameResult.name), javascriptClassName: Generate.javascriptClassName(nameResult.name), name: nameResult.name });
>>>>>>>
inquirer.prompt({message: 'Enter the ' + Generator.numberNames[tabIndex] + ' tab name:', name: 'name', type: 'input'}, function(nameResult) {
Generator.tabs.push({ appDirectory: options.appDirectory, cssClassName: Generate.cssClassName(nameResult.name), fileName: Generate.fileName(nameResult.name), jsClassName: Generate.jsClassName(nameResult.name), name: nameResult.name });
<<<<<<<
// Generator.q = Q;
=======
>>>>>>> |
<<<<<<<
//node.type = createGetSetter.call(osc, ['type', 'frequency', 'waveType']);
var createGetSetter = function (node, arrayOfParams) {
var that = this;
arrayOfParams.forEach(function (param, index) {
node[param] = function (val) {
if (typeof val === 'undefined') {
if (that[param].hasOwnProperty('value')) {
return that[param].value;
} else {
return that[param];
}
} else {
if (that[param].hasOwnProperty('value')) {
that[param].value = val;
} else {
that[param] = val;
}
}
=======
var createGetSetter = function (paramToGetSet) {
return function (val) {
if (typeof val === 'undefined') {
if (paramToGetSet.hasOwnProperty('value')) {
return paramToGetSet.value;
} else {
return paramToGetSet;
}
} else {
if (paramToGetSet.hasOwnProperty('value')) {
paramToGetSet.value = val;
} else {
paramToGetSet = val;
}
>>>>>>>
var createGetSetter = function (node, arrayOfParams) {
var that = this;
arrayOfParams.forEach(function (param, index) {
node[param] = function (val) {
if (typeof val === 'undefined') {
if (that[param].hasOwnProperty('value')) {
return that[param].value;
} else {
return that[param];
}
} else {
if (that[param].hasOwnProperty('value')) {
that[param].value = val;
} else {
that[param] = val;
}
}
<<<<<<<
node = tsw.createNode({
nodeType: 'gain'
});
createGetSetter.call(gainNode, node, ['gain']);
=======
if (isObject(volume)) {
if (volume.hasOwnProperty('gain')) {
volume = volume.gain.value;
}
}
node = tsw.createNode();
node.nodeType = 'gain';
node.gain = createGetSetter(gainNode.gain);
>>>>>>>
node = tsw.createNode({
nodeType: 'gain'
});
createGetSetter.call(gainNode, node, ['gain']);
if (isObject(volume)) {
if (volume.hasOwnProperty('gain')) {
volume = volume.gain.value;
}
}
<<<<<<<
tsw.connect(node.input, gainNode, node.output);
=======
console.log(volume);
tsw.connect(node.input, gainNode, node.output);
>>>>>>>
tsw.connect(node.input, gainNode, node.output);
<<<<<<<
createGetSetter.call(filter, node, ['type', 'frequency', 'Q']);
=======
node.type = createGetSetter(filter.type);
node.frequency = createGetSetter(filter.frequency);
node.Q = createGetSetter(filter.Q);
>>>>>>>
createGetSetter.call(filter, node, ['type', 'frequency', 'Q']);
node.type = createGetSetter(filter.type);
node.frequency = createGetSetter(filter.frequency);
node.Q = createGetSetter(filter.Q); |
<<<<<<<
/** global: edit_selected_txt, edit_bulk_selected_txt, delete_selected_txt */
=======
/** global: edit_selected_txt, delete_selected_txt, token */
>>>>>>>
/** global: edit_selected_txt, edit_bulk_selected_txt, delete_selected_txt, token */ |
<<<<<<<
var crypto= require("crypto");
=======
var dns = require('dns');
>>>>>>>
var crypto= require("crypto");
var dns = require('dns');
<<<<<<<
if (this.forceClose) this.forceClose(e);
=======
self.destroy(e);
>>>>>>>
if (this.forceClose) this.forceClose(e);
self.destroy(e);
<<<<<<<
if (self.secure && bytesRead == 0 && secureBytesRead > 0){
// Deal with SSL handshake
if (self.server) {
self._checkForSecureHandshake();
} else {
if (self.secureEstablised) {
self.flush();
} else {
self._checkForSecureHandshake();
}
}
} else if (bytesRead === 0) {
=======
if (bytesRead === 0) {
// EOF
>>>>>>>
if (self.secure && bytesRead == 0 && secureBytesRead > 0){
// Deal with SSL handshake
if (self.server) {
self._checkForSecureHandshake();
} else {
if (self.secureEstablised) {
self.flush();
} else {
self._checkForSecureHandshake();
}
}
} else if (bytesRead === 0) {
<<<<<<<
if (!this.writable) {
if (this.secure) return false;
else throw new Error('Stream is not writable');
}
=======
if (!this.writable) throw new Error('Stream is not writable');
if (data.length == 0) return true;
>>>>>>>
if (!this.writable) {
if (this.secure) return false;
else throw new Error('Stream is not writable');
}
if (data.length == 0) return true; |
<<<<<<<
(util.isFunction(list.listener) && list.listener === listener)) {
this._events[type] = undefined;
=======
(typeof list.listener === 'function' && list.listener === listener)) {
delete this._events[type];
>>>>>>>
(util.isFunction(list.listener) && list.listener === listener)) {
delete this._events[type]; |
<<<<<<<
assert.equal(0, Buffer('hello').slice(0, 0).length);
// test hex toString
console.log('Create hex string from buffer');
var hexb = new Buffer(256);
for (var i = 0; i < 256; i ++) {
hexb[i] = i;
}
var hexStr = hexb.toString('hex');
assert.equal(hexStr,
'000102030405060708090a0b0c0d0e0f'+
'101112131415161718191a1b1c1d1e1f'+
'202122232425262728292a2b2c2d2e2f'+
'303132333435363738393a3b3c3d3e3f'+
'404142434445464748494a4b4c4d4e4f'+
'505152535455565758595a5b5c5d5e5f'+
'606162636465666768696a6b6c6d6e6f'+
'707172737475767778797a7b7c7d7e7f'+
'808182838485868788898a8b8c8d8e8f'+
'909192939495969798999a9b9c9d9e9f'+
'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf'+
'b0b1b2b3b4b5b6b7b8b9babbbcbdbebf'+
'c0c1c2c3c4c5c6c7c8c9cacbcccdcecf'+
'd0d1d2d3d4d5d6d7d8d9dadbdcdddedf'+
'e0e1e2e3e4e5e6e7e8e9eaebecedeeef'+
'f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff');
console.log('Create buffer from hex string');
var hexb2 = new Buffer(hexStr, 'hex');
for (var i = 0; i < 256; i ++) {
assert.equal(hexb2[i], hexb[i]);
}
// test an invalid slice end.
console.log('Try to slice off the end of the buffer');
var b = new Buffer([1,2,3,4,5]);
var b2 = b.toString('hex', 1, 10000);
var b3 = b.toString('hex', 1, 5);
var b4 = b.toString('hex', 1);
assert.equal(b2, b3);
assert.equal(b2, b4);
=======
assert.equal(0, Buffer('hello').slice(0, 0).length);
// Test slice on SlowBuffer GH-843
var SlowBuffer = process.binding('buffer').SlowBuffer;
function buildSlowBuffer (data) {
if (Array.isArray(data)) {
var buffer = new SlowBuffer(data.length);
data.forEach(function(v,k) {
buffer[k] = v;
});
return buffer;
};
return null;
}
var x = buildSlowBuffer([0x81,0xa3,0x66,0x6f,0x6f,0xa3,0x62,0x61,0x72]);
console.log(x.inspect())
assert.equal('<SlowBuffer 81 a3 66 6f 6f a3 62 61 72>', x.inspect());
var z = x.slice(4);
console.log(z.inspect())
console.log(z.length)
assert.equal(5, z.length);
assert.equal(0x6f, z[0]);
assert.equal(0xa3, z[1]);
assert.equal(0x62, z[2]);
assert.equal(0x61, z[3]);
assert.equal(0x72, z[4]);
var z = x.slice(0);
console.log(z.inspect())
console.log(z.length)
assert.equal(z.length, x.length);
var z = x.slice(0, 4);
console.log(z.inspect())
console.log(z.length)
assert.equal(4, z.length);
assert.equal(0x81, z[0]);
assert.equal(0xa3, z[1]);
var z = x.slice(0, 9);
console.log(z.inspect())
console.log(z.length)
assert.equal(9, z.length);
var z = x.slice(1, 4);
console.log(z.inspect())
console.log(z.length)
assert.equal(3, z.length);
assert.equal(0xa3, z[0]);
var z = x.slice(2, 4);
console.log(z.inspect())
console.log(z.length)
assert.equal(2, z.length);
assert.equal(0x66, z[0]);
assert.equal(0x6f, z[1]);
>>>>>>>
assert.equal(0, Buffer('hello').slice(0, 0).length);
// test hex toString
console.log('Create hex string from buffer');
var hexb = new Buffer(256);
for (var i = 0; i < 256; i ++) {
hexb[i] = i;
}
var hexStr = hexb.toString('hex');
assert.equal(hexStr,
'000102030405060708090a0b0c0d0e0f'+
'101112131415161718191a1b1c1d1e1f'+
'202122232425262728292a2b2c2d2e2f'+
'303132333435363738393a3b3c3d3e3f'+
'404142434445464748494a4b4c4d4e4f'+
'505152535455565758595a5b5c5d5e5f'+
'606162636465666768696a6b6c6d6e6f'+
'707172737475767778797a7b7c7d7e7f'+
'808182838485868788898a8b8c8d8e8f'+
'909192939495969798999a9b9c9d9e9f'+
'a0a1a2a3a4a5a6a7a8a9aaabacadaeaf'+
'b0b1b2b3b4b5b6b7b8b9babbbcbdbebf'+
'c0c1c2c3c4c5c6c7c8c9cacbcccdcecf'+
'd0d1d2d3d4d5d6d7d8d9dadbdcdddedf'+
'e0e1e2e3e4e5e6e7e8e9eaebecedeeef'+
'f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff');
console.log('Create buffer from hex string');
var hexb2 = new Buffer(hexStr, 'hex');
for (var i = 0; i < 256; i ++) {
assert.equal(hexb2[i], hexb[i]);
}
// test an invalid slice end.
console.log('Try to slice off the end of the buffer');
var b = new Buffer([1,2,3,4,5]);
var b2 = b.toString('hex', 1, 10000);
var b3 = b.toString('hex', 1, 5);
var b4 = b.toString('hex', 1);
assert.equal(b2, b3);
assert.equal(b2, b4);
// Test slice on SlowBuffer GH-843
var SlowBuffer = process.binding('buffer').SlowBuffer;
function buildSlowBuffer (data) {
if (Array.isArray(data)) {
var buffer = new SlowBuffer(data.length);
data.forEach(function(v,k) {
buffer[k] = v;
});
return buffer;
};
return null;
}
var x = buildSlowBuffer([0x81,0xa3,0x66,0x6f,0x6f,0xa3,0x62,0x61,0x72]);
console.log(x.inspect())
assert.equal('<SlowBuffer 81 a3 66 6f 6f a3 62 61 72>', x.inspect());
var z = x.slice(4);
console.log(z.inspect())
console.log(z.length)
assert.equal(5, z.length);
assert.equal(0x6f, z[0]);
assert.equal(0xa3, z[1]);
assert.equal(0x62, z[2]);
assert.equal(0x61, z[3]);
assert.equal(0x72, z[4]);
var z = x.slice(0);
console.log(z.inspect())
console.log(z.length)
assert.equal(z.length, x.length);
var z = x.slice(0, 4);
console.log(z.inspect())
console.log(z.length)
assert.equal(4, z.length);
assert.equal(0x81, z[0]);
assert.equal(0xa3, z[1]);
var z = x.slice(0, 9);
console.log(z.inspect())
console.log(z.length)
assert.equal(9, z.length);
var z = x.slice(1, 4);
console.log(z.inspect())
console.log(z.length)
assert.equal(3, z.length);
assert.equal(0xa3, z[0]);
var z = x.slice(2, 4);
console.log(z.inspect())
console.log(z.length)
assert.equal(2, z.length);
assert.equal(0x66, z[0]);
assert.equal(0x6f, z[1]); |
<<<<<<<
import warning from 'warning';
import styles from './DatePicker.less';
=======
import styles from './DatePickerOld.less';
>>>>>>>
import warning from 'warning';
import styles from './DatePickerOld.less'; |
<<<<<<<
sid: this.sid,
user: this.user,
=======
session: this.session,
>>>>>>>
sid: this.sid,
session: this.session, |
<<<<<<<
.option('--use-s3'
, 'use amazon s3')
.option('--s3-bucket <bucketname>'
, 'your Bucket name'
, String)
.option('--s3-profile <s3profile>'
, 'aws credential Profile name'
, String
, 'stf-storage')
.option('--s3-endpoint <s3endpoint>'
, 's3 endpoint'
, String
, 's3-ap-northeast-1.amazonaws.com')
.action(function() {
=======
.option('--lock-rotation'
, 'whether to lock rotation when devices are being used')
.action(function(serials, options) {
>>>>>>>
.option('--use-s3'
, 'use amazon s3')
.option('--s3-bucket <bucketname>'
, 'your Bucket name'
, String)
.option('--s3-profile <s3profile>'
, 'aws credential Profile name'
, String
, 'stf-storage')
.option('--s3-endpoint <s3endpoint>'
, 's3 endpoint'
, String
, 's3-ap-northeast-1.amazonaws.com')
.option('--lock-rotation'
, 'whether to lock rotation when devices are being used')
.action(function(serials, options) { |
<<<<<<<
options: grunt.util._.merge({
ignores: [
'lib/client/system/libs/*',
'lib/client/system/modules/*',
'lib/websocket/transports/engineio/*',
'test/helpers/connect.js',
'test/fixtures/**'
]
}, grunt.file.readJSON('.jshintrc')),
=======
options: grunt.util._.merge(
grunt.file.readJSON('.jshintrc'),
{
ignores: [
'lib/client/system/libs/*',
'lib/client/system/modules/*',
'lib/websocket/transports/engineio/*',
'test/fixtures/project/client/code/libs/*'
]
}
),
>>>>>>>
options: grunt.util._.merge(
grunt.file.readJSON('.jshintrc'),
{
ignores: [
'lib/client/system/libs/*',
'lib/client/system/modules/*',
'lib/websocket/transports/engineio/*',
'test/helpers/connect.js',
'test/fixtures/**'
]
}
), |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.