Skip to content

Commit

Permalink
Merge pull request #473 from LibCrowds/greenkeeper/initial
Browse files Browse the repository at this point in the history
Update dependencies to enable Greenkeeper 🌴
  • Loading branch information
alexandermendes authored Nov 7, 2017
2 parents 345a30a + 04e678e commit 9f77d0c
Show file tree
Hide file tree
Showing 66 changed files with 2,765 additions and 2,368 deletions.
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
sudo: required

dist: trusty

language: node_js

node_js:
- '7'

- '8'
before_install:
# Remove hte line below once node 9 moves to LTS (and so does this repo)
- npm install -g npm@5
- npm install -g greenkeeper-lockfile@1
# Deploy key used to push to the server
- openssl aes-256-cbc -K $encrypted_1cd83addbd20_key -iv $encrypted_1cd83addbd20_iv
-in deploy-key.enc -out deploy-key -d

install:
- npm install

before_script:
- greenkeeper-lockfile-upload
script:
- npm run test

after_success:
- bash bin/deploy.sh
env:
global:
# GH_TOKEN used for greenkeeper-lockfile
secure: iMLVTgpiRtJ0OmJwJmAPEnvPCRTxM9UXxLR1HQHHhhJRLpWWUH89wmiNqpk8qnfwL+IWxkgquuY9RyQYhGINwMfswsBdP8eIVu1iWg0qwGhbdhfiV3CiMm7rxDz02WoqyOcdpm2RHRGo8Hd1YJ2avJn5TBtkqlYDhNO14wBSAmNp55KMrHqC6wAtAR2V/SASiO6zLrm0yrE/K6kkjRjpe8TY6VdTfuK3EnUDA4HjJZqcC0131214IAVcYxLplTJVrb2qBPwHOyqyQxV2S6eWIJthEQ4Qr1aTVpPAbDbLEbJdxbU3VkA0Jiz8acB3f3yN/DmHVHO4585WepJVIw+oWm4rKbfSHCyR2CENMNF/Hkyw4UtyYwsQTHlR5fF2+QyIbsO4f0fAC3poK3AIg1OanwEgaN5TWti2ed/Hy88ODRkxrH+tynhDVSMA00KdgZ82JGFQ/Rp1AdCvJWWx0eWsXg/Xxzbs2M9zIFzeu57a6onXla743tOtdcH0qu7EdOnUfg2dXiied/+xLak1dJlOHu1dhgLcRxs9aBzE0LBWswpO9v9Mi8HA067NvCy0e8bcQHWHJQ0zLHYDqIg9rLnr8lq+d1T+IwgqMx7dHvxlXM1u6o17Li3WdV7//McwzeSIl/UEKKRGICTI/D0vQOQhZhnlw0jMfd6xqyUtRJxNRoE=
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# LibCrowds

