1
0
Fork 0
mirror of https://github.com/correl/melpa.git synced 2025-03-30 01:03:57 -09:00

Show which package cannot be found

This commit is contained in:
Steve Purcell 2014-08-16 16:10:24 +01:00
parent 2da5efa433
commit df60ea7168

View file

@ -271,18 +271,18 @@
melpa.packagedetails = {};
melpa.packagedetails.controller = function() {
var packageName = m.route.param("package");
this.packageName = m.route.param("package");
this.package = m.prop();
this.readme = m.prop('No description available.');
this.neededBy = m.prop([]);
this.downloadsPercentile = m.prop(0);
melpa.packageList.then(function(packageList) {
var p = packageList.packageWithName(packageName);
var p = packageList.packageWithName(this.packageName);
if (!p) return;
this.package(p);
this.downloadsPercentile(packageList.downloadsPercentileForPackage(p));
this.neededBy(packageList.dependenciesOnPackageName(packageName));
this.neededBy(packageList.dependenciesOnPackageName(this.packageName));
this.packageWithName = packageList.packageWithName;
m.request({method: "GET",
url: p.readmeURL,
@ -293,7 +293,7 @@
melpa.packagedetails.view = function(ctrl) {
var pkg = ctrl.package();
if (!pkg) return m("h1", "Package not found");
if (!pkg) return m("h1", ["Package not found: ", ctrl.packageName]);
this.depLink = function(dep) {
var depPkg = ctrl.packageWithName(dep.name);
var label = dep.name + " " + dep.version;