Skip to content

Commit

Permalink
Merge pull request #13 from dmstern/#8-Include-package-contributors
Browse files Browse the repository at this point in the history
#8 include package contributors
  • Loading branch information
dmstern authored Aug 30, 2018
2 parents 229b050 + fcee6f1 commit aeffe69
Show file tree
Hide file tree
Showing 14 changed files with 312 additions and 131 deletions.
84 changes: 55 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"vuetify": "^1.0.19"
},
"devDependencies": {
"ajv": "^6.5.3",
"@babel/polyfill": "^7.0.0-beta.49",
"@fortawesome/fontawesome-free": "^5.3.0",
"@mdi/font": "^2.5.94",
Expand All @@ -45,7 +46,7 @@
"node-sass": "^4.9.0",
"pm2": "^3.0.3",
"sass-loader": "^7.0.1",
"typescript": "^3.0.1",
"typescript": "^2.1.0",
"vue-cli-plugin-vuetify": "^0.1.6",
"vue-template-compiler": "^2.5.16"
},
Expand Down
5 changes: 2 additions & 3 deletions server/artifactory-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function readme2Html(readmeFile) {
try {
readme = fs.readFileSync(readmeFile);
} catch (error) {
console.error(`README file not found: ${readmeFile}`);
console.warn(`README file not found: ${readmeFile}`);
throw error;
}

Expand Down Expand Up @@ -72,13 +72,12 @@ async function getPackageDetail({ scope, packageName }) { // TODO: #1 add cachin
: await axios.get(`/${name2url({ scope, packageName })}`);

const additionalCode = process.env.MOCK
? await new Promise((resolve, reject) => {
? await new Promise((resolve) => {
let packageResource = `${__dirname}/mock/${packageName}.readme.md`;
let data;
try {
data = readme2Html(packageResource);
} catch (error) {
console.error(error);
data = readme2Html(`${__dirname}/mock/fractal-menu-enhancer.readme.md`);
}
resolve({
Expand Down
5 changes: 4 additions & 1 deletion server/mock/schoenes-module.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"name": "schoenes-module",
"description": "wunderschoen",
"version": "1.1.0",
"author": "daniel <daniel@mail.com>",
"author": "daniel <mail@daniel.com>",
"main": "index.js",
"homepage": "https://github.io/voll/schoenes-module",
"keywords": [
Expand All @@ -72,6 +72,9 @@
},
"repository": "https://github.com/bla/blubb",
"license": "ISC",
"contributors": [
"daniel <mail@daniel.com>", "Kater Findus <findus@schweden.com>", "Alter Petterson"
],
"_id": "schoenes-module@1.1.0"
}
},
Expand Down
16 changes: 10 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@
@input="data.parent.selectItem(data.item)"
>
<v-avatar>
<v-icon v-if="data.item.key === 'author'">{{$vuetify.icons.author}}</v-icon>
<v-icon v-if="data.item.key === 'keyword'">{{$vuetify.icons.tag}}</v-icon>
<v-icon v-if="data.item.key in $vuetify.icons">{{$vuetify.icons[data.item.key]}}</v-icon>
</v-avatar>
<v-list-tile-sub-title> {{ data.item.value }}</v-list-tile-sub-title>
</v-chip>
Expand Down Expand Up @@ -209,6 +208,9 @@ export default class App extends Vue {
if (item.key === SearchKey.KEYWORD) {
searchText.push(`#${item.value}`);
}
if (item.key === SearchKey.AUTHOR) {
searchText.push(`author:${item.value}`);
}
return searchText;
}
Expand All @@ -227,7 +229,7 @@ export default class App extends Vue {
let filterMatchesItem: boolean = false;
switch (filter.key) {
case SearchKey.AUTHOR:
filterMatchesItem = filter.value === item.displayName;
filterMatchesItem = item.crafters.some((crafter) => filter.value === crafter.name);
break;
case SearchKey.KEYWORD:
if (item.keywords !== undefined) {
Expand All @@ -252,7 +254,9 @@ export default class App extends Vue {
if (filteredPackage instanceof Package) {
switch (item.key) {
case SearchKey.AUTHOR:
if (item.value === filteredPackage.displayName) {
if (filteredPackage.crafters.some((crafter) => {
return item.value === crafter.name;
})) {
return true;
}
case SearchKey.KEYWORD:
Expand Down Expand Up @@ -359,7 +363,6 @@ a {
.v-icon {
font-size: inherit;
vertical-align: baseline;
&,
Expand All @@ -382,7 +385,8 @@ a {
.subheading &,
.heading &,
.title &,
.subtitle & {
.subtitle &
.link--external & {
font-size: inherit;
transform: none;
}
Expand Down
Loading

0 comments on commit aeffe69

Please sign in to comment.