0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-03-25 02:32:52 -05:00

Added cases for no local packages

This commit is contained in:
Brian Peacock 2014-05-07 15:31:25 -05:00
parent 1e48eacbf8
commit 45e4208218
4 changed files with 41 additions and 2 deletions

View file

@ -120,4 +120,19 @@ h1 {
/*** Search Results ***/
.state-search #all-packages {
display: none;
}
.no-results {
text-align: center;
margin: 50px 0;
color: #888;
big {
font-size: 38px;
margin-bottom: 5px;
}
code {
font-size: 1.2em;
}
}

View file

@ -30,6 +30,13 @@
{{#each packages}}
{{> entry}}
{{/each}}
{{#unless items.length}}
<div class='no-results'>
<big>No Results</big><br>
Use <code>npm publish</code>
</div>
{{/unless}}
</div>
</div>

File diff suppressed because one or more lines are too long

View file

@ -345,7 +345,12 @@ Storage.prototype.get_local = function(callback) {
});
};
getPackage(0);
if(locals.length) {
getPackage(0);
}
else {
callback(null, []);
}
};
// function fetches package information from uplinks and synchronizes it with local data