Skip to content

Commit

Permalink
chore: Release v1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
iamareebjamal authored Feb 2, 2020
2 parents 4862912 + 98f7251 commit e0b933c
Show file tree
Hide file tree
Showing 155 changed files with 4,749 additions and 3,292 deletions.
11 changes: 9 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ module.exports = {
sourceType: 'module'
},
plugins: [
'ember'
'ember',
'ember-suave'
],
extends: [
'eslint:recommended',
Expand Down Expand Up @@ -66,10 +67,16 @@ module.exports = {
'new-cap': 'off',
'eqeqeq': ['error', 'smart'],
'one-var': 'off',
'padding-line-between-statements': 'off',
'lines-between-class-members': ['error', "always", { exceptAfterSingleLine: true }],
'ember-suave/no-const-outside-module-scope': 'off',
'ember-suave/require-access-in-comments': 'off',
'ember-suave/lines-between-object-properties': 'off',
'ember/no-get': 'error',
'ember/no-get-properties': 'error',
// TODO: Re-enable later
'no-duplicate-imports': 'warn',
'no-await-in-loop': 'warn',
'import/no-relative-parent-imports': 'warn',
},
globals: {
module : true,
Expand Down
10 changes: 9 additions & 1 deletion .template-lintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ module.exports = {
rules: {
'no-nested-interactive': {
ignoredTags: ['label'] // Allow label tag inside a or any other interactive element
}
},
'link-rel-noopener': true,
// TODO: Remove and fix
'require-button-type': false,
'no-partial': false,
'require-valid-alt-text': false,
'no-inline-styles': false,
'no-negated-condition': false,
'no-invalid-meta': false // Crashing the linter https://github.com/ember-template-lint/ember-template-lint/pull/1087
}
};
17 changes: 6 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ language: node_js
node_js:
- "12"


# sudo: required

# services:
# - docker

env:
- CXX=g++-4.8 JOBS=1 PATH=$PATH:${HOME}/google-cloud-sdk/bin CLOUDSDK_CORE_DISABLE_PROMPTS=1

Expand All @@ -25,10 +19,7 @@ addons:

before_install:
- export PATH="$(yarn global bin):$PATH"
- yarn global add greenkeeper-lockfile@1

before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
install: yarn

script:
Expand All @@ -37,11 +28,10 @@ script:
- yarn lint:scss
- COVERAGE=true yarn test
- ROOT_URL=open-event-frontend ember build -prod
- bash scripts/test_fastboot.sh

after_success:
- 'bash <(curl -s https://codecov.io/bash)'
- bash kubernetes/travis/docker-deploy.sh
# - bash kubernetes/travis/k8s-deploy.sh

deploy:
provider: pages
Expand All @@ -51,3 +41,8 @@ deploy:
local-dir: dist/
on:
branch: development

branches:
only:
- master
- development
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ COPY --from=builder /app/dist/ dist/
RUN apk add --no-cache ca-certificates && \
cp dist/package.json . && \
yarn install && \
yarn add fastboot-app-server dotenv lodash safe-eval && \
yarn add fastboot-app-server dotenv lodash && \
rm -rf yarn.lock && \
yarn cache clean

Expand Down
3 changes: 1 addition & 2 deletions app/adapters/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { computed } from '@ember/object';
import ENV from 'open-event-frontend/config/environment';
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import HasManyQueryAdapterMixin from 'ember-data-has-many-query/mixins/rest-adapter';
import AdapterFetch from 'ember-fetch/mixins/adapter-fetch';
import FastbootAdapter from 'ember-data-storefront/mixins/fastboot-adapter';

/**
Expand All @@ -20,7 +19,7 @@ export const fixFilterQuery = query => {
return query;
};

export default JSONAPIAdapter.extend(HasManyQueryAdapterMixin, AdapterFetch, FastbootAdapter, {
export default JSONAPIAdapter.extend(HasManyQueryAdapterMixin, FastbootAdapter, {
host : ENV.APP.apiHost,
namespace : ENV.APP.apiNamespace,

Expand Down
4 changes: 2 additions & 2 deletions app/components/account/application-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ export default Component.extend({
this.loader.load(`/auth/oauth/login/${ provider }/${ authData.authorizationCode }/?redirect_uri=${ authData.redirectUri}`)
.then(async response => {
let credentials = {
'identification' : response.email,
'password' : response.facebook_login_hash
'username' : response.email,
'password' : response.facebook_login_hash
};

let authenticator = 'authenticator:jwt';
Expand Down
2 changes: 1 addition & 1 deletion app/components/account/password-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default Component.extend(FormMixin, {
},
submit() {
this.onValid(() => {
this.sendAction('changePassword', this.getProperties('passwordCurrent', 'passwordNew'));
this.sendAction('changePassword', { passwordCurrent: this.passwordCurrent, passwordNew: this.passwordNew });
});
}
}
Expand Down
4 changes: 4 additions & 0 deletions app/components/event-invoice/billing-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Component from '@ember/component';

export default Component.extend({
});
4 changes: 4 additions & 0 deletions app/components/event-invoice/event-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Component from '@ember/component';

export default Component.extend({
});
4 changes: 4 additions & 0 deletions app/components/event-invoice/invoice-summary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Component from '@ember/component';

export default Component.extend({
});
4 changes: 4 additions & 0 deletions app/components/event-invoice/payee-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Component from '@ember/component';

export default Component.extend({
});
14 changes: 0 additions & 14 deletions app/components/forms/admin/settings/system-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,6 @@ export default Component.extend(FormMixin, {
prompt : this.l10n.t('Please enter the token for Sendgrid')
}
]
},

secretKey: {
identifier : 'secret_key',
rules : [
{
type : 'empty',
prompt : this.l10n.t('Please enter the application secret key')
},
{
type : 'minLength[16]',
prompt : this.l10n.t('Your application secret key must have at least {ruleValue} characters')
}
]
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion app/components/forms/admin/settings/system/captcha-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import Component from '@ember/component';

export default class extends Component {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import Component from '@ember/component';

export default class extends Component {

}
}
6 changes: 3 additions & 3 deletions app/components/forms/login-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class extends Component.extend(FormMixin) {
@action
async submit() {
this.onValid(async() => {
let credentials = this.getProperties('identification', 'password'),
let credentials = { username: this.identification, password: this.password },
authenticator = 'authenticator:jwt';
this.setProperties({
errorMessage : null,
Expand All @@ -60,8 +60,8 @@ export default class extends Component.extend(FormMixin) {

}
} catch (e) {
if (e.error) {
this.set('errorMessage', this.l10n.tVar(e.error));
if (e.json && e.json.error) {
this.set('errorMessage', this.l10n.tVar(e.json.error));
} else {
this.set('errorMessage', this.l10n.t('An unexpected error occurred.'));
}
Expand Down
2 changes: 2 additions & 0 deletions app/components/forms/orders/order-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from 'open-event-frontend/utils/validators';
import { genders } from 'open-event-frontend/utils/dictionary/genders';
import { ageGroups } from 'open-event-frontend/utils/dictionary/age-groups';
import { countries } from 'open-event-frontend/utils/dictionary/demography';

export default Component.extend(FormMixin, {
router: service(),
Expand Down Expand Up @@ -479,6 +480,7 @@ export default Component.extend(FormMixin, {

genders : orderBy(genders, 'name'),
ageGroups : orderBy(ageGroups, 'age'),
countries : orderBy(countries, 'name'),

actions: {
submit(data) {
Expand Down
13 changes: 8 additions & 5 deletions app/components/modals/cropper-modal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import ModalBase from 'open-event-frontend/components/modals/modal-base';
import { action } from '@ember/object';
export default class extends ModalBase {
Expand All @@ -8,8 +9,8 @@ export default class extends ModalBase {
viewport.width = aspectRatio[0] * factor;
viewport.height = aspectRatio[1] * factor;
viewport.type = 'square';
this.$('.content').css('height', '300px');
this.$('img').croppie({
$('.content', this.element).css('height', '300px');
$('img', this.element).croppie({
customClass : 'croppie',
viewport,
boundary : {
Expand All @@ -19,21 +20,23 @@ export default class extends ModalBase {
}

onHide() {
this.$('img').croppie('destroy');
const $img = this.$('img');
const $img = $('img', this.element);
$img.croppie('destroy');
if ($img.parent().is('div.croppie')) {
$img.unwrap();
}

}

@action
resetImage() {
this.onHide();
this.onVisible();
}

@action
cropImage() {
this.$('img').croppie('result', { type: 'base64', size: 'original', quality: 1, format: 'jpeg' }).then(result => {
$('img', this.element).croppie('result', { type: 'base64', size: 'original', quality: 1, format: 'jpeg' }).then(result => {
if (this.onImageCrop) {
this.onImageCrop(result);
}
Expand Down
15 changes: 9 additions & 6 deletions app/components/modals/modal-base.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import { observer } from '@ember/object';
import { assign } from '@ember/polyfills';
import { merge } from 'lodash-es';
Expand All @@ -9,10 +10,11 @@ export default UiModal.extend({
classNameBindings : ['isFullScreen:fullscreen', 'isSmall:small', 'isLarge:large'],

openObserver: observer('isOpen', function() {
const $element = $(this.element);
if (this.isOpen) {
this.$().modal('show');
$element.modal('show');
} else {
this.$().modal('hide');
$element.modal('hide');
}
}),

Expand All @@ -33,7 +35,7 @@ export default UiModal.extend({
didRender() {
this._super(...arguments);
try {
this.$().modal('refresh');
$(this.element).modal('refresh');
} catch (ignored) { /* ignored exception */ }
},

