Skip to content

Commit

Permalink
adds addons layout to bower, npm
Browse files Browse the repository at this point in the history
  • Loading branch information
makepanic committed Feb 21, 2016
1 parent f619bda commit 04bc39e
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 85 deletions.
80 changes: 43 additions & 37 deletions app/templates/project/detail/install/bower.hbs
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
<table class="ui very compact table">
<thead>
<tr>
<th>name</th>
<th>version</th>
<th></th>
</tr>
</thead>
<tbody>
{{#each model.dependencies as |package|}}
<tr>
<td><a href="{{package.homepage}}">{{package.pkgMeta.name}}</a></td>
<td>{{package.version}}</td>
<td>
{{#if package.command.running}}
<button class="ui fluid icon loading button" {{action 'install' package}}>
Installing
</button>
{{else}}
{{#if (or (get project.model.package.devDependencies package.name) (get project.model.package.devDependencies package.name))}}
<button class="ui negative fluid button" {{action 'uninstall' package}}>
<i class="remove icon"></i>
Uninstall
</button>
{{else}}
<button class="ui fluid labeled icon button" {{action 'install' package}}>
<i class="plus icon"></i>
Install
</button>
{{/if}}
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
<div class="ui top attached segment">
<form class="ui form">
<div class="field">
<h4 class="ui header">Search package</h4>
<div class="ui fluid icon input">
<input type="text" placeholder="Package name">
<i class="search icon"></i>
</div>
</div>
</form>
</div>
<div class="ui attached segment flex-fill">
<h4 class="ui header">Found packages</h4>

{{outlet}}
<table class="ui very compact table">
<tbody>
{{#each model.dependencies as |package|}}
<tr>
<td><a href="{{package.homepage}}">{{package.pkgMeta.name}}</a></td>
<td>{{package.version}}</td>
<td>
{{#if package.command.running}}
<button class="ui fluid icon loading button" {{action 'install' package}}>
Installing
</button>
{{else}}
{{#if (or (get project.model.package.devDependencies package.name) (get project.model.package.devDependencies package.name))}}
<button class="ui negative fluid button" {{action 'uninstall' package}}>
<i class="remove icon"></i>
Uninstall
</button>
{{else}}
<button class="ui fluid labeled icon button" {{action 'install' package}}>
<i class="plus icon"></i>
Install
</button>
{{/if}}
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
96 changes: 48 additions & 48 deletions app/templates/project/detail/install/npm.hbs
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
<form class="ui form">
<div class="field">
<label>package name</label>
<div class="ui fluid icon input">
<input type="text" placeholder="Search..."
oninput={{action 'updateSearchResult'}}>
<i class="search icon"></i>
<div class="ui top attached segment">
<form class="ui form">
<div class="field">
<h4 class="ui header">Search package</h4>
<div class="ui fluid icon input">
<input type="text" placeholder="Package name"
oninput={{action 'updateSearchResult'}}>
<i class="search icon"></i>
</div>
</div>
</div>
</form>
</form>
</div>
<div class="ui attached segment flex-fill">
<h4 class="ui header">Found packages</h4>

<h4 class="ui header">Found packages</h4>

<table class="ui very compact table">
<thead>
<tr>
<th>name</th>
<th>version</th>
<th></th>
</tr>
</thead>
<tbody>
{{#each searchResults as |package|}}
<tr>
<td><a href="{{package.homepage}}">{{package.name}}</a></td>
<td>{{package.version}}</td>
<td>
{{#if package.command.running}}
<button class="ui fluid icon loading button" {{action 'install' package}}>
Installing
</button>
{{else}}
{{#if (or (get project.model.package.devDependencies package.name) (get project.model.package.devDependencies package.name))}}
<button class="ui negative fluid button" {{action 'uninstall' package}}>
<i class="remove icon"></i>
Uninstall
</button>
{{else}}
<button class="ui fluid labeled icon button" {{action 'install' package}}>
<i class="plus icon"></i>
Install
</button>
{{/if}}
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
{{outlet}}
<table class="ui very compact table">
<tbody>
{{#each searchResults as |package|}}
<tr>
<td class="center aligned">
{{#if package.rating}}
<a class="ui teal circular label">{{package.rating}}</a>
{{/if}}
</td>
<td><a href="{{package.homepage}}">{{package.name}}</a></td>
<td>{{package.version}}</td>
<td>
{{#if package.command.running}}
<button class="ui fluid icon loading button" {{action 'install' package}}>
Installing
</button>
{{else}}
{{#if (or (get project.model.package.devDependencies package.name) (get project.model.package.devDependencies package.name))}}
<button class="ui negative fluid button" {{action 'uninstall' package}}>
<i class="remove icon"></i>
Uninstall
</button>
{{else}}
<button class="ui fluid labeled icon button" {{action 'install' package}}>
<i class="plus icon"></i>
Install
</button>
{{/if}}
{{/if}}
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>

0 comments on commit 04bc39e

Please sign in to comment.