Merge branch 'master' into feature/resource-component

This commit is contained in:
Benoit Alessandroni 2020-10-09 12:16:37 +02:00
commit 1df8e34ddb
18 changed files with 181 additions and 40 deletions

View File

@ -607,3 +607,57 @@ toulouse:
when: manual
tags:
- deploy
lepool:
stage: deployment
environment:
name: lepool
url: https://lepool.hubl.world
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_LEPOOL" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* lepool@astral.startinblox.com:~/front/
only:
- master
when: manual
tags:
- deploy
cpe:
stage: deployment
environment:
name: cpe
url: https://cpe.hubl.world
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_CPE" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* cpe@astral.startinblox.com:~/front/
only:
- master
when: manual
tags:
- deploy
lescanumeriques:
stage: deployment
environment:
name: lescanumeriques
url: https://fichemetier.fr.hubl.world
before_script:
- npm ci --cache .npm --prefer-offline --only=production
script:
- echo "$APP_CONFIG_LESCANUMERIQUES" > config.json
- echo "$SSH_DEPLOY_KEY" | tr -d '\r' > gitlab.key && chmod 600 gitlab.key
- npm run build
- scp -i gitlab.key -o StrictHostKeyChecking=no -r dist/* lescanumeriques@astral.startinblox.com:~/front/
only:
- master
when: manual
tags:
- deploy

View File

@ -144,6 +144,12 @@
--color-directory-form-select-icon: var(--color-complementary) !important;
}
/* Text color for the beta label */
#header>div.header-left>span.beta-tag {
color: var(--color-complementary);
}
/* Button to edit a channel or a project (in project-profile) */
#project solid-link[next="project-edit"],
#circle solid-link[next="circle-edit"] {

View File

@ -66,8 +66,8 @@ context('Edit User Browser Testing', () => {
cy.contains('solid-display-value[name="name"]', userFirstName + ' ' + userLastName).should("exist");
cy.contains('solid-display-value[name="profile.job"]', jobDescription).should("exist");
cy.contains('solid-display-value[name="profile.city"]', city).should("exist");
cy.contains('solid-display-tel[name="profile.phone"] a', phone).should("exist");
cy.contains('profile-website[name="profile.website"] a', website).should("exist");
cy.contains('directory-link-tel a', phone).should("exist");
cy.contains('directory-website a', website).should("exist");
});
});
});

8
src/components/sentry.js Normal file
View File

@ -0,0 +1,8 @@
if(typeof Sentry !== 'undefined') {
Sentry.init({
dsn: 'https://b4b29557689049a39168599577adb940@sentry.startinblox.com/4',
integrations: [new Sentry.Integrations.BrowserTracing()],
environment: document.location.hostname,
tracesSampleRate: 1.0,
});
}

View File

@ -1,3 +1,5 @@
script(src="https://browser.sentry-cdn.com/5.25.0/bundle.tracing.min.js" defer)
script(type="module" src="/components/sentry.js" defer)
script(type="module" src="/components/hubl-search-users.js" defer)
script(type="module" src="/components/hubl-status.js" defer)
script(type="module" src="/components/hubl-reactivity.js" defer)
@ -27,7 +29,7 @@ if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
//- script(type="module" src="/lib/solid-job-board/dist/index.js" defer)
if (endpoints.uploads || (endpoints.get && endpoints.get.uploads)) && (endpoints.skills || (endpoints.get && endpoints.get.skills)) && (endpoints.users || (endpoints.get && endpoints.get.users))
script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.8" defer)
script(type="module" src="https://unpkg.com/@startinblox/component-directory@0.9" defer)
//- script(type="module" src="/lib/solid-directory/dist/index.js" defer)
if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards)
@ -42,6 +44,8 @@ if endpoints.polls || (endpoints.get && endpoints.get.polls)
script(type="module" src="https://unpkg.com/@startinblox/component-poll@1.0" defer)
//- script(type="module" src="/lib/sib-polls-component/index.js" defer)
script(src="https://cdn.jsdelivr.net/npm/sweetalert2@10")
script(src="/scripts/index.js" defer)
//- Stylesheets

