Skip to content

Commit 5f4fa61

Browse files
916: Remove unused code for download button r=carols10cents The download button has not been available since pre rust-1.0. The button was originally commented out in rust-lang#15 and rust-lang#18.
2 parents 6651eb3 + 1aecb45 commit 5f4fa61

File tree

4 files changed

+0
-30
lines changed

4 files changed

+0
-30
lines changed

app/adapters/version.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

app/controllers/crate/version.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
33
import ArrayProxy from '@ember/array/proxy';
44
import { computed } from '@ember/object';
55
import { later } from '@ember/runloop';
6-
import $ from 'jquery';
76
import moment from 'moment';
87

98
const NUM_VERSIONS = 5;
@@ -163,16 +162,6 @@ export default Controller.extend({
163162
this.toggleClipboardProps(false);
164163
},
165164

166-
download(version) {
167-
this.set('isDownloading', true);
168-
169-
version.getDownloadUrl().then(url => {
170-
this.incrementProperty('crate.downloads');
171-
this.incrementProperty('currentVersion.downloads');
172-
$('#download-frame').attr('src', url);
173-
}).finally(() => this.set('isDownloading', false));
174-
},
175-
176165
toggleFollow() {
177166
this.set('fetchingFollowing', true);
178167

app/models/version.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,4 @@ export default DS.Model.extend({
2020
crateName: computed('crate', function() {
2121
return this.belongsTo('crate').id();
2222
}),
23-
24-
getDownloadUrl() {
25-
return this.store.adapterFor('version').getDownloadUrl(this.get('dl_path'));
26-
},
2723
});

app/templates/crate/version.hbs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,6 @@
2222
{{/if}}
2323
</button>
2424
{{/if}}
25-
{{!--
26-
<a class='yellow-button' download
27-
{{action 'download' currentVersion}}
28-
href='{{currentVersion.dl_path}}'>
29-
<img class="button-download" src="/assets/button-download.png"/>
30-
Download
31-
</a>
32-
--}}
3325
</div>
3426
</div>
3527

0 commit comments

Comments
 (0)