From 8ff89a7141f248acde99333c200f04d9bba8def6 Mon Sep 17 00:00:00 2001 From: Meeeeow Date: Sat, 22 Jul 2017 02:11:17 +0800 Subject: [PATCH 1/2] feature: :lipstick: add publish introduce --- package-lock.json | 3 +-- src/webui/src/components/PackageList/index.js | 13 +++++++++- .../components/PackageList/packageList.scss | 24 ++++++++++++++++--- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 13c4f899b..632fe0418 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,7 @@ { "name": "verdaccio", - "version": "2.2.6", + "version": "2.3.0-beta", "lockfileVersion": 1, - "requires": true, "dependencies": { "@verdaccio/file-locking": { "version": "0.0.3", diff --git a/src/webui/src/components/PackageList/index.js b/src/webui/src/components/PackageList/index.js index 478021793..73fb7f65f 100644 --- a/src/webui/src/components/PackageList/index.js +++ b/src/webui/src/components/PackageList/index.js @@ -23,7 +23,18 @@ export default class PackageList extends React.Component { { this.props.packages.length ? this.renderList(): -
  • No Package Available
  • +
  • +

    No Package Published Yet

    +

    + To publish your first package just: +

    + 1. Login
    + npm adduser --registry {location.origin}
    + 2. Publish
    + npm publish --registry {location.origin}
    + 3. Done! +

    +
  • } ); diff --git a/src/webui/src/components/PackageList/packageList.scss b/src/webui/src/components/PackageList/packageList.scss index a50f97885..9c9bd9339 100644 --- a/src/webui/src/components/PackageList/packageList.scss +++ b/src/webui/src/components/PackageList/packageList.scss @@ -8,9 +8,27 @@ } li.noPkg { - text-align: center; - line-height: 3; + display: flex; + flex-direction: column; + align-items: center; + padding: 30px 0; font-size: 20px; - color: lightgrey; + color: #9f9f9f; + + .noPkgTitle { + margin: 0; + padding: 0; + font-size: 24px; + } + + p { + line-height: 1.5; + margin: 0 auto; + font-size: 14px; + } + + code { + font-style: italic; + } } } From c9c22ed08002207fbe665348ab48d1807085feb4 Mon Sep 17 00:00:00 2001 From: Meeeeow Date: Sat, 22 Jul 2017 02:25:00 +0800 Subject: [PATCH 2/2] fix: :bug: remove wrong code added in merge cause app crash --- src/api/web/api.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/api/web/api.js b/src/api/web/api.js index c92a61109..d1bff86bf 100644 --- a/src/api/web/api.js +++ b/src/api/web/api.js @@ -127,9 +127,6 @@ module.exports = function(config, auth, storage) { } else { next(HTTPError[err.message ? 401 : 500](err.message)); } - - let base = Utils.combineBaseUrl(Utils.getWebProtocol(req), req.get('host'), config.url_prefix); - res.redirect(base); }); });