View File

@ -1,6 +1,9 @@
.logo
solid-link(next='dashboard')
img(src=`${clientLogo || '/images/logo.png'}` style=`max-height:${clientLogoHeight || '32px'}`)
.header-left
.logo
solid-link(next='dashboard')
img(src=`${clientLogo || '/images/logo.png'}` style=`max-height:${clientLogoHeight || '32px'}`)
span.beta-tag Beta
solid-notifications.notLoggedIn(
nested-field="inbox"

View File

@ -80,12 +80,12 @@ solid-router#navbar-router(default-route='dashboard')
div.menu-icon.icon-calendar
div.divider
if endpoints.projects || (endpoints.get && endpoints.get.projects)
div
div.menu-wrapper
solid-link
//- (next='admin-project-list')
div.menu
div.menu-chevron
div.menu-icon
div.menu-icon.icon-arrow-up
//- div.menu-icon.icon-arrow-right-circle
div.menu-label Projets
div.menu-icon.icon-folder-alt
@ -109,12 +109,12 @@ solid-router#navbar-router(default-route='dashboard')
)
div.divider
if endpoints.circles || (endpoints.get && endpoints.get.circles)
div
div.menu-wrapper
solid-link
//- (next='admin-circle-list')
div.menu
div.menu-chevron
div.menu-icon
div.menu-icon.icon-arrow-up
//- div.menu-icon.icon-arrow-right-circle
div.menu-label Cercles
div.menu-icon.icon-folder-alt

View File

@ -0,0 +1,19 @@
document.addEventListener("DOMContentLoaded", () => {
const Toast = Swal.mixin({
toast: true,
position: 'top',
showConfirmButton: false,
timer: 3000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
document.addEventListener("save", () => {
Toast.fire({
icon: 'success',
title: 'Succès!'
})
});
});

View File

@ -1,6 +1,4 @@
#about{
$main-color: rgb(236, 94, 92);
$second-color: white;
h2,h3{
text-transform: uppercase;
}
@ -37,10 +35,10 @@
}
.main-cta{
background: $second-color none repeat scroll 0% 0%;
border: 1px solid $main-color;
background: var(--color-white) none repeat scroll 0% 0%;
border: 1px solid var(--color-primary);
border-radius: 55px;
color: $main-color;
color: var(--color-primary);
cursor: pointer;
font-weight: bold;
text-transform: uppercase;
@ -51,8 +49,8 @@
}
.main-cta:hover{
background: $main-color none repeat scroll 0% 0%;
border : 1px solid $second-color;
color: $second-color;
background: var(--color-primary) none repeat scroll 0% 0%;
border : 1px solid var(--color-primary);
color: var(--color-white);
}
}

View File

@ -26,6 +26,34 @@
}
}
.header-left {
flex-grow: 1;
position: relative;
.logo {
display: inline-block;
}
.beta-tag {
display: none;
@include breakpoint(lg) {
display: inline-block;
font-size: 1.4rem;
font-weight: 600;
line-height: 19px;
letter-spacing: 0.19px;
padding: 3px 13px 3px 15px;
border-radius: 3px;
background: var(--color-primary);
color: var(--color-white);
position: absolute;
top: -9px;
left: 267px;
}
}
}
>*:not(:first-child) {
margin-left: 2rem;
@ -34,15 +62,15 @@
}
}
.logo {
flex: 1 0 0;
align-items: stretch;
}
/* To remove the place taken by this element */
/* Fix: to remove the place taken by these elements */
solid-widget[name='hubl-user-avatar'] {
display: contents;
}
solid-notifications-template[data-rdf-type='hd:circle'],
solid-notifications-template[data-rdf-type='foaf:user'] {
position: absolute;
}
}
/* General styling for both notification and user's panel */

View File

@ -48,7 +48,7 @@
&::before {
display: inline-block;
color: #FF6765;
color: var(--color-primary);
}
}
}

View File

