minor: core@beta

This commit is contained in:
Jean-Baptiste Pasquier 2020-09-14 15:41:10 +02:00
parent 7f4115de40
commit ee29fa3e7c
16 changed files with 116 additions and 201 deletions

View File

@ -1,6 +1,6 @@
import { store } from 'https://unpkg.com/@startinblox/core@0.10'; import { store } from 'https://unpkg.com/@startinblox/core@beta';
import { Sib } from "https://unpkg.com/@startinblox/core@0.10/dist/libs/Sib.js"; import { Sib } from "https://unpkg.com/@startinblox/core@beta/dist/libs/Sib.js";
import { StoreMixin } from "https://unpkg.com/@startinblox/core@0.10/dist/mixins/storeMixin.js"; import { StoreMixin } from "https://unpkg.com/@startinblox/core@beta/dist/mixins/storeMixin.js";
export const HublReactivity = { export const HublReactivity = {
name: 'hubl-reactivity', name: 'hubl-reactivity',

View File

@ -1,4 +1,4 @@
import { widgetFactory } from 'https://unpkg.com/@startinblox/core@0.10/dist/widgets/widget-factory.js'; import { widgetFactory } from 'https://unpkg.com/@startinblox/core@beta/dist/widgets/widget-factory.js';
const HublSearchUsers = widgetFactory( const HublSearchUsers = widgetFactory(
'hubl-search-users', 'hubl-search-users',

View File

@ -1,5 +1,5 @@
import { widgetFactory } from 'https://unpkg.com/@startinblox/core@0.10/dist/widgets/widget-factory.js'; import { widgetFactory } from 'https://unpkg.com/@startinblox/core@beta/dist/widgets/widget-factory.js';
import { importCSS } from 'https://unpkg.com/@startinblox/core@0.10/dist/libs/helpers.js'; import { importCSS } from 'https://unpkg.com/@startinblox/core@beta/dist/libs/helpers.js';
import SlimSelect from 'https://dev.jspm.io/slim-select@1.23'; import SlimSelect from 'https://dev.jspm.io/slim-select@1.23';
const HublStatus = widgetFactory( const HublStatus = widgetFactory(

View File

@ -2,36 +2,36 @@ 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-status.js" defer)
script(type="module" src="/components/hubl-reactivity.js" defer) script(type="module" src="/components/hubl-reactivity.js" defer)
script(type="module" src="https://unpkg.com/@startinblox/core@0.10" defer) script(type="module" src="https://unpkg.com/@startinblox/core@beta" defer)
//- script(type="module" src="/lib/sib-core/dist/index.js" defer) //- script(type="module" src="/lib/sib-core/dist/index.js" defer)
script(type="module" src="https://unpkg.com/@startinblox/oidc@0.9" defer) script(type="module" src="https://unpkg.com/@startinblox/oidc@beta" defer)
//- script(type="module" src="/lib/sib-oidc/index.js" defer) //- script(type="module" src="/lib/sib-auth/index.js" defer)
script(type="module" src="https://unpkg.com/@startinblox/router@0.8" defer) script(type="module" src="https://unpkg.com/@startinblox/router@beta" defer)
//- script(type="module" src="/lib/solid-router/src/index.js" defer) //- script(type="module" src="/lib/sib-router/src/index.js" defer)
script(type="module" src="https://unpkg.com/@startinblox/component-notifications@0.6.2" defer) //- script(type="module" src="https://unpkg.com/@startinblox/component-notifications@0.6.2" defer)
//- script(type="module" src="/lib/sib-notifications/index.js" defer) //- script(type="module" src="/lib/sib-notifications/index.js" defer)
if endpoints.events || (endpoints.get && endpoints.get.events) if endpoints.events || (endpoints.get && endpoints.get.events)
script(type="module" src="https://unpkg.com/@startinblox/component-event@0.1" defer) script(type="module" src="https://unpkg.com/@startinblox/component-event@0.1" defer)
//- script(type="module" src="/lib/sib-event/sib-event.js" defer) //- script(type="module" src="/lib/sib-event/sib-event.js" defer)
if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers) if endpoints.joboffers || (endpoints.get && endpoints.get.joboffers)
script(type="module" src="https://unpkg.com/@startinblox/component-job-board@0.6" defer) script(type="module" src="https://unpkg.com/@startinblox/component-job-board@beta" defer)
//- script(type="module" src="/lib/solid-job-board/dist/index.js" defer) //- 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)) 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.7" defer) script(type="module" src="https://unpkg.com/@startinblox/component-directory@beta" defer)
//- script(type="module" src="/lib/solid-directory/dist/index.js" defer) //- script(type="module" src="/lib/solid-directory/dist/index.js" defer)
if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards) if endpoints.dashboards || (endpoints.get && endpoints.get.dashboards)
script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@0.3" defer) script(type="module" src="https://unpkg.com/@startinblox/component-dashboard@beta" defer)
//- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer) //- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer)
if endpoints.users || (endpoints.get && endpoints.get.users) if endpoints.users || (endpoints.get && endpoints.get.users)
script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.8" defer) //- script(type="module" src="https://unpkg.com/@startinblox/component-chat@0.8" defer)
//- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer) //- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer)
script(src="/scripts/index.js" defer) script(src="/scripts/index.js" defer)

View File

@ -1,71 +0,0 @@
include templates/hubl-groups.pug
.content-box.with-form.user-profile__container
.section.user-bio
solid-display.avatar-display(
bind-user=''
fields='account.picture'
label-account.picture=''
widget-account.picture='solid-display-img'
)
solid-display.name-diplay(
bind-user=''
fields='user-name-groups(name, groups), username'
class-name='name'
label-groups=''
multiple-groups=''
widget-groups='hubl-groups-name'
class-username='username'
)
solid-form.info-form(
bind-user=''
fields='profile.bio, inline-1(profile.city, email), inline-2(profile.phone, profile.website), inline-3(profile.available), account.picture, instruction'
class-profile.bio='form-label is-light'
label-profile.bio='short description'
class-profile.city='form-label is-light'
label-profile.city='your cell'
class-email='form-label is-light'
class-profile.phone='form-label is-light'
label-profile.phone='phone'
class-profile.website='form-label is-light'
label-profile.website='your website'
class-profile.available='form-label is-light'
label-profile.available='your availability'
class-account.picture='form-label is-light'
label-account.picture='your picture'
widget-instruction='hubl-instruction'
)
.section.user-skills
solid-form(
bind-user=''
range-skills=`${endpoints.skills || endpoints.get.skills}`
fields='skills'
class-skills='form-label is-dark'
label-skills='Your main skills (4 max.):'
multiple-skills='solid-multiple-select'
widget-skills='solid-form-auto-completion'
)
solid-widget(name='hubl-instruction')
template
span Show us your most beautiful smile
p Pictures help us to know ourselves and also to recognize ourselves, so don't be afraid to show your pretty face and avoid strange avatars.

View File

@ -41,16 +41,14 @@
.form-label { .form-label {
/*flex: 1 1 auto;*/ /*flex: 1 1 auto;*/
label { display: flex;
display: flex; flex-direction: column; /* To align label and input vertically */
flex-direction: column; /* To align label and input vertically */ font-weight: 600;
font-weight: 600; margin-bottom: 0.8rem;
margin-bottom: 0.8rem; margin-top: 1.8rem;
margin-top: 1.8rem; text-transform: uppercase;
text-transform: uppercase;
}
&.is-light label { &.is-light {
color: var(--color-label-light); color: var(--color-label-light);
} }
} }
@ -130,7 +128,7 @@ textarea {
/* WIDGETS SIB (let in .content-box to override default styles) */ /* WIDGETS SIB (let in .content-box to override default styles) */
solid-form-auto-completion, solid-form-dropdown-autocompletion-label,
hubl-status { hubl-status {
.ss-main { .ss-main {
@ -288,13 +286,13 @@ solid-form-file {
} }
} }
/*solid-multiple-select { /*solid-form-multipleselect {
&.select-skills .ss-values .ss-disabled::before { &.select-skills .ss-values .ss-disabled::before {
content: "Select skills"; content: "Select skills";
} }
solid-form-auto-completion > label { solid-form-dropdown-autocompletion-label > label {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -378,7 +376,7 @@ hubl-member-form {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
solid-form-auto-completion { solid-form-dropdown-autocompletion-label {
float: left; float: left;
} }

View File

@ -74,7 +74,7 @@
solid-ac-checker { solid-ac-checker {
border-top: 1px solid $color-210-17-91; border-top: 1px solid $color-210-17-91;
solid-form-textarea { solid-form-textarea-label {
>label div { >label div {
color: $color-210-5-56; color: $color-210-5-56;

View File

@ -1,20 +0,0 @@
include hubl-user-avatar.pug
solid-widget(name='hubl-circle-team-template')
template
solid-display.user-thumb.is-spaced(
data-src='${await value.user}'
fields='account.picture, sup(name, isadmin), sub(profile.city)'
value-isadmin='${await value.is_admin}'
class-account.picture='avatar user-thumb__picture'
class-name='user-thumb__name'
class-isadmin='user-thumb__admin'
class-profile.city='user-thumb__city'
widget-account.picture='hubl-user-avatar'
widget-isadmin='hubl-circle-user-admin'
)
solid-widget(name='hubl-circle-user-admin')
template ${(await value) != "false" ? "Administrateur" : ""}

View File

@ -1,22 +0,0 @@
include hubl-user-avatar.pug
solid-widget(name='hubl-project-team')
template
solid-display.user-thumb.is-spaced(
data-src='${await value}'
fields='user.account.picture, sup(user.name, isadmin), sub(user.profile.city, name)'
value-isadmin='${await value.is_admin}'
class-user.account.picture='avatar user-thumb__picture'
class-user.name='user-thumb__name'
class-isadmin='user-thumb__admin'
class-user.profile.city='user-thumb__city'
class-name='user-thumb__lead'
widget-user.account.picture='hubl-user-avatar'
widget-isadmin='hubl-project-user-admin'
)
solid-widget(name='hubl-project-user-admin')
template ${(await value) == "false" ? "" : "Administrateur"}

View File

@ -40,7 +40,7 @@ div.content-box__info.flex
label-captain='Capitaine du projet*' label-captain='Capitaine du projet*'
range-captain=`${endpoints.users || endpoints.get.users}` range-captain=`${endpoints.users || endpoints.get.users}`
class-captain='form-label is-light is-half-width' class-captain='form-label is-light is-half-width'
widget-captain='solid-form-auto-completion' widget-captain='solid-form-dropdown-autocompletion-label'
class='input-text-like' class='input-text-like'

View File

@ -5,42 +5,15 @@ div.content-box__info
solid-widget(name='hubl-user-groups') solid-widget(name='hubl-user-groups')
template ${await value.name} template ${await value.name}
solid-widget(name='hubl-team-template-edit') solid-widget(name="circle-edit-members-delete")
template template
solid-display.user-thumb.is-spaced( solid-ac-checker(permission="acl:Delete" data-src="${src}")
class='w280 cell border cell-with-id-card user-thumb'
data-src='${await value.user}'
fields='account.picture, sup(name, groups), sub(profile.city)'
class-account.picture='user-thumb__picture avatar'
class-name='user-thumb__name'
class-groups='user-thumb__groups'
class-profile.city='user-thumb__city'
widget-account.picture='hubl-user-avatar'
multiple-groups=''
widget-groups='hubl-user-groups'
)
solid-ac-checker(
class='w162 cell border'
permission="acl:Delete"
data-src="${value['@id']}"
)
solid-delete( solid-delete(
class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close' class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
data-src="${value['@id']}" data-src="${src}"
data-label='Retirer' data-label='Retirer'
) )
//- Only to show the table grid
solid-ac-checker(
class='w162 cell border'
no-permission="acl:Delete"
data-src="${value['@id']}"
)
solid-link(class="backlink right", bind-resources, next='circle-profile') Retour solid-link(class="backlink right", bind-resources, next='circle-profile') Retour
solid-ac-checker(permission='acl:Write', bind-resources) solid-ac-checker(permission='acl:Write', bind-resources)
@ -70,7 +43,7 @@ div.content-box__info
class-description='form-label is-light is-full-width input-text-like' class-description='form-label is-light is-full-width input-text-like'
class-status='form-label is-light is-full-width member-select color' class-status='form-label is-light is-full-width member-select color'
widget-owner='solid-form-auto-completion' widget-owner='solid-form-dropdown-autocompletion-label'
partial='' partial=''
@ -89,7 +62,7 @@ div.content-box__info
class-user='team form-label is-light' class-user='team form-label is-light'
label-user='' label-user=''
widget-user='solid-form-auto-completion' widget-user='solid-form-dropdown-autocompletion-label'
submit-button='Ajouter un membre' submit-button='Ajouter un membre'
) )
@ -100,14 +73,28 @@ div.content-box__info
div.w280 Nom div.w280 Nom
div.w162 Accès div.w162 Accès
//-class='table-body'
solid-display( solid-display(
class='table-body' class='table-body'
bind-resources bind-resources
fields='members' nested-field='members'
fields='classGroup(user.account.picture, sup(user.name, user.groups), sub(user.profile.city)), self'
loader-id='loader-circle-edit' loader-id='loader-circle-edit'
multiple-members='' class-classGroup='w280 cell border cell-with-id-card user-thumb is-spaced'
widget-members='hubl-team-template-edit' class-user.account.picture='user-thumb__picture avatar'
class-user.name='user-thumb__name'
class-user.groups='user-thumb__groups'
class-user.profile.city='user-thumb__city'
widget-user.account.picture='hubl-user-avatar'
multiple-user.groups=''
widget-user.groups='hubl-user-groups'
action-self='self'
widget-self='circle-edit-members-delete'
) )
//- Only to show the table grid
div.w162.cell.border

View File

@ -3,7 +3,6 @@ solid-router(default-route='circle-profile', hidden)
solid-route(name='circle-edit') solid-route(name='circle-edit')
#circle-profile(hidden) #circle-profile(hidden)
include ../../templates/hubl-circle-team.pug
.content-box__info.flex .content-box__info.flex
@ -23,7 +22,7 @@ solid-router(default-route='circle-profile', hidden)
value-title='Date de création : ' value-title='Date de création : '
widget-creationDate='solid-display-date' widget-creationDate='solid-display-value-date'
) )
solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members') solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members')
solid-ac-checker(permission='acl:Delete', bind-resources) solid-ac-checker(permission='acl:Delete', bind-resources)
@ -38,6 +37,7 @@ solid-router(default-route='circle-profile', hidden)
class='button mobile-full-width text-bold text-uppercase button-primary bordered with-icon icon-trash' class='button mobile-full-width text-bold text-uppercase button-primary bordered with-icon icon-trash'
bind-resources bind-resources
data-label='Supprimer le cercle' data-label='Supprimer le cercle'
next='admin-circles'
) )
solid-widget(name='hubl-circle-leave-button') solid-widget(name='hubl-circle-leave-button')
@ -80,14 +80,26 @@ solid-router(default-route='circle-profile', hidden)
h2 Membres : h2 Membres :
solid-widget(name='hubl-circle-user-admin')
template ${value ? "Administrateur" : ""}
solid-display.block( solid-display.block(
bind-resources bind-resources
fields='members' nested-field='members'
loader-id='loader-circle-profile' loader-id='loader-circle-profile'
fields='classGroup(user.account.picture, sup(user.name, is_admin), sub(user.profile.city))'
multiple-members='' class-classGroup='user-thumb is-spaced'
widget-members='hubl-circle-team-template' class-user.account.picture='avatar user-thumb__picture'
class-user.name='user-thumb__name'
class-is_admin='user-thumb__admin'
class-user.profile.city='user-thumb__city'
widget-classGroup='solid-set-div'
widget-user.account.picture='hubl-user-avatar'
widget-is_admin='hubl-circle-user-admin'
) )
#circle-edit.content-box__height(hidden) #circle-edit.content-box__height(hidden)
include page-circle-edit.pug include page-circle-edit.pug

View File

@ -12,12 +12,11 @@
class-description='field form-label is-light is-expanded' class-description='field form-label is-light is-expanded'
label-description='Description*' label-description='Description*'
widget-description='solid-form-textarea' widget-description='solid-form-textarea-label'
class-skills='form-label is-dark select-skills' class-skills='form-label is-dark select-skills'
label-skills='The required skills for this mission:*' label-skills='The required skills for this mission:*'
multiple-skills='solid-multiple-select' multiple-skills='solid-form-dropdown-autocompletion-label'
widget-skills='solid-form-auto-completion'
class-closingDate='form-label is-dark' class-closingDate='form-label is-dark'
label-closingDate='Publication end date:*' label-closingDate='Publication end date:*'

View File

@ -12,12 +12,11 @@
class-description='field form-label is-light is-expanded' class-description='field form-label is-light is-expanded'
label-description='Description*' label-description='Description*'
widget-description='solid-form-textarea' widget-description='solid-form-textarea-label'
class-skills='form-label is-dark select-skills' class-skills='form-label is-dark select-skills'
label-skills='The required skills for this mission:*' label-skills='The required skills for this mission:*'
multiple-skills='solid-multiple-select' multiple-skills='solid-form-dropdown-autocompletion-label'
widget-skills='solid-form-auto-completion'
class-closingDate='form-label is-dark' class-closingDate='form-label is-dark'
label-closingDate='Publication end date:*' label-closingDate='Publication end date:*'

View File

@ -1,6 +1,15 @@
div.content-box__info div.content-box__info
include ../../templates/hubl-user-avatar.pug include ../../templates/hubl-user-avatar.pug
solid-widget(name="project-edit-members-delete")
template
solid-ac-checker(permission="acl:Delete" data-src="${src}")
solid-delete(
class='button text-bold text-uppercase reversed button-secondary bordered with-icon icon-close'
data-src="${src}"
data-label='Retirer'
)
solid-link(class='backlink right', bind-resources, next='project-profile') Retour solid-link(class='backlink right', bind-resources, next='project-profile') Retour
@ -42,7 +51,7 @@ div.content-box__info
class-user='team form-label is-light' class-user='team form-label is-light'
label-user='' label-user=''
widget-user='solid-form-auto-completion' widget-user='solid-form-dropdown-autocompletion-label'
submit-button='Ajouter un membre' submit-button='Ajouter un membre'
) )
@ -57,9 +66,21 @@ div.content-box__info
solid-display( solid-display(
class='table-body' class='table-body'
bind-resources bind-resources
fields='members' nested-field='members'
fields='classGroup(user.account.picture, sup(user.name, user.groups), sub(user.profile.city)), self'
loader-id='loader-project-edit' loader-id='loader-project-edit'
multiple-members='' class-classGroup='w280 cell border cell-with-id-card user-thumb is-spaced'
widget-members='hubl-team-template-edit' class-user.account.picture='user-thumb__picture avatar'
class-user.name='user-thumb__name'
class-user.groups='user-thumb__groups'
class-user.profile.city='user-thumb__city'
widget-user.account.picture='hubl-user-avatar'
multiple-user.groups=''
widget-user.groups='hubl-user-groups'
action-self='self'
widget-self='project-edit-members-delete'
) )

View File

@ -4,7 +4,6 @@ solid-router(default-route='project-profile', hidden)
#project-profile(hidden) #project-profile(hidden)
include ../../templates/hubl-captain.pug include ../../templates/hubl-captain.pug
include ../../templates/hubl-project-team.pug
.content-box__info.flex .content-box__info.flex
@ -24,7 +23,7 @@ solid-router(default-route='project-profile', hidden)
value-title='Date de création : ' value-title='Date de création : '
widget-creationDate='solid-display-date' widget-creationDate='solid-display-value-date'
) )
solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members') solid-ac-checker(permission='acl:Append', bind-resources, nested-field='members')
solid-ac-checker(permission='acl:Delete', bind-resources) solid-ac-checker(permission='acl:Delete', bind-resources)
@ -38,6 +37,7 @@ solid-router(default-route='project-profile', hidden)
class='button mobile-full-width text-bold text-uppercase button-primary bordered with-icon icon-trash' class='button mobile-full-width text-bold text-uppercase button-primary bordered with-icon icon-trash'
bind-resources bind-resources
data-label='Supprimer le projet' data-label='Supprimer le projet'
next='admin-projects'
) )
solid-widget(name='hubl-project-leave-button') solid-widget(name='hubl-project-leave-button')
@ -79,12 +79,24 @@ solid-router(default-route='project-profile', hidden)
h2 Equipe : h2 Equipe :
solid-widget(name='hubl-project-user-admin')
template ${value ? "Administrateur" : ""}
solid-display.block( solid-display.block(
bind-resources bind-resources
fields='members' nested-field='members'
fields='classGroup(user.account.picture, sup(user.name, is_admin), sub(user.profile.city, name))'
multiple-members class-classGroup='user-thumb is-spaced'
widget-members='hubl-project-team' class-user.account.picture='avatar user-thumb__picture'
class-user.name='user-thumb__name'
class-is_admin='user-thumb__admin'
class-user.profile.city='user-thumb__city'
class-name='user-thumb__lead'
widget-classGroup='solid-set-div'
widget-user.account.picture='hubl-user-avatar'
widget-is_admin='hubl-project-user-admin'
) )
#project-edit.content-box__height(hidden) #project-edit.content-box__height(hidden)