This commit is contained in:
Clément 2018-09-28 21:13:54 +02:00
parent a0c1cab2ba
commit 87c4922203
9 changed files with 51 additions and 2101 deletions

2030
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1 +1,2 @@
#channel-chat.chat-view(style='display: none', bind-resources='')
sib-chat(data-authentication='login', data-auto-login='true', data-bosh-service-url='https://jabber.happy-dev.fr/http-bind/', data-debug='false', data-locales-url='en', bind-resources='')

View File

@ -1,13 +1,13 @@
#channel(style='display: none')
sib-router#channel-router(default-route='channel-profile')
sib-route(name='channel-chat')
button Chat
div Chat
sib-route(name='channel-profile')
button Info
div Info
sib-route(name='channel-edit')
button Éditer
div Éditer
sib-route(name='channel-create')
button Nouveau
div Nouveau
#network-views-container
include channel-chat.pug
include channel-profile.pug

View File

@ -4,6 +4,7 @@
link(rel='stylesheet', href=`${dn}/node_modules/font-awesome/css/font-awesome.min.css`)
link(rel='stylesheet', href=`${dn}/node_modules/normalize.css/normalize.css?v=${v}`)
link(rel='stylesheet', href=`${dn}/dist/css/hd-app.css?v=${v}`)
// Javascript
script(src=`${dn}/node_modules/jquery/dist/jquery.min.js`)
//- script(src=`${dn}/node_modules/bootstrap/dist/js/bootstrap.min.js`)
@ -11,7 +12,8 @@ script(src=`${dn}/node_modules/cropper/dist/cropper.min.js`)
script(src=`${dn}/dist/lib/webcomponentsjs/webcomponents-loader.js`)
script(src=`${dn}/src/js/hd-app.js?v=${v}`)
//- script(src=`${dn}/dist/lib/sib-chat/3rdparty/sib-oidc-client.js?v=${v}`)
// Web components
link(rel='import', href=`${dn}/dist/lib/sib-core/sib-display.html?v=${v}`)
link(rel='import', href=`${dn}/dist/lib/sib-router/sib-router.html?v=${v}`)
//- link(rel='import', href=`${dn}/dist/lib/sib-chat/sib-chat.html`)
//- link(rel='import', href=`${dn}/dist/lib/sib-chat/sib-chat.html`)

View File

@ -24,28 +24,4 @@ html(lang='fr')
//- include client-creation.pug
//- include channels.pug
include channel.pug
//- include search.pug
sib-chat#chat-singleton(data-authentication='login', data-auto-login='true', data-bosh-service-url='https://jabber.happy-dev.fr/http-bind/', data-debug='false', data-locales-url='en', bind-resources='')
script.
// Move the chat singleton to the right view on "page load"
window.onload = function() {
if (window.location.pathname.indexOf("-chat") !== -1) {
var chatSingleton = document.querySelector("#chat-singleton");
var pathnameParts = window.location.pathname.split("/");
var viewName = pathnameParts[pathnameParts.length - 1];
var view = document.getElementById(viewName);
console.log({chatSingleton,pathnameParts,viewName,view});
view.appendChild(chatSingleton);
chatSingleton.dataset.src = view.dataset.src;
}
}
// Move the chat singleton to the right view on "navigate"
window.addEventListener('navigate', event => {
var chatSingleton = document.querySelector("#chat-singleton");
var view = document.getElementById(event.detail.route);
view.querySelector(".chat-view").appendChild(chatSingleton);
chatSingleton.dataset.src = view.dataset.src;
});
//- include search.pug

View File

@ -1 +1,2 @@
#member-chat.chat-view(style='display: none', bind-resources='')
sib-chat(data-authentication='login', data-auto-login='true', data-bosh-service-url='https://jabber.happy-dev.fr/http-bind/', data-debug='false', data-locales-url='en', bind-resources='')

View File

@ -1 +1,2 @@
#project-chat.chat-view(style='display: none', bind-resources='')
sib-chat(data-authentication='login', data-auto-login='true', data-bosh-service-url='https://jabber.happy-dev.fr/http-bind/', data-debug='false', data-locales-url='en', bind-resources='')

View File

@ -1,53 +1,53 @@
ldp-display {
ldp-form {
display: block;
background-color: #F3F3F3;
padding: 15px;
box-sizing: content-box;
display: block;
background-color: #f3f3f3;
padding: 15px;
box-sizing: content-box;
form {
@extend %self-clear;
ldp-form-text {
position: relative;
display: block;
margin-bottom: 1rem;
position: relative;
display: block;
margin-bottom: 1rem;
&::before {
position: absolute;
top: 3px;
bottom: 0px;
left: 10px;
margin: auto;
font-family: FontAwesome;
content: "\f002";
color: gray;
position: absolute;
top: 3px;
bottom: 0px;
left: 10px;
margin: auto;
font-family: FontAwesome;
content: '\f002';
color: gray;
}
label {
text-transform: capitalize;
display: none;
text-transform: capitalize;
display: none;
}
input[type="text"] {
input[type='text'] {
@extend %form-control;
@extend %form-control-sm;
padding-left: 30px;
padding-left: 30px;
}
}
input[type="submit"],
input[type="reset"] {
input[type='submit'],
input[type='reset'] {
@extend %btn;
float: right;
float: right;
}
input[type="submit"] {
input[type='submit'] {
@extend %btn-primary;
}
input[type="reset"] {
input[type='reset'] {
@extend %btn-link;
}
}
@ -59,7 +59,7 @@ ldp-form.edit-form {
@extend %form-group;
label {
text-transform: capitalize;
text-transform: capitalize;
}
input {
@ -68,7 +68,7 @@ ldp-form.edit-form {
}
}
input[type="submit"] {
input[type='submit'] {
@extend %btn;
@extend %btn-primary;
}
@ -76,27 +76,33 @@ ldp-form.edit-form {
sib-form {
sib-form-text {
label {
text-transform: capitalize;
text-transform: capitalize;
}
input {
margin-right: .5em;
padding: .375em .75em;
margin-right: 0.5em;
padding: 0.375em 0.75em;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
border: 1px solid #ced4da;
border-radius: .25rem;
border-radius: 0.25rem;
vertical-align: top;
}
}
input[type="submit"], input[type="reset"] {
input[type='submit'],
input[type='reset'] {
@extend %btn;
@extend %btn-primary;
margin-right: .5em;
margin-right: 0.5em;
}
}
}
sib-form {
input[type='reset'] {
display: none;
}
}

View File

@ -48,13 +48,6 @@
#profiles-list {
display: block;
sib-form {
display: block;
margin: 3em 0;
input[type='reset'] {
display: none;
}
}
div[name='header'] {
border-top: 2em solid $col-alt-bg;
border-bottom: 1px solid $col-alt-bg;