Expand Down Expand Up @@ -69,8 +71,9 @@ export default UiModal.extend({

onVisible: () => {
this.set('isOpen', true);
this.$().modal('refresh');
this.$('[data-content]').popup({
const $element = $(this.element);
$element.modal('refresh');
$element.find('[data-content]').popup({
inline: true
});
if (this.onVisible) {
Expand All @@ -85,7 +88,7 @@ export default UiModal.extend({

didInitSemantic() {
if (this.isOpen) {
this.$().modal('show');
$(this.element).modal('show');
}
}
});
6 changes: 4 additions & 2 deletions app/components/modals/tax-info-modal.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import $ from 'jquery';
import { computed } from '@ember/object';
import ModalBase from 'open-event-frontend/components/modals/modal-base';
import FormMixin from 'open-event-frontend/mixins/form';
Expand Down Expand Up @@ -128,8 +129,9 @@ export default ModalBase.extend(FormMixin, {

actions: {
updateTaxInfo() {
this.$('.ui.form').form('validate form');
if (this.$('.ui.form').form('is valid')) {
const $form = $('.ui.form', this.element);
$form.form('validate form');
if ($form.form('is valid')) {
this.set('tax.isTaxIncludedInPrice', this.isTaxIncludedInPrice === 'include');
this.close();
this.set('hasTaxInfo', true);
Expand Down
5 changes: 3 additions & 2 deletions app/components/notification-dropdown.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import $ from 'jquery';
import Component from '@ember/component';

export default Component.extend({
classNames : ['notification item'],
tagName : 'a',
didInsertElement() {
this._super.call(this);
this.$().popup({
$(this.element).popup({
popup : '.popup',
on : 'click'
});
},
willDestroyElement() {
this._super.call(this);
this.$().popup('destroy');
$(this.element).popup('destroy');
},
actions: {
markRead(notification) {
Expand Down
4 changes: 4 additions & 0 deletions app/components/orders/organizer-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import Component from '@ember/component';

export default Component.extend({
});
2 changes: 1 addition & 1 deletion app/components/paypal-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ export default Component.extend({

}
}
});
});
3 changes: 1 addition & 2 deletions app/components/public/ticket-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import Component from '@ember/component';
import { computed } from '@ember/object';
import FormMixin from 'open-event-frontend/mixins/form';
import { inject as service } from '@ember/service';
import { sumBy } from 'lodash-es';
import { sumBy, merge } from 'lodash-es';
import { A } from '@ember/array';
import { merge } from 'lodash-es';

export default Component.extend(FormMixin, {
store: service(),
Expand Down
Loading

0 comments on commit e0b933c

Please sign in to comment.