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='') #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') #channel(style='display: none')
sib-router#channel-router(default-route='channel-profile') sib-router#channel-router(default-route='channel-profile')
sib-route(name='channel-chat') sib-route(name='channel-chat')
button Chat div Chat
sib-route(name='channel-profile') sib-route(name='channel-profile')
button Info div Info
sib-route(name='channel-edit') sib-route(name='channel-edit')
button Éditer div Éditer
sib-route(name='channel-create') sib-route(name='channel-create')
button Nouveau div Nouveau
#network-views-container #network-views-container
include channel-chat.pug include channel-chat.pug
include channel-profile.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/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}/node_modules/normalize.css/normalize.css?v=${v}`)
link(rel='stylesheet', href=`${dn}/dist/css/hd-app.css?v=${v}`) link(rel='stylesheet', href=`${dn}/dist/css/hd-app.css?v=${v}`)
// Javascript // Javascript
script(src=`${dn}/node_modules/jquery/dist/jquery.min.js`) script(src=`${dn}/node_modules/jquery/dist/jquery.min.js`)
//- script(src=`${dn}/node_modules/bootstrap/dist/js/bootstrap.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}/dist/lib/webcomponentsjs/webcomponents-loader.js`)
script(src=`${dn}/src/js/hd-app.js?v=${v}`) script(src=`${dn}/src/js/hd-app.js?v=${v}`)
//- script(src=`${dn}/dist/lib/sib-chat/3rdparty/sib-oidc-client.js?v=${v}`) //- script(src=`${dn}/dist/lib/sib-chat/3rdparty/sib-oidc-client.js?v=${v}`)
// Web components // Web components
link(rel='import', href=`${dn}/dist/lib/sib-core/sib-display.html?v=${v}`) 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-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 client-creation.pug
//- include channels.pug //- include channels.pug
include channel.pug include channel.pug
//- include search.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='') #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='') #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-display {
ldp-form { ldp-form {
display: block; display: block;
background-color: #F3F3F3; background-color: #f3f3f3;
padding: 15px; padding: 15px;
box-sizing: content-box; box-sizing: content-box;
form { form {
@extend %self-clear; @extend %self-clear;
ldp-form-text { ldp-form-text {
position: relative; position: relative;
display: block; display: block;
margin-bottom: 1rem; margin-bottom: 1rem;
&::before { &::before {
position: absolute; position: absolute;
top: 3px; top: 3px;
bottom: 0px; bottom: 0px;
left: 10px; left: 10px;
margin: auto; margin: auto;
font-family: FontAwesome; font-family: FontAwesome;
content: "\f002"; content: '\f002';
color: gray; color: gray;
} }
label { label {
text-transform: capitalize; text-transform: capitalize;
display: none; display: none;
} }
input[type="text"] { input[type='text'] {
@extend %form-control; @extend %form-control;
@extend %form-control-sm; @extend %form-control-sm;
padding-left: 30px; padding-left: 30px;
} }
} }
input[type="submit"], input[type='submit'],
input[type="reset"] { input[type='reset'] {
@extend %btn; @extend %btn;
float: right; float: right;
} }
input[type="submit"] { input[type='submit'] {
@extend %btn-primary; @extend %btn-primary;
} }
input[type="reset"] { input[type='reset'] {
@extend %btn-link; @extend %btn-link;
} }
} }
@ -59,7 +59,7 @@ ldp-form.edit-form {
@extend %form-group; @extend %form-group;
label { label {
text-transform: capitalize; text-transform: capitalize;
} }
input { input {
@ -68,7 +68,7 @@ ldp-form.edit-form {
} }
} }
input[type="submit"] { input[type='submit'] {
@extend %btn; @extend %btn;
@extend %btn-primary; @extend %btn-primary;
} }
@ -76,27 +76,33 @@ ldp-form.edit-form {
sib-form { sib-form {
sib-form-text { sib-form-text {
label { label {
text-transform: capitalize; text-transform: capitalize;
} }
input { input {
margin-right: .5em; margin-right: 0.5em;
padding: .375em .75em; padding: 0.375em 0.75em;
font-size: 1rem; font-size: 1rem;
line-height: 1.5; line-height: 1.5;
color: #495057; color: #495057;
background-color: #fff; background-color: #fff;
border: 1px solid #ced4da; border: 1px solid #ced4da;
border-radius: .25rem; border-radius: 0.25rem;
vertical-align: top; vertical-align: top;
} }
} }
input[type="submit"], input[type="reset"] { input[type='submit'],
input[type='reset'] {
@extend %btn; @extend %btn;
@extend %btn-primary; @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 { #profiles-list {
display: block; display: block;
sib-form {
display: block;
margin: 3em 0;
input[type='reset'] {
display: none;
}
}
div[name='header'] { div[name='header'] {
border-top: 2em solid $col-alt-bg; border-top: 2em solid $col-alt-bg;
border-bottom: 1px solid $col-alt-bg; border-bottom: 1px solid $col-alt-bg;