Skip to content

Commit

Permalink
Merge 069429b into b59e779
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas Paz committed Sep 19, 2018
2 parents b59e779 + 069429b commit 773a308
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/dev.env.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')

module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
API_BASE_URL: JSON.stringify('http://localhost:8000/api'),
API_BASE_URL: JSON.stringify(process.env.API_BASE_URL || 'http://localhost:8000/api'),
})
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bothub-webapp",
"version": "1.10.3",
"version": "1.10.4",
"description": "Bothub web application",
"author": "Ilhasoft <contato@ilhasoft.com.br>",
"private": true,
Expand Down
20 changes: 20 additions & 0 deletions src/bh/assets/icons/flag-id.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions src/bh/assets/icons/flag-mn.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/bh/components/BhLanguageFlag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const languageCountryFlagDict = {
it: 'flag-it',
nl: 'flag-nl',
pt_br: 'flag-br',
id: 'flag-id',
mn: 'flag-mn',
};
export default {
Expand Down
4 changes: 4 additions & 0 deletions src/bh/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import FlagIt from 'bh/assets/icons/flag-it.svg';
import FlagNl from 'bh/assets/icons/flag-nl.svg';
import FlagPt from 'bh/assets/icons/flag-pt.svg';
import FlagUs from 'bh/assets/icons/flag-us.svg';
import FlagId from 'bh/assets/icons/flag-id.svg';
import FlagMn from 'bh/assets/icons/flag-mn.svg';


export const icons = {
Expand All @@ -33,6 +35,8 @@ export const icons = {
'flag-nl': FlagNl,
'flag-pt': FlagPt,
'flag-us': FlagUs,
'flag-id': FlagId,
'flag-mn': FlagMn,
};

/* istanbul ignore next */
Expand Down
18 changes: 17 additions & 1 deletion src/components/repository/RepositoryInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@
<div
v-if="available_languages"
class="repository-infospace">
<flags-list :languages="available_languages" />
<div class="repository-infospace-flags">
<bh-language-flag
v-for="language in available_languages"
:key="language"
:language="language"
class="repository-infospace-flags-item" />
</div>
</div>
<div v-if="!hideDescription">
<p
Expand Down Expand Up @@ -158,6 +164,16 @@ export default {
.repository {
&-infospace {
margin-bottom: .5rem;
&-flags {
$margin: .25rem;
margin: -($margin);
&-item {
margin: $margin;
}
}
}
&-description {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const VERBOSE_LANGUAGES = {
it: 'Italian',
nl: 'Dutch',
pt_br: 'Brazilian Portuguese',
id: 'Indonesian',
mn: 'Mongolian',
};

export const languageListToDict = list => (list.reduce((current, lang) => {
Expand Down
2 changes: 2 additions & 0 deletions test/unit/specs/components/repository/RepositoryInfo.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
jest.mock('@/api/request');

import { shallowMount, createLocalVue } from '@vue/test-utils';
import BH from 'bh';
import store from '@/store';
import router from '@/router';
import RepositoryInfo from '@/components/repository/RepositoryInfo';


const localVue = createLocalVue();
localVue.use(BH);

describe('RepositoryCard.vue', () => {
let wrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ exports[`RepositoryCard.vue renders correctly 1`] = `
</p>
</div>
<div class="repository-infospace">
<flagslist-stub></flagslist-stub>
<div class="repository-infospace-flags">
<bhlanguageflag-stub class="repository-infospace-flags-item"></bhlanguageflag-stub>
<bhlanguageflag-stub class="repository-infospace-flags-item"></bhlanguageflag-stub>
</div>
</div>
<div>
<p class="repository-description repository-description-empty">No description</p>
Expand Down

0 comments on commit 773a308

Please sign in to comment.