Skip to content

Commit 866c2b9

Browse files
chore: Release v1.8.0 (#3764)
chore: Release v1.8.0
2 parents a5ffd87 + f9645a4 commit 866c2b9

File tree

24 files changed

+118
-333
lines changed

24 files changed

+118
-333
lines changed

app/adapters/application.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ENV from 'open-event-frontend/config/environment';
44
import JSONAPIAdapter from 'ember-data/adapters/json-api';
55
import HasManyQueryAdapterMixin from 'ember-data-has-many-query/mixins/rest-adapter';
66
import AdapterFetch from 'ember-fetch/mixins/adapter-fetch';
7-
import CachedShoe from 'ember-cached-shoe';
7+
import FastbootAdapter from 'ember-data-storefront/mixins/fastboot-adapter';
88

99
/**
1010
* The backend server expects the filter in a serialized string format.
@@ -13,14 +13,14 @@ import CachedShoe from 'ember-cached-shoe';
1313
* @return {*}
1414
*/
1515
export const fixFilterQuery = query => {
16-
if (query.hasOwnProperty('filter')) {
16+
if (Object.prototype.hasOwnProperty.call(query, 'filter')) {
1717
query.filter = JSON.stringify(query.filter);
1818
}
1919

2020
return query;
2121
};
2222

23-
export default JSONAPIAdapter.extend(HasManyQueryAdapterMixin, AdapterFetch, CachedShoe, {
23+
export default JSONAPIAdapter.extend(HasManyQueryAdapterMixin, AdapterFetch, FastbootAdapter, {
2424
host : ENV.APP.apiHost,
2525
namespace : ENV.APP.apiNamespace,
2626

app/components/forms/admin/content/social-links-form.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ export default Component.extend(FormMixin, {
5151
}
5252
]
5353
},
54-
googlePlus: {
55-
identifier : 'google_plus',
54+
googleGroup: {
55+
identifier : 'google_group',
5656
optional : true,
5757
rules : [
5858
{
59-
type : 'containsExactly[plus.google.com]',
60-
prompt : this.l10n.t('Please enter a valid google plus url')
59+
type : 'containsExactly[groups.google.com]',
60+
prompt : this.l10n.t('Please enter a valid google group url')
6161
},
6262
{
6363
type : 'regExp',

app/components/forms/reset-password-form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default Component.extend(FormMixin, {
8585
this.router.transitionTo('login');
8686
})
8787
.catch(reason => {
88-
if (reason && reason.hasOwnProperty('errors') && reason.errors[0].status === 404) {
88+
if (reason && Object.prototype.hasOwnProperty.call(reason, 'errors') && reason.errors[0].status === 404) {
8989
this.set('errorMessage', this.l10n.t('No account is registered with this email address.'));
9090
} else {
9191
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));

app/components/forms/wizard/basic-details-step.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import FormMixin from 'open-event-frontend/mixins/form';
1111
import { inject as service } from '@ember/service';
1212
import EventWizardMixin from 'open-event-frontend/mixins/event-wizard';
1313
import { protocolLessValidUrlPattern } from 'open-event-frontend/utils/validators';
14+
import ENV from 'open-event-frontend/config/environment';
1415

1516
export default Component.extend(FormMixin, EventWizardMixin, {
1617

@@ -366,7 +367,7 @@ export default Component.extend(FormMixin, EventWizardMixin, {
366367
.then(authorization => {
367368
this.set('data.event.stripeAuthorization', this.store.createRecord('stripe-authorization', {
368369
stripeAuthCode : authorization.authorizationCode,
369-
stripePublishableKey : this.settings.stripePublishableKey
370+
stripePublishableKey : ENV.environment === 'development' || ENV.environment === 'test' ? this.settings.stripeTestPublishableKey : this.settings.stripePublishableKey
370371
}));
371372
})
372373
.catch(error => {

app/components/paypal-button.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export default Component.extend({
2222
};
2323

2424
paypal.Button.render({
25-
commit: true,
26-
27-
style: {
25+
commit : true,
26+
env : this.settings.paypalMode === 'sandbox' ? this.settings.paypalMode : 'production',
27+
style : {
2828
label : 'pay',
2929
size : 'medium', // tiny, small, medium
3030
color : 'gold', // orange, blue, silver
@@ -83,10 +83,9 @@ export default Component.extend({
8383
}
8484
};
8585
paypal.Button.render({
86-
env : 'sandbox',
86+
env : this.settings.paypalMode === 'sandbox' ? this.settings.paypalMode : 'production',
8787
commit : true,
88-
89-
style: {
88+
style : {
9089
label : 'pay',
9190
size : 'medium', // tiny, small, medium
9291
color : 'gold', // orange, blue, silver

app/controllers/oauth/callback.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default Controller.extend({
2323
})
2424
.catch(reason => {
2525
if (!(this.isDestroyed || this.isDestroying)) {
26-
if (reason && reason.hasOwnProperty('status_code') && reason.status_code === 401) {
26+
if (reason && Object.prototype.hasOwnProperty.call(reason, 'status_code') && reason.status_code === 401) {
2727
this.set('errorMessage', this.l10n.t('Your credentials were incorrect.'));
2828
} else {
2929
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));

app/controllers/public/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default Controller.extend({
9191
})
9292
.catch(reason => {
9393
if (!(this.isDestroyed || this.isDestroying)) {
94-
if (reason && reason.hasOwnProperty('status_code') && reason.status_code === 401) {
94+
if (reason && Object.prototype.hasOwnProperty.call(reason, 'status_code') && reason.status_code === 401) {
9595
this.set('errorMessage', this.l10n.t('Your credentials were incorrect.'));
9696
} else {
9797
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));

app/controllers/register.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default Controller.extend({
2525
}
2626
})
2727
.catch(reason => {
28-
if (reason && reason.hasOwnProperty('errors') && reason.errors[0].status === 409) {
28+
if (reason && Object.prototype.hasOwnProperty.call(reason, 'errors') && reason.errors[0].status === 409) {
2929
this.set('errorMessage', this.l10n.t('User already exists.'));
3030
} else {
3131
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
@@ -57,7 +57,7 @@ export default Controller.extend({
5757
})
5858
.catch(reason => {
5959
if (!(this.isDestroyed || this.isDestroying)) {
60-
if (reason && reason.hasOwnProperty('status_code') && reason.status_code === 401) {
60+
if (reason && Object.prototype.hasOwnProperty.call(reason, 'errors') && reason.status_code === 401) {
6161
this.set('errorMessage', this.l10n.t('Your credentials were incorrect.'));
6262
} else {
6363
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));

app/routes/public/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Route from '@ember/routing/route';
22
import moment from 'moment';
33
import { set } from '@ember/object';
44
import { inject as service } from '@ember/service';
5+
import ENV from 'open-event-frontend/config/environment';
56

67
export default Route.extend({
78
headData: service(),
@@ -65,7 +66,9 @@ export default Route.extend({
6566
tickets : []
6667
}),
6768

68-
attendees: []
69+
attendees: [],
70+
71+
mapConfig: ENV.APP.mapConfig
6972
};
7073
},
7174
afterModel(model) {

app/services/device.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default Service.extend({
3939
deviceType: computed('currentWidth', function() {
4040
let deviceType = 'computer';
4141
forOwn(breakpoints, (value, key) => {
42-
if (this.currentWidth >= value.min && (!value.hasOwnProperty('max') || this.currentWidth <= value.max)) {
42+
if (this.currentWidth >= value.min && (!Object.prototype.hasOwnProperty.call(value, 'max') || this.currentWidth <= value.max)) {
4343
deviceType = key;
4444
}
4545
});

0 commit comments

Comments
 (0)