-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More progress removing prototype extensions (#2601)
- Loading branch information
1 parent
4fe0424
commit 6408d35
Showing
7 changed files
with
146 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,44 @@ | ||
import { action, computed, set } from '@ember/object'; | ||
import { action } from '@ember/object'; | ||
import { inject as service } from '@ember/service'; | ||
import Controller from '@ember/controller'; | ||
import { tracked } from '@glimmer/tracking'; | ||
|
||
import { TrackedArray } from 'tracked-built-ins'; | ||
|
||
import debounceComputed from 'ember-inspector/computed/debounce'; | ||
import searchMatch from 'ember-inspector/utils/search-match'; | ||
|
||
export default class DeprecationsController extends Controller { | ||
@service adapter; | ||
@service port; | ||
|
||
search = null; | ||
toggleDeprecationWorkflow = false; | ||
deprecations = new TrackedArray([]); | ||
@tracked search = null; | ||
@tracked toggleDeprecationWorkflow = false; | ||
|
||
@debounceComputed('search', 300) searchValue; | ||
|
||
constructor() { | ||
super(...arguments); | ||
set(this, 'deprecations', []); | ||
} | ||
|
||
@action | ||
changeDeprecationWorkflow(e) { | ||
this.set('toggleDeprecationWorkflow', e.target.checked); | ||
this.toggleDeprecationWorkflow = e.target.checked; | ||
|
||
this.port.send('deprecation:setOptions', { | ||
options: { toggleDeprecationWorkflow: this.toggleDeprecationWorkflow }, | ||
}); | ||
} | ||
|
||
@computed('[email protected]', 'search') | ||
get filtered() { | ||
return this.deprecations.filter((item) => | ||
searchMatch(item.message, this.search), | ||
); | ||
} | ||
|
||
@action | ||
clear() { | ||
this.port.send('deprecation:clear'); | ||
this.deprecations.splice(0, this.deprecations.length); | ||
} | ||
|
||
@action | ||
openResource(item) { | ||
this.adapter.openResource(item.fullSource, item.line); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.