-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
77 lines (69 loc) · 2.67 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<!--
This is a sample HTML file which shows how to embed a full-window instance of WebChat.
1. Build the project: "npm run build"
2. Start a web server: "npm run start"
3. Aim your browser at "http://localhost:8000/samples?[parameters as listed below]"
For ease of testing, several parameters can be set in the query string:
* s = Direct Line secret, or
* t = Direct Line token (obtained by calling Direct Line's Generate Token)
* domain = optionally, the URL of an alternate Direct Line endpoint
* webSocket = set to 'true' to use WebSocket to receive messages (currently defaults to false)
* userid, username = id (and optionally name) of bot user
* botid, botname = id (and optionally name) of bot
* style = 'img' 'firstInitial' or 'bothInitials' for webchat icon style
* img will show user image url
* firstInitial will show first initial of user's name on a colored background
* bothInitials will show both initials of user's name on a colored background
* color = the index of desired background color for initials according to colorPalette (see below)
* initials = the initials to be rendered against colored background
* showbot, showuser = set to 'true' or 'false' to show or hide icon of bot / user
-->
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>QimBot Chat</title>
<link href="../../botchat.css" rel="stylesheet" />
<link href="../../botchat-fullwindow.css" rel="stylesheet" />
<style>
html, body {
height: 100%;
margin: 0;
overflow: hidden;
padding: 0;
}
</style>
</head>
<body>
<div id="BotChatGoesHere"></div>
<script src="../../botchat.js"></script>
<script>
const params = BotChat.queryParams(location.search);
const user = {
id: 'userid',
name: 'Utilisateur',
iconUrl: null
};
const bot = {
id: 'qimbot',
name: 'QimBot',
iconUrl: "./built/assets/qimbot.jpg"
};
window['botchatDebug'] = true;
BotChat.App({
bot: bot,
locale: params['locale'],
resize: 'window',
// sendTyping: true, // defaults to false. set to true to send 'typing' activities to bot (and other users) when user is typing
user: user,
directLine: {
secret: '',
// token: params['t'],
// domain: params['domain'],
webSocket: true // defaults to true
}
}, document.getElementById('BotChatGoesHere'));
</script>
</body>
</html>