[![Greenkeeper badge](https://badges.greenkeeper.io/LibCrowds/libcrowds.svg)](https://greenkeeper.io/)

[![Build Status](https://travis-ci.org/LibCrowds/libcrowds.svg?branch=master)](https://travis-ci.org/LibCrowds/libcrowds)
[![DOI](https://zenodo.org/badge/92406558.svg)](https://zenodo.org/badge/latestdoi/92406558)

Expand Down
11 changes: 11 additions & 0 deletions assets/style/partials/_transitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,14 @@
transform: translateY(20px);
opacity: 0;
}

.slide-in-enter-active,
.slide-in-leave-active {
transition: opacity 350ms ease-in;
}

.slide-in-enter,
.slide-in-leave-to {
opacity: 0;
}

75 changes: 75 additions & 0 deletions components/avatars/Small.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<template>
<div class="small-avatar">
<img
v-if="src"
:src="src"
size
class="img-fluid rounded-circle"
:onerror="info = null">
</img>
<div
v-else
class="img-fluid rounded-circle placeholder">
<icon name="question"></icon>
</div>
</div>
</template>

<script>
import localConfig from '@/local.config'
import 'vue-awesome/icons/picture-o'
export default {
data () {
return {
info: this.domainObject.info
}
},
props: {
domainObject: {
type: Object,
required: true
}
},
computed: {
src () {
const host = localConfig.pybossa.host
if (!this.info) {
return null
} else if (this.info.avatar_url) {
return host + this.info.avatar_url
} else if (this.info.thumbnail_url) {
return host + this.info.thumbnail_url
} else if (this.info.media_url) {
return host + this.info.media_url
}
return null
}
}
}
</script>

<style lang="scss">
@import '~assets/style/settings';
.small-avatar {
overflow: hidden;
max-width: 3rem;
max-height: 3rem;
min-width: 3rem;
min-height: 3rem;
&>* {
max-width: 3rem;
max-height: 3rem;
min-width: 3rem;
min-height: 3rem;
}
.placeholder {
border: 1px solid $gray-300;
}
}
</style>
10 changes: 9 additions & 1 deletion components/cards/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
no-body
class="project-card">
<nuxt-link
:event="linkEvent"
:to="{
name: 'collection-short_name-projects-id-presenter',
params: {
Expand All @@ -21,6 +22,7 @@
<div class="card-body project-details p-0">
<div class="card-title mb-0">
<nuxt-link
:event="linkEvent"
:to="{
name: 'collection-short_name-projects-id-presenter',
params: {
Expand Down Expand Up @@ -58,7 +60,7 @@
{{ collection.info.terminology.task | pluralize(project.n_tasks) }}
</span>
<span class="card-stat text-muted mb-2 mb-lg-0">
<icon name="users"></icon> {{ project.n_volunteers | intComma }}
<icon name="users"></icon>Join {{ project.n_volunteers | intComma }}
{{ 'volunteer' | pluralize(project.n_volunteers) }}
</span>
<div class="footer-buttons">
Expand Down Expand Up @@ -121,6 +123,12 @@ export default {
ProjectAvatar
},
computed: {
linkEvent () {
return this.project.overall_progress < 100 ? 'click' : null
}
},
mounted () {
if (process.browser) {
const bar = new ProgressBar.Line(`#${this.progressBarId}`, {
Expand Down
3 changes: 3 additions & 0 deletions components/footers/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
<section class="d-none d-lg-block">
<h5 class="list-title">Help</h5>
<ul class="list-unstyled">
<li class="list-item" v-if="localConfig.docs">
<a :href="localConfig.docs" target="_blank">Docs</a>
</li>
<li class="list-item">
<nuxt-link
:to="{
Expand Down
11 changes: 11 additions & 0 deletions components/forms/PybossaForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ export default {
if (!valid) {
this.alert = 'Please correct the errors'
this.status = 'error'
this.notify({
type: 'warn',
title: 'Invalid form data',
message: this.alert
})
}
return valid
},
Expand Down Expand Up @@ -194,6 +199,12 @@ export default {
return
} else if (r.data.status === 'success') {
this.handleSuccess(r.data)
} else if (typeof r.data.status === 'undefined') {
this.notify({
type: 'success',
title: 'Success',
message: ''
})
}
this.flash(r.data)
}).catch(err => {
Expand Down
21 changes: 18 additions & 3 deletions components/navbars/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<span class="app-navbar-right border-bottom" v-if="loggedIn">
<b-nav is-nav-bar right>

<slot name="right"></slot>

<!-- Hide on small screens until the new menu is in place -->
<announcements class="d-none d-lg-block"></announcements>

Expand Down Expand Up @@ -48,13 +50,19 @@
<div role="separator" class="dropdown-divider"></div>
<b-dropdown-item
:to="{
name: 'project-open'
name: 'admin-project-open'
}">
Project Admin
</b-dropdown-item>
<b-dropdown-item
:to="{
name: 'admin-dashboard'
name: 'admin-collection'
}">
Collection Admin
</b-dropdown-item>
<b-dropdown-item
:to="{
name: 'admin-site-dashboard'
}">
Site Admin
</b-dropdown-item>
Expand Down Expand Up @@ -174,6 +182,7 @@ export default {
display: flex;
align-items: center;
border-bottom: 1px solid $gray-300;
padding: 0 0.75rem;
}
.app-navbar-right {
Expand Down Expand Up @@ -206,8 +215,10 @@ export default {
.nav-item {
padding: 0 0.75rem;
color: inherit;
display: inline-block;
@include media-breakpoint-up(sm) {
display: block;
padding: 0 1.25rem;
}
Expand Down Expand Up @@ -241,7 +252,11 @@ export default {
}
.dropdown {
padding: 0 1.75rem;
padding: 0 0.75rem;
@include media-breakpoint-up(sm) {
padding: 0 1.75rem;
}
}
.dropdown-menu {
Expand Down
10 changes: 8 additions & 2 deletions components/navbars/Collection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,19 @@
<div role="separator" class="dropdown-divider"></div>
<b-dropdown-item
:to="{
name: 'project-open'
name: 'admin-project-open'
}">
Project Admin
</b-dropdown-item>
<b-dropdown-item
:to="{
name: 'admin-collection'
}">
Collection Admin
</b-dropdown-item>
<b-dropdown-item
:to="{
name: 'admin-dashboard'
name: 'admin-site-dashboard'
}"
@click="toggleCollapsibleSidebar">
Site Admin
Expand Down
Loading

0 comments on commit 9f77d0c

Please sign in to comment.