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,6 +12,7 @@ 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}`)

View File

@ -25,27 +25,3 @@ html(lang='fr')
//- 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;
});

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,7 +1,7 @@
ldp-display {
ldp-form {
display: block;
background-color: #F3F3F3;
background-color: #f3f3f3;
padding: 15px;
box-sizing: content-box;
@ -20,7 +20,7 @@ ldp-display {
left: 10px;
margin: auto;
font-family: FontAwesome;
content: "\f002";
content: '\f002';
color: gray;
}
@ -29,7 +29,7 @@ ldp-display {
display: none;
}
input[type="text"] {
input[type='text'] {
@extend %form-control;
@extend %form-control-sm;
@ -37,17 +37,17 @@ ldp-display {
}
}
input[type="submit"],
input[type="reset"] {
input[type='submit'],
input[type='reset'] {
@extend %btn;
float: right;
}
input[type="submit"] {
input[type='submit'] {
@extend %btn-primary;
}
input[type="reset"] {
input[type='reset'] {
@extend %btn-link;
}
}
@ -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;
}
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;