Merge branch 'release/contacts-implementation' into feature/hubl-2

This commit is contained in:
Jean-Baptiste Pasquier 2020-12-09 16:43:12 +01:00
commit 844bca8513
No known key found for this signature in database
GPG Key ID: CC04B91B949C163A
9 changed files with 94 additions and 72 deletions

View File

@ -34,7 +34,7 @@ if endpoints.get
//- script(type="module" src="/lib/solid-dashboard/dist/index.js" defer)
if endpoints.get.users
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@1.5" defer)
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-chat@1.6" defer)
//- script(type="module" src="/lib/solid-xmpp-chat/dist/index.js" defer)
//- DISABLED - please migrate to dev.skypack.dev + upgrade to core@0.13

View File

@ -77,6 +77,7 @@ html(lang="en")
if endpoints.get.projects
#project(hidden, data-view="project", no-render).with-sidebar
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.projects")
hubl-reactivity(data-src=`${endpoints.post.projects}joinable/` target-src=`${endpoints.get.projects}`)
hubl-reactivity(data-src=`${endpoints.post.projects}` target-src=`${endpoints.get.projects}`)
hubl-reactivity(bind-user nested-field="projects" target-src=`${endpoints.post.projects}`)
@ -88,6 +89,7 @@ html(lang="en")
if endpoints.get.circles
#circle(hidden, data-view="circle", no-render).with-sidebar
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.circles")
hubl-reactivity(data-src=`${endpoints.post.circles}joinable/` target-src=`${endpoints.get.circles}`)
hubl-reactivity(data-src=`${endpoints.post.circles}` target-src=`${endpoints.get.circles}`)
hubl-reactivity(bind-user nested-field="circles" target-src=`${endpoints.post.circles}`)
@ -98,6 +100,7 @@ html(lang="en")
include views/page-circle.pug
if endpoints.get.users
#messages(hidden, data-view="messages", no-render).with-sidebar
hubl-reactivity(bind-user nested-field='inbox' target-src="store://user.contacts")
include views/page-messages.pug
if endpoints.get.polls

View File

@ -15,6 +15,11 @@
"project": "project",
"circle": "circle"
},
"contact": {
"create": "Find your contacts on the",
"profileDir": "profile directory",
"create2": ""
},
"dashboard": "Dashboard",
"events": "Events",
"gov": "Governance",

View File

@ -15,6 +15,11 @@
"project": "proyecto",
"circle": "círculo"
},
"contact": {
"create": "Encuentre sus contactos en el",
"profileDir": "directorio de miembros",
"create2": ""
},
"dashboard": "Panel de control",
"events": "Eventos",
"gov": "Gobernanza",

View File

@ -15,6 +15,11 @@
"project": "projet",
"circle": "cercle"
},
"contact": {
"create": "Retrouves tes contacts sur",
"profileDir": "l'annuaire des membres",
"create2": ""
},
"dashboard": "Tableau de bord",
"events": "Evènements",
"gov": "Gouvernance",

View File

