diff --git a/.sample.npmfrogrc.json b/.sample.npmfrogrc.json index 3415889..a924a97 100644 --- a/.sample.npmfrogrc.json +++ b/.sample.npmfrogrc.json @@ -4,5 +4,6 @@ "apiKey": "", "repoKey": "npm", "https": false - } + }, + "companyScope": "" } diff --git a/server/config-service.ts b/server/config-service.ts index 3188aa1..7d1d22e 100644 --- a/server/config-service.ts +++ b/server/config-service.ts @@ -1,13 +1,14 @@ import * as path from 'path'; import * as os from 'os'; import * as fs from 'fs-extra'; +import Config from '../types/Config'; const homedir = os.homedir(); const configFile = process.env.MOCK ? '.sample.npmfrogrc.json' : '.npmfrogrc.json'; -let config; +let config: Config; try { config = fs.readJSONSync(path.join(__dirname, '..', '..', configFile)); diff --git a/server/index.ts b/server/index.ts index 9077fa0..4c6ecd4 100644 --- a/server/index.ts +++ b/server/index.ts @@ -78,6 +78,7 @@ app.get('/config', (req, res) => { repoKey: config.artifactory.repoKey, https: config.artifactory.https, }, + companyScope: config.companyScope, }); } catch (error) { handleError(error, res, `Could not get npmFrog config from server.`); diff --git a/src/App.vue b/src/App.vue index 24dd5fd..10f9cb6 100644 --- a/src/App.vue +++ b/src/App.vue @@ -24,7 +24,7 @@ value="true" > - + {{$vuetify.icons[item.icon]}} @@ -170,6 +170,7 @@ import About from '@/components/About.vue'; import CrafterAvatar from '@/components/CrafterAvatar.vue'; import Crafter from '../types/Crafter'; import Searchable from '../types/Searchable'; +import * as vuetify from './plugins/vuetify'; @Component({ components: { @@ -197,8 +198,8 @@ export default class App extends Vue { private btnIconSize: number = 36; private navItems: Array<{ icon: string, title: string, target: string }> = [ { - icon: 'email', - title: 'howto', + icon: 'howto', + title: 'HowTo', target: 'howto', }, ]; @@ -467,6 +468,14 @@ code.hljs { vertical-align: baseline; } } + + .caption { + display: block; + background-color: rgba(255, 255, 255, 0.13); + padding: 6px; + margin: -40px -6px 0 -6px; + border-bottom: 1px solid rgba(100, 100, 100, 0.2); + } } .application .theme--dark.v-chip, diff --git a/src/components/About.vue b/src/components/About.vue index 531cb5c..fd7b23a 100644 --- a/src/components/About.vue +++ b/src/components/About.vue @@ -99,7 +99,9 @@ export default class About extends Vue { host: '', repoKey: '', https: false, + apiKey: '', }, + companyScope: '', }, }; this.loadMetaInfo(); diff --git a/src/plugins/vuetify.js b/src/plugins/vuetify.js index 21f606c..eb6a03f 100644 --- a/src/plugins/vuetify.js +++ b/src/plugins/vuetify.js @@ -25,6 +25,7 @@ const icons = { created: 'fas fa-bolt', updated: 'far fa-clock', about: 'fas fa-info-circle', + howto: 'far fa-question-circle', clear: 'fas fa-times', bug: 'fas fa-bug', contact: 'far fa-comments', diff --git a/src/views/HowTo.vue b/src/views/HowTo.vue index 330daff..d4e32b3 100644 --- a/src/views/HowTo.vue +++ b/src/views/HowTo.vue @@ -1,18 +1,119 @@ + + diff --git a/types/Config.ts b/types/Config.ts index af11acd..af96140 100644 --- a/types/Config.ts +++ b/types/Config.ts @@ -3,5 +3,7 @@ export default interface Config { host: string; repoKey: string; https: boolean; + apiKey: string; }; + companyScope: string; }