Skip to content

Commit

Permalink
ui: Also remove the places we were using the files, like the tests
Browse files Browse the repository at this point in the history
We also referred to confirm/error in the confirmation dialog, but they
were never used (ever since we moved from native dialogs to HTML ones).

We lef tthe ability to use native dialogs, but we are never going to go
back there so we may as well remove them now.
  • Loading branch information
John Cowen committed Dec 4, 2019
1 parent f3d4f33 commit 49f8e07
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 72 deletions.
18 changes: 1 addition & 17 deletions ui-v2/app/components/confirmation-dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Component from '@ember/component';

import SlotsMixin from 'block-slots';
import { set } from '@ember/object';
import { inject as service } from '@ember/service';

const cancel = function() {
set(this, 'confirming', false);
Expand All @@ -15,25 +14,10 @@ const confirm = function() {
const [action, ...args] = arguments;
set(this, 'actionName', action);
set(this, 'arguments', args);
if (this._isRegistered('dialog')) {
set(this, 'confirming', true);
} else {
this._confirm
.execute(this.message)
.then(confirmed => {
if (confirmed) {
this.execute();
}
})
.catch(function() {
return this.error.execute(...arguments);
});
}
set(this, 'confirming', true);
};
export default Component.extend(SlotsMixin, {
classNameBindings: ['confirming'],
_confirm: service('confirm'),
error: service('error'),
classNames: ['with-confirmation'],
message: 'Are you sure?',
confirming: false,
Expand Down
12 changes: 0 additions & 12 deletions ui-v2/tests/unit/services/confirm-test.js

This file was deleted.

12 changes: 0 additions & 12 deletions ui-v2/tests/unit/services/error-test.js

This file was deleted.

17 changes: 0 additions & 17 deletions ui-v2/tests/unit/utils/confirm-test.js

This file was deleted.

14 changes: 0 additions & 14 deletions ui-v2/tests/unit/utils/makeAttrable-test.js

This file was deleted.

0 comments on commit 49f8e07

Please sign in to comment.