@ -187,10 +187,14 @@ document.addEventListener("DOMContentLoaded", () => {
*/
function recursivePopulate(element) {
Array.from(element.querySelectorAll('*')).forEach((e) => {
e.addEventListener("populate", (e) => {
recursivePopulate(e.target);
jsI18n.processNode(e.target);
if(e.content && e.content instanceof DocumentFragment) {
recursivePopulate(e.content);
} else if(e instanceof HTMLElement) {
e.addEventListener("populate", (el) => {
recursivePopulate(el.target);
jsI18n.processNode(el.target);
});
}
});
}
// Process every children from document

View File

@ -164,7 +164,7 @@
}
}
solid-display.nosub>solid-form[fields="name"]>hubl-search-users>input {
solid-display>solid-form[fields="contact.name"]>hubl-search-users>input {
margin-left: 30px;
margin-bottom: 10px;
width: calc(80vw - 71px);
@ -182,28 +182,9 @@
}
}
solid-display.nosub>nav {
text-align: center;
overflow: hidden;
display: grid;
grid-template-columns: auto 50% auto;
grid-template-areas: "left middle right";
>* {
color: var(--color-white);
}
>[data-id="prev"] {
grid-area: left;
}
>[data-id="next"] {
grid-area: right;
}
>span {
grid-area: middle;
}
hubl-create solid-link,
hubl-create-contact solid-link {
display: inline;
}
hubl-menu-publicprivate {
@ -218,10 +199,6 @@
}
}
>solid-display.nosub>div>solid-display>div {
padding: 1rem 1rem 1rem 3rem;
}
solid-display>div {
.create {
@ -239,7 +216,8 @@
cursor: pointer;
>hubl-menu-fix-url-circle>solid-link>solid-display>div,
>hubl-menu-fix-url-project>solid-link>solid-display>div {
>hubl-menu-fix-url-project>solid-link>solid-display>div,
>hubl-menu-fix-url-contact>solid-link>solid-display>div {
padding: 1rem 1rem 1rem 3rem;
}
}
@ -251,7 +229,8 @@
&>solid-display[active]>div,
&>solid-display>div>hubl-menu-fix-url-circle>solid-link>solid-display[active]>div,
&>solid-display>div>hubl-menu-fix-url-project>solid-link>solid-display[active]>div {
&>solid-display>div>hubl-menu-fix-url-project>solid-link>solid-display[active]>div,
&>solid-display>div>hubl-menu-fix-url-contact>solid-link>solid-display[active]>div {
background-color: var(--color-menu-highlight-primary);
color: var(--color-menu-text-active);
font-weight: bold;
@ -261,13 +240,15 @@
&.menu-notification {
>solid-display>div>solid-display>div>hubl-menu-fix-url-circle,
>solid-display>div>solid-display>div>hubl-menu-fix-url-project {
>solid-display>div>solid-display>div>hubl-menu-fix-url-project,
>solid-display>div>solid-display>div>hubl-menu-fix-url-contact {
flex: 1;
}
>solid-display>div>solid-display>div,
>solid-display>div>solid-display>div>hubl-menu-fix-url-circle>solid-link>solid-display>div,
>solid-display>div>solid-display>div>hubl-menu-fix-url-project>solid-link>solid-display>div {
>solid-display>div>solid-display>div>hubl-menu-fix-url-project>solid-link>solid-display>div,
>solid-display>div>solid-display>div>hubl-menu-fix-url-contact>solid-link>solid-display>div {
display: flex;
justify-content: space-between;
}

View File

@ -1,4 +1,4 @@
const CACHE_NAME = 'hubl-store-swfc15';
const CACHE_NAME = 'hubl-store-cnt82i';
self.addEventListener('install', function (e) {
self.skipWaiting();

View File

@ -12,6 +12,15 @@ solid-widget(name='hubl-menu-publicprivate')
template
div ${value == 'Public' ? '#' : ''}
solid-widget(name='hubl-create-contact')
template
p.create
span(data-trans="menuLeft.contact.create")
span  
solid-link(next="members" data-trans="menuLeft.contact.profileDir")
span  
span(data-trans="menuLeft.contact.create2")
solid-widget(name='hubl-create')
template
p.create
@ -22,6 +31,19 @@ solid-widget(name='hubl-create')
span  
solid-link(next="${value == 'projet' ? 'admin-projects' : 'admin-circles'}", data-trans="menuLeft.emptyCircleProject.adminPanel")
solid-widget(name='hubl-menu-fix-url-contact')
template
solid-link(data-src="${value}" next="messages")
solid-display(
data-src='${value}'
fields='name, chatProfile.jabberID, badge'
value-badge='${value}'
widget-badge='hubl-counter'
widget-chatProfile.jabberID='hubl-menu-jabberid'
widget-name='solid-display-div'
order-asc='username'
)
solid-widget(name='hubl-menu-fix-url-circle')
template
solid-link(data-src="${value}" next="circle")
@ -33,7 +55,7 @@ solid-widget(name='hubl-menu-fix-url-circle')
widget-badge='hubl-counter'
widget-jabberID='hubl-menu-jabberid'
widget-name='solid-display-div'
order-by="name"
order-asc="name"
)
solid-widget(name='hubl-menu-fix-url-project')
@ -49,7 +71,7 @@ solid-widget(name='hubl-menu-fix-url-project')
widget-jabberID='hubl-menu-jabberid'
widget-badge='hubl-counter'
widget-name='solid-display-div'
order-by="customer.name"
order-asc="customer.name"
)
@ -110,7 +132,7 @@ solid-router#navbar-router(default-route='dashboard')
empty-value=''
data-trans="empty-value=menuLeft.emptyCircleProject.project"
widget-project='hubl-menu-fix-url-project'
order-by="project.customer.name"
order-asc="project.customer.name"
)
div.divider
if endpoints.circles || (endpoints.get && endpoints.get.circles)
@ -139,10 +161,9 @@ solid-router#navbar-router(default-route='dashboard')
empty-value=''
data-trans="empty-value=menuLeft.emptyCircleProject.circle"
widget-circle='hubl-menu-fix-url-circle'
order-by="circle.name"
order-asc="circle.name"
)
div.divider
if endpoints.users || (endpoints.get && endpoints.get.users)
div.menu-wrapper
div.menu
div.menu-chevron
@ -156,21 +177,19 @@ solid-router#navbar-router(default-route='dashboard')
div
div
div
solid-display.nosub.message-tab(
data-src=`${endpoints.users || (endpoints.get && endpoints.get.users)}`
fields='name, chatProfile.jabberID, badge'
solid-display.message-tab(
bind-user
nested-field='contacts'
fields='contact'
search-fields="contact.name"
search-label-contact.name=""
data-trans="search-label-contact.name=menuLeft.search"
search-widget-contact.name="hubl-search-users"
loader-id='loader-messages'
search-fields="name"
search-label-name=""
data-trans="search-label-name=menuLeft.search"
search-widget-name="hubl-search-users"
widget-name='solid-display-div'
widget-badge='hubl-counter'
widget-chatProfile.jabberID='hubl-menu-jabberid'
action-badge='badge'
order-by='username'
next='messages'
paginate-by='10'
empty-widget='hubl-create-contact'
empty-value=''
widget-contact='hubl-menu-fix-url-contact'
order-asc="contact.username"
)
div.divider