@ -8,6 +8,10 @@
&.with-padding {
padding: 1.3rem;
@include breakpoint(lg) {
padding: 2.5rem;
}
}
}

View File

@ -1,17 +1,6 @@
div.content-box__info.flex
solid-link(class="backlink right" next='admin-project-list') Retour
solid-widget(name="hubl-admin-project-add-user")
template
solid-form(
data-holder
fields='user, project'
range-user=`${endpoints.users || endpoints.get.users}`
value-project='${src}'
widget-project='solid-form-hidden'
naked
)
h1.centered Créer un nouveau projet
div#loader-projects-create.loader.loader-top

View File

@ -9,6 +9,16 @@ div.content-box__info.flex
div
div
solid-widget(name='hubl-username-field')
template
label Nom d'utilisateur*
input(type="text" title='Caractères alphanumérique uniquement' pattern="[a-zA-Z0-9]+" label="Nom d'utilisateur *" name="username" required value="\${value}" data-holder)
solid-widget(name='hubl-email-field')
template
label E-mail *
input(type="email" label="E-mail *" name="email" required value="\${value}" data-holder)
solid-form.form.button-register(
data-src=`${endpoints.users || endpoints.post.users}`
@ -32,6 +42,9 @@ div.content-box__info.flex
value-password=''
widget-password='solid-form-hidden'
widget-username='hubl-username-field'
widget-email='hubl-email-field'
next='admin-users-list'
submit-button='Enregistrer'

View File

@ -32,6 +32,7 @@ div.content-box__info.flex
label-first_name='Prénom *'
label-last_name='Nom *'
label-email='E-mail *'
widget-email='hubl-email-field'
next='admin-user-list'

View File

@ -35,8 +35,8 @@ div.content-box__info
label-status='Statut du cercle'
widget-status='hubl-status'
label-name='Nom du cercle'
label-owner='Administrateur ou administratrice'
label-name='Nom du cercle *'
label-owner='Administrateur ou administratrice *'
label-description='Sous-titre du cercle *'
class-name='form-label is-light is-half-width input-text-like'

View File

@ -3,6 +3,10 @@ solid-router(default-route='circle-profile', hidden)
solid-route(name='circle-edit')
#circle-profile(hidden)
solid-widget(name='hubl-circle-team-contact')
template
solid-link(data-src='\${value}', next='messages')
.content-box__info.flex
@ -87,11 +91,14 @@ solid-router(default-route='circle-profile', hidden)
bind-resources
nested-field='members'
loader-id='loader-circle-profile'
fields='classGroup(user.account.picture, sup(user.name, is_admin), sub(user.profile.city))'
fields='classGroup(user.account.picture, sup(user.name, user, is_admin), sub(user.profile.city))'
widget-user='hubl-circle-team-contact'
class-classGroup='user-thumb is-spaced'
class-user.account.picture='avatar user-thumb__picture'
class-user.name='user-thumb__name'
class-user='user-thumb__send'
class-is_admin='user-thumb__admin'
class-user.profile.city='user-thumb__city'

View File

@ -5,6 +5,10 @@ solid-router(default-route='project-profile', hidden)
#project-profile(hidden)
include ../../templates/hubl-captain.pug
solid-widget(name='hubl-project-team-contact')
template
solid-link(data-src='\${value}', next='messages')
.content-box__info.flex
div#loader-project-profile.loader
@ -85,11 +89,14 @@ solid-router(default-route='project-profile', hidden)
solid-display.block(
bind-resources
nested-field='members'
fields='classGroup(user.account.picture, sup(user.name, is_admin), sub(user.profile.city, name))'
fields='classGroup(user.account.picture, sup(user.name, user, is_admin), sub(user.profile.city, name))'
widget-user='hubl-project-team-contact'
class-classGroup='user-thumb is-spaced'
class-user.account.picture='avatar user-thumb__picture'
class-user.name='user-thumb__name'
class-user='user-thumb__send'
class-is_admin='user-thumb__admin'
class-user.profile.city='user-thumb__city'
class-name='user-thumb__lead'