mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
Merge pull request #772 from ayusharma/761-license-field-is-not-correct-aligned-ui
fix: license field alignment on web ui (#761)
This commit is contained in:
commit
e2ffa0b6e7
3 changed files with 4 additions and 6 deletions
|
@ -35,13 +35,9 @@ export default class Package extends React.Component {
|
|||
}
|
||||
|
||||
renderPublished(pkg) {
|
||||
if (pkg.time) {
|
||||
return (<div className={classes.homepage}>
|
||||
{`Published ${formatDateDistance(pkg.time)} ago`}
|
||||
{pkg.time ? `Published ${formatDateDistance(pkg.time)} ago`: ''}
|
||||
</div>);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
renderLicense(pkg) {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`<PackageList /> component should load the component with packages 1`] = `"<div class=\\"package-list-items\\"><div class=\\"pkgContainer\\"><h1 class=\\"listTitle\\">Available Packages</h1><li><section class=\\"package\\"><a href=\\"detail/verdaccio\\"><div class=\\"header\\"><div class=\\"title\\"><h1>verdaccio <span class=\\"el-tag el-tag--gray\\">v1.0.0</span></h1></div><div role=\\"author\\" class=\\"author\\">By: Sam</div></div><div class=\\"footer\\"><p class=\\"description\\">Private NPM repository</p></div><div class=\\"details\\"></div></a></section></li><li><section class=\\"package\\"><a href=\\"detail/abc\\"><div class=\\"header\\"><div class=\\"title\\"><h1>abc <span class=\\"el-tag el-tag--gray\\">v1.0.1</span></h1></div><div role=\\"author\\" class=\\"author\\">By: Rose</div></div><div class=\\"footer\\"><p class=\\"description\\">abc description</p></div><div class=\\"details\\"></div></a></section></li><li><section class=\\"package\\"><a href=\\"detail/xyz\\"><div class=\\"header\\"><div class=\\"title\\"><h1>xyz <span class=\\"el-tag el-tag--gray\\">v1.1.0</span></h1></div><div role=\\"author\\" class=\\"author\\">By: Martin</div></div><div class=\\"footer\\"><p class=\\"description\\">xyz description</p></div><div class=\\"details\\"></div></a></section></li></div></div>"`;
|
||||
exports[`<PackageList /> component should load the component with packages 1`] = `"<div class=\\"package-list-items\\"><div class=\\"pkgContainer\\"><h1 class=\\"listTitle\\">Available Packages</h1><li><section class=\\"package\\"><a href=\\"detail/verdaccio\\"><div class=\\"header\\"><div class=\\"title\\"><h1>verdaccio <span class=\\"el-tag el-tag--gray\\">v1.0.0</span></h1></div><div role=\\"author\\" class=\\"author\\">By: Sam</div></div><div class=\\"footer\\"><p class=\\"description\\">Private NPM repository</p></div><div class=\\"details\\"><div class=\\"homepage\\">Published less than a minute ago</div></div></a></section></li><li><section class=\\"package\\"><a href=\\"detail/abc\\"><div class=\\"header\\"><div class=\\"title\\"><h1>abc <span class=\\"el-tag el-tag--gray\\">v1.0.1</span></h1></div><div role=\\"author\\" class=\\"author\\">By: Rose</div></div><div class=\\"footer\\"><p class=\\"description\\">abc description</p></div><div class=\\"details\\"><div class=\\"homepage\\">Published less than a minute ago</div></div></a></section></li><li><section class=\\"package\\"><a href=\\"detail/xyz\\"><div class=\\"header\\"><div class=\\"title\\"><h1>xyz <span class=\\"el-tag el-tag--gray\\">v1.1.0</span></h1></div><div role=\\"author\\" class=\\"author\\">By: Martin</div></div><div class=\\"footer\\"><p class=\\"description\\">xyz description</p></div><div class=\\"details\\"><div class=\\"homepage\\"></div></div></a></section></li></div></div>"`;
|
||||
|
|
|
@ -32,12 +32,14 @@ describe('<PackageList /> component', () => {
|
|||
{
|
||||
name: 'verdaccio',
|
||||
version: '1.0.0',
|
||||
time: new Date(),
|
||||
description: 'Private NPM repository',
|
||||
author: { name: 'Sam' }
|
||||
},
|
||||
{
|
||||
name: 'abc',
|
||||
version: '1.0.1',
|
||||
time: new Date(),
|
||||
description: 'abc description',
|
||||
author: { name: 'Rose' }
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue