Skip to content

Commit

Permalink
Remove {{x-app}}
Browse files Browse the repository at this point in the history
  • Loading branch information
nummi committed Oct 1, 2019
1 parent df45d75 commit eb52384
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 115 deletions.
38 changes: 0 additions & 38 deletions app/components/x-app.js

This file was deleted.

4 changes: 4 additions & 0 deletions app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ export default Controller.extend({
});
}),

setActive: action(function(bool) {
this.set('active', bool);
}),

/*
* Called when inspecting an object from outside of the ObjectInspector
*/
Expand Down
154 changes: 77 additions & 77 deletions app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
<div class="ember-view">
{{#x-app
active=this.active
isDragging=this.isDragging
}}
{{#if this.isEmberApplication}}
<div class="split">
<div class="split__panel">
{{!-- Begin main --}}
<div class="split split--main">
<Ui::DraggableColumn
@classes="split__panel split__panel--sidebar-1"
@setIsDragging={{action "setIsDragging"}}
@side="left"
@width={{this.navWidth}}
>
<div class="split__panel__hd">
{{app-picker}}
</div>
<div class="split__panel__bd">
<SideNav @deprecationCount={{this.deprecationCount}} />
</div>
<div class="split__panel__ft">
<a target="_blank" href="https://github.com/emberjs/ember-inspector/issues">
Submit an Issue
</a>
</div>
</Ui::DraggableColumn>

<div class="split__panel">
<div class="split__panel__hd">
{{outlet "toolbar"}}
<button
class="sidebar-toggle toolbar__icon-button {{if this.inspectorExpanded "flip"}}"
{{on "click" this.toggleInspector}}
>
{{svg-jar "sidebar-toggle" width="16" height="16"}}
</button>
</div>
<div
class="ember-view app {{if this.active "" "inactive"}} {{if this.isDragging "isDragging"}}"
tabindex="1"
{{on "focusin" (fn this.setActive true)}}
{{on "focusout" (fn this.setActive false)}}
>
{{#if this.isEmberApplication}}
<div class="split">
<div class="split__panel">
{{!-- Begin main --}}
<div class="split split--main">
<Ui::DraggableColumn
@classes="split__panel split__panel--sidebar-1"
@setIsDragging={{action "setIsDragging"}}
@side="left"
@width={{this.navWidth}}
>
<div class="split__panel__hd">
{{app-picker}}
</div>
<div class="split__panel__bd">
<SideNav @deprecationCount={{this.deprecationCount}} />
</div>
<div class="split__panel__ft">
<a target="_blank" href="https://github.com/emberjs/ember-inspector/issues">
Submit an Issue
</a>
</div>
</Ui::DraggableColumn>

<MainContent class="split__panel__bd">
{{outlet}}
</MainContent>
<div class="split__panel">
<div class="split__panel__hd">
{{outlet "toolbar"}}
<button
class="sidebar-toggle toolbar__icon-button {{if this.inspectorExpanded "flip"}}"
{{on "click" this.toggleInspector}}
>
{{svg-jar "sidebar-toggle" width="16" height="16"}}
</button>
</div>
</div>

{{!-- End main --}}
<MainContent class="split__panel__bd">
{{outlet}}
</MainContent>
</div>
</div>

{{#if this.inspectorExpanded}}
<Ui::DraggableColumn
@classes="split__panel"
@setIsDragging={{action "setIsDragging"}}
@side="right"
@width={{this.inspectorWidth}}
>
<ObjectInspector
@popMixinDetails={{this.popMixinDetails}}
@model={{this.mixinStack}}
@mixinDetails={{this.mixinDetails}}
/>
</Ui::DraggableColumn>
{{/if}}
{{!-- End main --}}
</div>
{{else}}
<Ui::ErrorPage @description="Ember application not detected!">
<ul>
<li>This is not an Ember application.</li>
<li>You are using an old version of Ember (&lt; rc5).</li>
{{#if this.isChrome}}
<li>
You are using the file:// protocol (instead of http://), in which case:

<ul>
<li>Visit the URL: chrome://extensions.</li>
<li>Find the Ember Inspector.</li>
<li>Make sure "Allow access to file URLs" is checked.</li>
</ul>
</li>
{{/if}}
</ul>
</Ui::ErrorPage>
{{/if}}
{{/x-app}}
{{#if this.inspectorExpanded}}
<Ui::DraggableColumn
@classes="split__panel"
@setIsDragging={{action "setIsDragging"}}
@side="right"
@width={{this.inspectorWidth}}
>
<ObjectInspector
@popMixinDetails={{this.popMixinDetails}}
@model={{this.mixinStack}}
@mixinDetails={{this.mixinDetails}}
/>
</Ui::DraggableColumn>
{{/if}}
</div>
{{else}}
<Ui::ErrorPage @description="Ember application not detected!">
<ul>
<li>This is not an Ember application.</li>
<li>You are using an old version of Ember (&lt; rc5).</li>
{{#if this.isChrome}}
<li>
You are using the file:// protocol (instead of http://), in which case:

<ul>
<li>Visit the URL: chrome://extensions.</li>
<li>Find the Ember Inspector.</li>
<li>Make sure "Allow access to file URLs" is checked.</li>
</ul>
</li>
{{/if}}
</ul>
</Ui::ErrorPage>
{{/if}}
</div>

0 comments on commit eb52384

Please sign in to comment.