fix chat
This commit is contained in:
		
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							@ -1,7 +1,7 @@
 | 
			
		||||
default: build
 | 
			
		||||
 | 
			
		||||
config.pug:
 | 
			
		||||
	cp -n config-sample.pug config.pug
 | 
			
		||||
	@cp -n config-sample.pug config.pug
 | 
			
		||||
 | 
			
		||||
node_modules:
 | 
			
		||||
	npm install
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										20
									
								
								preprod.sh
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								preprod.sh
									
									
									
									
									
								
							@ -1,12 +1,18 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
export DN="http://staging-app.happy-dev.fr"
 | 
			
		||||
export DN="https://staging-app.happy-dev.fr"
 | 
			
		||||
export SDN="https://test-paris.happy-dev.fr"
 | 
			
		||||
export CDN="http://staging-app.happy-dev.fr/dist/lib"
 | 
			
		||||
make prod
 | 
			
		||||
# ssh staging-app@ssh-staging-app.happy-dev.fr "rm -R staging-app.happy-dev.fr; mkdir staging-app.happy-dev.fr; cd staging-app.happy-dev.fr; mkdir -p src/fonts; mkdir -p dist/css;"
 | 
			
		||||
export CDN="https://staging-app.happy-dev.fr/dist/lib"
 | 
			
		||||
 | 
			
		||||
make -B build
 | 
			
		||||
 | 
			
		||||
# ssh staging-app@ssh-staging-app.happy-dev.fr "rm -R staging-app.happy-dev.fr"
 | 
			
		||||
ssh staging-app@ssh-staging-app.happy-dev.fr "mkdir -p staging-app.happy-dev.fr/src/fonts; cd staging-app.happy-dev.fr; mkdir -p dist/css;"
 | 
			
		||||
 | 
			
		||||
echo sync...
 | 
			
		||||
rsync -u index.html staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/
 | 
			
		||||
rsync -u .htaccess staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/
 | 
			
		||||
rsync -u oidc-client-preprod-config.json  staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/oidc-client-config.json
 | 
			
		||||
rsync -zr dist/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/
 | 
			
		||||
rsync -zr src/fonts/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/
 | 
			
		||||
rsync -zr src/js/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/
 | 
			
		||||
rsync -r dist/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/dist/
 | 
			
		||||
rsync -r src/fonts/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/fonts/
 | 
			
		||||
rsync -r src/js/* staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/js/
 | 
			
		||||
echo ...done
 | 
			
		||||
@ -6,7 +6,7 @@ html(lang='fr')
 | 
			
		||||
    meta(http-equiv='X-UA-Compatible', content='ie=edge')
 | 
			
		||||
    title Happy Dev App
 | 
			
		||||
    //- Prod/Dev setup
 | 
			
		||||
    if (['http://app.happy-dev.fr', 'http://staging-app.happy-dev.fr'].includes(dn))
 | 
			
		||||
    if (['https://app.happy-dev.fr', 'https://staging-app.happy-dev.fr'].includes(dn))
 | 
			
		||||
      include dependencies-prod.pug
 | 
			
		||||
    else
 | 
			
		||||
      include dependencies-dev.pug
 | 
			
		||||
@ -26,7 +26,7 @@ html(lang='fr')
 | 
			
		||||
        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.
 | 
			
		||||
    script.
 | 
			
		||||
      // Move the chat singleton to the right view on "page load"
 | 
			
		||||
      window.onload = function() {
 | 
			
		||||
        if (window.location.pathname.indexOf("-chat") !== -1) {
 | 
			
		||||
@ -34,6 +34,7 @@ html(lang='fr')
 | 
			
		||||
          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;
 | 
			
		||||
 | 
			
		||||
@ -6,11 +6,12 @@ div
 | 
			
		||||
      div(hidden)
 | 
			
		||||
        sib-route(name='member', id-prefix=`${sdn}/members/`)
 | 
			
		||||
        sib-route(name='project', id-prefix=`${sdn}/projects/`)
 | 
			
		||||
        sib-route(name='channel', id-prefix=`${sdn}/channels/`)
 | 
			
		||||
      div#menu-items
 | 
			
		||||
        sib-route(name='members')
 | 
			
		||||
          div
 | 
			
		||||
              i.fa.fa-users
 | 
			
		||||
              |  Membres
 | 
			
		||||
            i.fa.fa-users
 | 
			
		||||
            |  Membres
 | 
			
		||||
        sib-route(name='job-offers')
 | 
			
		||||
          div
 | 
			
		||||
            i.fa.fa-handshake-o
 | 
			
		||||
@ -33,14 +34,6 @@ div
 | 
			
		||||
            data-fields='name',
 | 
			
		||||
            next='channel'
 | 
			
		||||
          )
 | 
			
		||||
            
 | 
			
		||||
          //- sib-route(name='projects')
 | 
			
		||||
            i.fa.fa-tasks(aria-hidden='true')
 | 
			
		||||
            |  Projets
 | 
			
		||||
          //- sib-route(name='client-create')
 | 
			
		||||
            i.fa.fa-plus(aria-hidden='true')
 | 
			
		||||
            |  New client
 | 
			
		||||
          //- sib-route(name='channels')
 | 
			
		||||
            i.fa.fa-comments(aria-hidden='true')
 | 
			
		||||
            |  Network
 | 
			
		||||
          //- sib-route(name='channel', id-prefix=`${sdn}/channels/`)
 | 
			
		||||
            |  New client
 | 
			
		||||
@ -1,17 +1,17 @@
 | 
			
		||||
sib-chat {
 | 
			
		||||
  // position: absolute;
 | 
			
		||||
  border: 1px dotted red;
 | 
			
		||||
  top: $menu-height;
 | 
			
		||||
  bottom: 0px;
 | 
			
		||||
  left: 0px;
 | 
			
		||||
  right: 0px;
 | 
			
		||||
  //position: absolute;
 | 
			
		||||
  border: 5px dotted red;
 | 
			
		||||
  top: 0;
 | 
			
		||||
  bottom: 0;
 | 
			
		||||
  left: 0;
 | 
			
		||||
  right: 0;
 | 
			
		||||
  margin: auto;
 | 
			
		||||
  display: none;
 | 
			
		||||
  min-height: 300px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.chat-view {
 | 
			
		||||
  sib-chat {
 | 
			
		||||
    display: block;
 | 
			
		||||
    top: $menu-height + 30px;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -38,7 +38,7 @@
 | 
			
		||||
    background-image: linear-gradient(
 | 
			
		||||
      to right,
 | 
			
		||||
      rgba(0, 0, 0, $shadow-opacity),
 | 
			
		||||
      #0000
 | 
			
		||||
      transparent
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user