Skip to content

Commit

Permalink
Remove "Authors" section from crate details page
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Mar 17, 2021
1 parent 86ff7ad commit 4f71941
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 23 deletions.
9 changes: 0 additions & 9 deletions app/components/crate-sidebar.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@
{{/each}}
</ul>
</div>

<div>
<h3>Authors</h3>
<ul>
{{#each @version.authorNames as |author|}}
<li>{{ format-email author }}</li>
{{/each}}
</ul>
</div>
</div>

<div local-class='bottom'>
Expand Down
10 changes: 0 additions & 10 deletions app/models/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default class Version extends Model {
@belongsTo('crate', { async: false }) crate;

@belongsTo('user', { async: false }) published_by;
@hasMany('users', { async: true }) authors;
@hasMany('dependency', { async: true }) dependencies;
@hasMany('version-download', { async: true }) version_downloads;

Expand Down Expand Up @@ -97,15 +96,6 @@ export default class Version extends Model {
.map(name => ({ name, isDefault: defaultFeatures.includes(name), dependencies: features[name] }));
}

@alias('loadAuthorsTask.last.value') authorNames;

@(task(function* () {
// trigger the async relationship to load the content
let authors = yield this.authors;
return authors.meta.names;
}).keepLatest())
loadAuthorsTask;

@alias('loadDepsTask.last.value.normal') normalDependencies;
@alias('loadDepsTask.last.value.build') buildDependencies;
@alias('loadDepsTask.last.value.dev') devDependencies;
Expand Down
4 changes: 0 additions & 4 deletions app/routes/crate/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ export default class VersionRoute extends Route {
setupController(controller, model) {
super.setupController(...arguments);

if (!model.version.authorNames) {
model.version.loadAuthorsTask.perform();
}

controller.loadReadmeTask.perform().catch(() => {
// ignored
});
Expand Down

0 comments on commit 4f71941

Please sign in to comment.