feature - chat component on the right view
This commit is contained in:
parent
687afddf50
commit
bbb8e0a24c
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ dist/html/*
|
|||||||
index.html
|
index.html
|
||||||
config.php
|
config.php
|
||||||
issues.md
|
issues.md
|
||||||
|
oidc-client-preprod-config.json
|
||||||
|
2
dist/lib/sib-chat
vendored
2
dist/lib/sib-chat
vendored
@ -1 +1 @@
|
|||||||
Subproject commit ab4fc15f5f4476e111dfb5bbdb43c7b88af18bf9
|
Subproject commit b00af6aa4e2412468d5ca7b293d7f2517f1b0c28
|
2
dist/lib/sib-router
vendored
2
dist/lib/sib-router
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 6109962852d523b23d47fb344083e77917ec1a9c
|
Subproject commit 3914e3736e66a96c42fb9a20c5412ed948eabf86
|
20
index.php
20
index.php
@ -36,5 +36,25 @@
|
|||||||
<?php require_once('src/html/channel.php'); ?>
|
<?php require_once('src/html/channel.php'); ?>
|
||||||
<?php require_once('src/html/search.html'); ?>
|
<?php require_once('src/html/search.html'); ?>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<sib-chat
|
||||||
|
id="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
|
||||||
|
></sib-chat>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
10
oidc-client-config.json
Normal file
10
oidc-client-config.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"authority": "https://test-paris.happy-dev.fr/openid/",
|
||||||
|
"client_id": "125356",
|
||||||
|
"redirect_uri": "http://hd-app.local",
|
||||||
|
"response_type": "id_token token",
|
||||||
|
"scope": "openid profile email",
|
||||||
|
"automaticSilentRenew": true,
|
||||||
|
"silent_redirect_uri": "http://hd-app.local",
|
||||||
|
"loadUserInfo": true
|
||||||
|
}
|
16
preprod.sh
16
preprod.sh
@ -1,11 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export DN="https://staging-app.happy-dev.fr"
|
export DN="https://staging-app.happy-dev.fr"
|
||||||
export SDN="https://staging-hd-app-server.happy-dev.fr"
|
export SDN="https://test-paris.happy-dev.fr"
|
||||||
|
export CDN="https://cdn.happy-dev.fr"
|
||||||
php index.php > index.html
|
php index.php > index.html
|
||||||
grunt
|
grunt
|
||||||
ssh hd-app@ssh-hd-app.alwaysdata.net "rm -R staging-hd-app; mkdir staging-hd-app; cd staging-hd-app; mkdir -p src/fonts; mkdir -p dist/css;"
|
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;"
|
||||||
scp index.html hd-app@ssh-hd-app.alwaysdata.net:~/staging-hd-app/
|
scp index.html staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/
|
||||||
scp .htaccess hd-app@ssh-hd-app.alwaysdata.net:~/staging-hd-app/
|
scp .htaccess staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/
|
||||||
scp -r dist/css/ hd-app@ssh-hd-app.alwaysdata.net:~/staging-hd-app/dist/
|
scp oidc-client-preprod-config.json staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/oidc-client-config.json
|
||||||
scp -r src/fonts/ hd-app@ssh-hd-app.alwaysdata.net:~/staging-hd-app/src/
|
scp -r dist/css/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/dist/
|
||||||
scp -r src/js/ hd-app@ssh-hd-app.alwaysdata.net:~/staging-hd-app/src/
|
scp -r src/fonts/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/
|
||||||
|
scp -r src/js/ staging-app@ssh-staging-app.happy-dev.fr:~/staging-app.happy-dev.fr/src/
|
||||||
|
@ -1,4 +1,2 @@
|
|||||||
<div id="channel-chat" style="display: none">
|
<div id="channel-chat" class="chat-view" style="display: none" bind-resources></div>
|
||||||
<i>Chat coming soon...</i>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div id="channel-create" style="display: none">
|
<div id="channel-create" style="display: none">
|
||||||
<sib-form
|
<sib-form
|
||||||
data-src="http://localhost:8000/channels/"
|
data-src="<?php echo $sdn; ?>/channels/"
|
||||||
range-owner="<?php echo $sdn; ?>/members/"
|
range-owner="<?php echo $sdn; ?>/members/"
|
||||||
widget-members="sib-form-multiple-dropdown"
|
widget-members="sib-form-multiple-dropdown"
|
||||||
range-members="<?php echo $sdn; ?>/members/"
|
range-members="<?php echo $sdn; ?>/members/"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div id="client-create" style="display: none">
|
<div id="client-create" style="display: none">
|
||||||
<sib-form
|
<sib-form
|
||||||
data-src="http://localhost:8000/clients/"
|
data-src="<?php echo $sdn; ?>/clients/"
|
||||||
data-fields="name, address, logo"
|
data-fields="name, address, logo"
|
||||||
></sib-form>
|
></sib-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<!-- Stylesheets -->
|
<!-- Stylesheets -->
|
||||||
<link rel="stylesheet" href="<?php echo $dn; ?>/node_modules/bootstrap/dist/css/bootstrap.min.css" />
|
<link rel="stylesheet" href="<?php echo $dn; ?>/node_modules/bootstrap/dist/css/bootstrap.min.css" />
|
||||||
<link rel="stylesheet" href="<?php echo $dn; ?>/node_modules/cropper/dist/cropper.min.css" />
|
<link rel="stylesheet" href="<?php echo $dn; ?>/node_modules/cropper/dist/cropper.min.css" />
|
||||||
<link rel="stylesheet" href="<?php echo $dn; ?>/dist/css/hd-app.css?v=<?php echo $v ?>" />
|
|
||||||
<link rel="stylesheet" href="<?php echo $dn; ?>/node_modules/font-awesome/css/font-awesome.min.css" />
|
<link rel="stylesheet" href="<?php echo $dn; ?>/node_modules/font-awesome/css/font-awesome.min.css" />
|
||||||
|
<link rel="stylesheet" href="<?php echo $dn; ?>/dist/css/hd-app.css?v=<?php echo $v ?>" />
|
||||||
|
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
<script type="text/javascript" src="<?php echo $dn; ?>/node_modules/jquery/dist/jquery.min.js"></script>
|
<script type="text/javascript" src="<?php echo $dn; ?>/node_modules/jquery/dist/jquery.min.js"></script>
|
||||||
@ -15,5 +15,5 @@
|
|||||||
<!-- Web components -->
|
<!-- Web components -->
|
||||||
<link rel="import" href="<?php echo $dn; ?>/dist/lib/sib-core/sib-display.html?v=<?php echo $v ?>" />
|
<link rel="import" href="<?php echo $dn; ?>/dist/lib/sib-core/sib-display.html?v=<?php echo $v ?>" />
|
||||||
<link rel="import" href="<?php echo $dn; ?>/dist/lib/sib-router/sib-router.html?v=<?php echo $v ?>" />
|
<link rel="import" href="<?php echo $dn; ?>/dist/lib/sib-router/sib-router.html?v=<?php echo $v ?>" />
|
||||||
<link rel="import" href="<?php echo $dn; ?>/dist/lib/sib-chat/sib-chat.html?v=<?php echo $v ?>">
|
<link rel="import" href="<?php echo $dn; ?>/dist/lib/sib-chat/sib-chat.html">
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!-- Stylesheets -->
|
<!-- Stylesheets -->
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha384-9gVQ4dYFwwWSjIDZnLEWnxCjeSWFphJiwGPXr1jddIhOegiu1FwO5qRGvFXOdJZ4" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
|
||||||
<link href="https://cdn.bootcss.com/cropper/4.0.0/cropper.min.css" rel="stylesheet">
|
<link href="https://cdn.bootcss.com/cropper/4.0.0/cropper.min.css" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="<?php echo $dn; ?>/dist/css/hd-app.css?v=<?php echo $v ?>" />
|
<link rel="stylesheet" href="<?php echo $dn; ?>/dist/css/hd-app.css?v=<?php echo $v ?>" />
|
||||||
|
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
@ -10,9 +10,10 @@
|
|||||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js" integrity="sha384-uefMccjFJAIv6A+rW+L4AHf99KvxDjWSu1z9VI8SKNVmz4sk7buKt/6v9KI65qnm" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdn.bootcss.com/cropper/4.0.0/cropper.min.js"></script>
|
<script src="https://cdn.bootcss.com/cropper/4.0.0/cropper.min.js"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/webcomponents-loader.js" integrity="sha256-fUVqCtpScUF69qkFkeuHmcShr2N2UleRQJhRG4etHds=" crossorigin="anonymous"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.2.0/webcomponents-loader.js" integrity="sha256-fUVqCtpScUF69qkFkeuHmcShr2N2UleRQJhRG4etHds=" crossorigin="anonymous"></script>
|
||||||
<script type="text/javascript" src="<?php echo $dn; ?>/src/js/hd-app.js?v=<?php echo $v ?>"></script>
|
<script src="<?php echo $dn; ?>/src/js/hd-app.js?v=<?php echo $v ?>"></script>
|
||||||
|
<script src="<?php echo $cdn; ?>/sib-chat/3rdparty/sib-oidc-client.js?v=<?php echo $v ?>"></script>
|
||||||
|
|
||||||
<!-- Web components -->
|
<!-- Web components -->
|
||||||
<link rel="import" href="https://cdn.happy-dev.fr/sib-core/sib-display.html?v=<?php echo $v ?>" />
|
<link rel="import" href="<?php echo $cdn; ?>/sib-core/sib-display.html?v=<?php echo $v ?>" />
|
||||||
<link rel="import" href="https://cdn.happy-dev.fr/sib-router/sib-router.html?v=<?php echo $v ?>" />
|
<link rel="import" href="<?php echo $cdn; ?>/sib-router/sib-router.html?v=<?php echo $v ?>" />
|
||||||
<link rel="import" href="https://xmpp-chat-component.happy-dev.fr/chat-window-component.html?v=<?php echo $v ?>">
|
<link rel="import" href="<?php echo $cdn; ?>/sib-chat/sib-chat.html">
|
||||||
|
@ -1,12 +1 @@
|
|||||||
<div id="member-chat" style="display: none">
|
<div id="member-chat" class="chat-view" style="display: none" bind-resources></div>
|
||||||
<sib-chat
|
|
||||||
id="chat-singleton"
|
|
||||||
data-src="https://djangoldp.happy-dev.fr/users/1/"
|
|
||||||
data-authentication="login"
|
|
||||||
data-auto-login="true"
|
|
||||||
data-bosh-service-url="http://jabber.happy-dev.fr/http-bind/"
|
|
||||||
data-debug="false"
|
|
||||||
data-locales-url="node_modules/converse.js/locale/{{{locale}}}/LC_MESSAGES/converse.json"
|
|
||||||
bind-resources>
|
|
||||||
</sib-chat>
|
|
||||||
</div>
|
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
|
|
||||||
<div id="member-edit" style="display: none">
|
<div id="member-edit" style="display: none">
|
||||||
<label for="avatar-input" class="d-none">
|
<label for="avatar-input" class="d-none">
|
||||||
<img id="avatar-preview" src="http://cdn.local/hdapp/members/alexandre-bourlier.jpg" style="width: 100%;"/>
|
<img id="avatar-preview" src="" style="width: 100%;"/>
|
||||||
</label>
|
</label>
|
||||||
<input class="d-none" type="file" accept="image/*" id="avatar-input" name="avatar" value="http://cdn.hd-app.local/members/alexandre-bourlier.jpg" />
|
<input class="d-none" type="file" accept="image/*" id="avatar-input" name="avatar" value="" />
|
||||||
|
|
||||||
<sib-form
|
<sib-form
|
||||||
class="edit-form"
|
class="edit-form"
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
<span class="d-none d-md-inline"> Network</span>
|
<span class="d-none d-md-inline"> Network</span>
|
||||||
</sib-route>
|
</sib-route>
|
||||||
<sib-route class="d-none" name="channel" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route>
|
<sib-route class="d-none" name="channel" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route>
|
||||||
<sib-route class="d-none" name="channel-edition" id-prefix="<?php echo $sdn; ?>/channels/"></sib-route>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-2 col-md-1"></div>
|
<div class="col-2 col-md-1"></div>
|
||||||
|
@ -1,3 +1 @@
|
|||||||
<div id="project-chat" style="display: none">
|
<div id="project-chat" class="chat-view" style="display: none" bind-resources></div>
|
||||||
<i>Chat coming soon...</i>
|
|
||||||
</div>
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<div id="project-create" style="display: none">
|
<div id="project-create" style="display: none">
|
||||||
<sib-form
|
<sib-form
|
||||||
data-src="http://localhost:8000/projects/"
|
data-src="<?php echo $sdn; ?>/projects/"
|
||||||
range-client="<?php echo $sdn; ?>/clients/"
|
range-client="<?php echo $sdn; ?>/clients/"
|
||||||
widget-team="sib-form-multiple-dropdown"
|
widget-team="sib-form-multiple-dropdown"
|
||||||
range-team="<?php echo $sdn; ?>/team/"
|
range-team="<?php echo $sdn; ?>/members/"
|
||||||
></sib-form>
|
></sib-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<sib-form
|
<sib-form
|
||||||
range-client="<?php echo $sdn; ?>/clients/"
|
range-client="<?php echo $sdn; ?>/clients/"
|
||||||
widget-team="sib-form-multiple-dropdown"
|
widget-team="sib-form-multiple-dropdown"
|
||||||
range-team="<?php echo $sdn; ?>/team/"
|
range-team="<?php echo $sdn; ?>/members/"
|
||||||
bind-resources
|
bind-resources
|
||||||
></sib-form>
|
></sib-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,7 +8,7 @@ sib-chat {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#member-chat {
|
.chat-view {
|
||||||
sib-chat {
|
sib-chat {
|
||||||
display: block;
|
display: block;
|
||||||
top: $menu-height + 30px;
|
top: $menu-height + 30px;
|
||||||
|
Loading…
Reference in New Issue
Block a user