@chat21/chat21-web-widget 5.0.47-rc.1 → 5.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/assets/i18n/en.json +1 -0
- package/dist/assets/images/website mockup.jpg +0 -0
- package/dist/assets/twp/chatbot-panel.html +612 -0
- package/dist/assets/twp/index-dev.html +53 -0
- package/dist/main.js +1 -1
- package/package.json +1 -1
- package/src/app/component/home/home.component.html +81 -1
- package/src/app/component/home/home.component.scss +34 -0
- package/src/app/component/home/home.component.ts +23 -1
- package/src/app/component/message/bubble-message/bubble-message.component.html +27 -27
- package/src/app/providers/global-settings.service.ts +16 -1
- package/src/app/utils/globals.ts +10 -1
- package/src/assets/i18n/en.json +1 -0
- package/src/assets/images/website mockup.jpg +0 -0
- package/src/assets/twp/chatbot-panel.html +612 -0
- package/src/assets/twp/index-dev.html +53 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# chat21-web-widget ver 5.0
|
|
2
2
|
|
|
3
|
+
### 5.0.47 in PROD
|
|
4
|
+
|
|
5
|
+
### 5.0.47-rc.2
|
|
6
|
+
- added: whatsapp number added to home
|
|
7
|
+
- added: chatbot-panel page to host chatbot template
|
|
8
|
+
- added: facebbok messanger channel link to home component
|
|
9
|
+
- added: telegram channel link to home component
|
|
10
|
+
|
|
3
11
|
### 5.0.47-rc.1
|
|
4
12
|
- added: sourceTitle info in attributes
|
|
5
13
|
- added: restartConversation settings parameter to ALWAYS restart a conversation if singleConversation mode is active
|
package/dist/assets/i18n/en.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"LABEL_TU": "",
|
|
3
3
|
"LABEL_PLACEHOLDER": "type your message..",
|
|
4
4
|
"LABEL_START_NW_CONV": "New conversation",
|
|
5
|
+
"LABEL_WHATSAPP": "Message us",
|
|
5
6
|
"LABEL_FIRST_MSG": "Describe shortly your problem, you will be contacted by an agent.",
|
|
6
7
|
"LABEL_FIRST_MSG_NO_AGENTS": "🤔 All operators are offline at the moment. You can anyway describe your problem. It will be assigned to the support team who will answer you as soon as possible.",
|
|
7
8
|
"LABEL_SELECT_TOPIC": "Select a topic",
|
|
Binary file
|
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
6
|
+
<meta charset="utf-8">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
8
|
+
|
|
9
|
+
<title>Widget test page </title>
|
|
10
|
+
<style>
|
|
11
|
+
|
|
12
|
+
@-moz-keyframes blink {0%{opacity:1;} 50%{opacity:0;} 100%{opacity:1;}} /* Firefox */
|
|
13
|
+
@-webkit-keyframes blink {0%{opacity:1;} 50%{opacity:0;} 100%{opacity:1;}} /* Webkit */
|
|
14
|
+
@-ms-keyframes blink {0%{opacity:1;} 50%{opacity:0;} 100%{opacity:1;}} /* IE */
|
|
15
|
+
@keyframes blink {0%{opacity:1;} 50%{opacity:0;} 100%{opacity:1;}} /* Opera and prob css3 final iteration */
|
|
16
|
+
|
|
17
|
+
#preloader {
|
|
18
|
+
background: #fff;
|
|
19
|
+
position: fixed;
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
height: 100%;
|
|
23
|
+
width: 100%;
|
|
24
|
+
z-index: 999999;
|
|
25
|
+
opacity: 1;
|
|
26
|
+
filter: alpha(opacity=100);
|
|
27
|
+
-webkit-transition: opacity 500ms ease;
|
|
28
|
+
transition: opacity 500ms ease, display 500ms;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
#preloader .logo {
|
|
32
|
+
display: block;
|
|
33
|
+
width: 109px;
|
|
34
|
+
height: 39px;
|
|
35
|
+
background-repeat: no-repeat;
|
|
36
|
+
background-image: url(./tiledesk_widget_files/logo@2x-black.png);
|
|
37
|
+
background-size: contain;
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 50%;
|
|
40
|
+
left: 50%;
|
|
41
|
+
margin: -20px 0 0 -55px;
|
|
42
|
+
-moz-transition:all 1s ease-in-out;
|
|
43
|
+
-webkit-transition:all 1s ease-in-out;
|
|
44
|
+
-o-transition:all 1s ease-in-out;
|
|
45
|
+
-ms-transition:all 1s ease-in-out;
|
|
46
|
+
transition:all 1s ease-in-out;
|
|
47
|
+
/* order: name, direction, duration, iteration-count, timing-function */
|
|
48
|
+
-moz-animation:blink normal 2s infinite ease-in-out; /* Firefox */
|
|
49
|
+
-webkit-animation:blink normal 2s infinite ease-in-out; /* Webkit */
|
|
50
|
+
-ms-animation:blink normal 2s infinite ease-in-out; /* IE */
|
|
51
|
+
animation:blink normal 2s infinite ease-in-out; /* Opera and prob css3 final iteration */
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#deferred-styles {
|
|
55
|
+
display: none;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
body {
|
|
59
|
+
background-color: #ffffff !important; /*#f4f5f5 !important;*/
|
|
60
|
+
font-family: Roboto, "Helvetica Neue", sans-serif;
|
|
61
|
+
font-weight: 300;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
h1 {
|
|
66
|
+
font-weight: 300;
|
|
67
|
+
padding: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#main h2 {
|
|
71
|
+
margin-top: 25px;
|
|
72
|
+
font-size: 14px;
|
|
73
|
+
font-weight: 300;
|
|
74
|
+
padding: 0;
|
|
75
|
+
display: block; /* Fallback for non-webkit */
|
|
76
|
+
display: -webkit-box;
|
|
77
|
+
max-height: 258px; /* Fallback for non-webkit */
|
|
78
|
+
line-height: 2.3;
|
|
79
|
+
-webkit-line-clamp: 8;
|
|
80
|
+
-webkit-box-orient: vertical;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
html, body {
|
|
86
|
+
height: 100%;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
#wrapper {
|
|
90
|
+
/* display: block!important; */
|
|
91
|
+
min-height: 100%;
|
|
92
|
+
margin-bottom: auto;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
#main {
|
|
96
|
+
padding-bottom:100px;
|
|
97
|
+
margin: 20px auto 0 auto;
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mockup{
|
|
103
|
+
background-repeat: no-repeat;
|
|
104
|
+
background-image: url(../images/website\ mockup.png);
|
|
105
|
+
background-size: calc(100% - 122px);
|
|
106
|
+
background-position-x: 50px;
|
|
107
|
+
background-position-y: 100px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.row {
|
|
111
|
+
margin-left: 0;
|
|
112
|
+
margin-right: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.b_frame {
|
|
116
|
+
-webkit-box-shadow: 0px 19px 147px -41px rgba(0,0,0,0.75);
|
|
117
|
+
-moz-box-shadow: 0px 19px 147px -41px rgba(0,0,0,0.75);
|
|
118
|
+
box-shadow: 0px 19px 147px -41px rgba(0,0,0,0.75);
|
|
119
|
+
border: 0;
|
|
120
|
+
width: 400px;
|
|
121
|
+
height: 530px;
|
|
122
|
+
display: block;
|
|
123
|
+
margin: 0 auto;
|
|
124
|
+
margin-bottom: 40px;
|
|
125
|
+
}
|
|
126
|
+
.col-md-6 {
|
|
127
|
+
margin-top: 30px;
|
|
128
|
+
padding: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
.b_integrations_agent_links {
|
|
133
|
+
margin-top: 50px;
|
|
134
|
+
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.b_integrations_agent_links a {
|
|
138
|
+
color: black;
|
|
139
|
+
margin-right: 30px;
|
|
140
|
+
}
|
|
141
|
+
.b_integrations_agent_links a i {
|
|
142
|
+
color: gray;
|
|
143
|
+
margin-right: 10px;
|
|
144
|
+
width: 15px;
|
|
145
|
+
height: 15px;
|
|
146
|
+
display: inline-block;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.b_integrations_agent_links em{
|
|
150
|
+
margin-right: 10px;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
#shareModal .modal-body {
|
|
154
|
+
text-align: center;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
footer#footer {
|
|
158
|
+
background-color: white;
|
|
159
|
+
text-align: center;
|
|
160
|
+
|
|
161
|
+
position: relative;
|
|
162
|
+
margin-top: -81px; /* negative value of footer height */
|
|
163
|
+
height: 80px;
|
|
164
|
+
clear:both;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.b-agent-demo_powered_by a {
|
|
168
|
+
display: inline-block;
|
|
169
|
+
margin-top: 30px;
|
|
170
|
+
margin-bottom: 30px;
|
|
171
|
+
text-decoration: none;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.b-agent-demo_powered_by span {
|
|
175
|
+
display: inline-block;
|
|
176
|
+
color: #B7BBC4;
|
|
177
|
+
text-transform: uppercase;
|
|
178
|
+
line-height: 20px;
|
|
179
|
+
}
|
|
180
|
+
.b-agent-demo_powered_by img {
|
|
181
|
+
display: inline-block;
|
|
182
|
+
height: 24px;
|
|
183
|
+
/* margin-left: 20px; */
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
</style>
|
|
188
|
+
|
|
189
|
+
<!-- <script type="text/javascript">
|
|
190
|
+
|
|
191
|
+
// redirect to mobile version
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* definitely not the best way to findout if there is a mobile browser
|
|
195
|
+
* @returns {any}
|
|
196
|
+
*/
|
|
197
|
+
function deviceOS() {
|
|
198
|
+
var useragent = navigator.userAgent;
|
|
199
|
+
if(useragent.match(/Android/i)) {
|
|
200
|
+
return 'android';
|
|
201
|
+
} else if(useragent.match(/webOS/i)) {
|
|
202
|
+
return 'webos';
|
|
203
|
+
} else if(useragent.match(/iPhone/i)) {
|
|
204
|
+
return 'iphone';
|
|
205
|
+
} else if(useragent.match(/iPod/i)) {
|
|
206
|
+
return 'ipod';
|
|
207
|
+
} else if(useragent.match(/iPad/i)) {
|
|
208
|
+
return 'ipad';
|
|
209
|
+
} else if(useragent.match(/Windows Phone/i)) {
|
|
210
|
+
return 'windows phone';
|
|
211
|
+
} else if(useragent.match(/SymbianOS/i)) {
|
|
212
|
+
return 'symbian';
|
|
213
|
+
} else if(useragent.match(/RIM/i) || useragent.match(/BB/i)) {
|
|
214
|
+
return 'blackberry';
|
|
215
|
+
} else {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if (deviceOS()) {
|
|
221
|
+
var frameEl = document.getElementById('frame');
|
|
222
|
+
location.href = "";
|
|
223
|
+
}
|
|
224
|
+
</script> -->
|
|
225
|
+
|
|
226
|
+
<meta property="og:title" content="Widget test page">
|
|
227
|
+
<meta property="og:description" content="">
|
|
228
|
+
<meta property="og:locale" content="en">
|
|
229
|
+
<meta property="og:image" content="">
|
|
230
|
+
|
|
231
|
+
<link rel="icon" type="image/png" href="https://tiledesk.com/wp-content/uploads/2022/07/tiledesk_v13-300x300.png">
|
|
232
|
+
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
|
|
233
|
+
<script defer="" src="./tiledesk_widget_files/jquery.min.js"></script>
|
|
234
|
+
<script defer="" src="./tiledesk_widget_files/bootstrap.min.js"></script>
|
|
235
|
+
|
|
236
|
+
<!-- <script type="application/javascript">
|
|
237
|
+
window.tiledeskSettings = {
|
|
238
|
+
marginX: "100px",
|
|
239
|
+
marginY: "50px"
|
|
240
|
+
};
|
|
241
|
+
(function(d, s, id) {
|
|
242
|
+
var js, fjs = d.getElementsByTagName(s)[0];
|
|
243
|
+
if (d.getElementById(id)) return;
|
|
244
|
+
js = d.createElement(s); js.id = id; //js.async=!0;
|
|
245
|
+
js.src = "../../launch.js";
|
|
246
|
+
fjs.parentNode.insertBefore(js, fjs);
|
|
247
|
+
}(document, 'script', 'tiledesk-jssdk'));
|
|
248
|
+
|
|
249
|
+
</script> -->
|
|
250
|
+
<script type="application/javascript">
|
|
251
|
+
window.tiledeskSettings = {
|
|
252
|
+
marginX: "100px",
|
|
253
|
+
marginY: "50px",
|
|
254
|
+
calloutTimer: 1,
|
|
255
|
+
singleConversation: true,
|
|
256
|
+
restartConversation: true
|
|
257
|
+
// autostart: false
|
|
258
|
+
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
(function(d, s, id) {
|
|
262
|
+
var w=window; var d=document;
|
|
263
|
+
var i=function() {
|
|
264
|
+
i.c(arguments);
|
|
265
|
+
};
|
|
266
|
+
i.q=[];
|
|
267
|
+
i.c=function(args){
|
|
268
|
+
i.q.push(args);
|
|
269
|
+
};
|
|
270
|
+
w.Tiledesk=i;
|
|
271
|
+
var js, fjs = d.getElementsByTagName(s)[0];
|
|
272
|
+
if (d.getElementById(id)) return;
|
|
273
|
+
js = d.createElement(s);
|
|
274
|
+
js.id = id; js.async = true; js.src = "../../launch.js";
|
|
275
|
+
fjs.parentNode.insertBefore(js, fjs);
|
|
276
|
+
}(document, 'script', 'tiledesk-jssdk'));
|
|
277
|
+
|
|
278
|
+
window.Tiledesk('onLoadParams', function(event_data) {
|
|
279
|
+
console.log("onLoadParams Tiledesk FN", event_data);
|
|
280
|
+
// window.Tiledesk('signInWithCustomToken', 'JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MDliOGVmYTg3MzJlYjAwMTQxNzYzZDlfNWU0ZWNiOThiNzhlZTQwMDE3NDA2MTEwIiwiZmlyc3RuYW1lIjoiS2VsbHkiLCJsYXN0bmFtZSI6IkdyYWNlIiwiZW1haWwiOiJncmFjZUBlbWFpbG5hLmNvIiwic3ViIjoidXNlcmV4dGVybmFsIiwiYXVkIjoiaHR0cHM6Ly90aWxlZGVzay5jb20vcHJvamVjdHMvNjA5YjhlZmE4NzMyZWIwMDE0MTc2M2Q5IiwiaWF0IjoxNjQxODAzODk0fQ.p0reTwd25p93CsDTyQa8tkihgFxThAI4DXloNc6vbXw')
|
|
281
|
+
// .then(response => console.log('signInWithCustomToken: user_logged -> ', response))
|
|
282
|
+
// .catch((error)=> console.error('signInWithCustomToken: error', error))
|
|
283
|
+
});
|
|
284
|
+
|
|
285
|
+
window.Tiledesk('onBeforeInit', function(event_data) {
|
|
286
|
+
console.log("onBeforeInit Tiledesk FN", event_data);
|
|
287
|
+
|
|
288
|
+
setTimeout(() => {
|
|
289
|
+
if(event_data && event_data.detail && event_data.detail.appConfigs){
|
|
290
|
+
|
|
291
|
+
var enbedJs = event_data.detail.appConfigs.enbedJs? event_data.detail.appConfigs.enbedJs : false;
|
|
292
|
+
document.getElementById("enbed").style.display = enbedJs? "inline-block": "none";
|
|
293
|
+
document.getElementById("base_url").innerHTML = enbedJs ? baseUrl + '/launch.js': null;
|
|
294
|
+
|
|
295
|
+
baseUrlConsole = event_data.detail.appConfigs.dashboardUrl? event_data.detail.appConfigs.dashboardUrl : baseUrlConsole;
|
|
296
|
+
}
|
|
297
|
+
}, 1000);
|
|
298
|
+
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
window.Tiledesk('onInit', function(event_data) {
|
|
302
|
+
console.log("onInit Tiledesk FN", event_data);
|
|
303
|
+
setTimeout(() => {
|
|
304
|
+
document.getElementById("preloader").style.display = "none";
|
|
305
|
+
}, 1000);
|
|
306
|
+
//open widget after 3s if is closed
|
|
307
|
+
setTimeout(() => {
|
|
308
|
+
if(event_data && event_data.detail && event_data.detail.global && !event_data.detail.global.isOpen){
|
|
309
|
+
window.Tiledesk('open')
|
|
310
|
+
}
|
|
311
|
+
}, 3000);
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
window.Tiledesk('onAuthStateChanged', function(event_data) {
|
|
315
|
+
console.log("AUTHENTICATED!", event_data);
|
|
316
|
+
// if(event_data.detail.isLogged){
|
|
317
|
+
// console.log("isLogged!!!!", event_data);
|
|
318
|
+
// window.Tiledesk('show')
|
|
319
|
+
// }
|
|
320
|
+
});
|
|
321
|
+
</script>
|
|
322
|
+
|
|
323
|
+
<script type="application/javascript">
|
|
324
|
+
var baseUrlConsole = "https://console.tiledesk.com/v2/dashboard/";
|
|
325
|
+
var baseUrlTestPage ="https://widget.tiledesk.com/v5/assets/twp/"
|
|
326
|
+
var queryString = window.location.search;
|
|
327
|
+
var urlParams = new URLSearchParams(queryString);
|
|
328
|
+
var urlToConsole = urlParams.get('goToConsole');
|
|
329
|
+
if(urlToConsole){
|
|
330
|
+
baseUrlConsole = urlToConsole;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
var currentUrl = window.location.href
|
|
336
|
+
var baseUrl = window.location.origin
|
|
337
|
+
function shareOnFacebook() {
|
|
338
|
+
var fbShareUrl = "https://www.facebook.com/sharer.php?u=" + encodeURIComponent(currentUrl);
|
|
339
|
+
window.open(
|
|
340
|
+
fbShareUrl,
|
|
341
|
+
'_blank'
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
function shareOnTwitter() {
|
|
346
|
+
var TwShareUrl = "https://twitter.com/share?url=" + encodeURIComponent(currentUrl);
|
|
347
|
+
window.open(
|
|
348
|
+
TwShareUrl,
|
|
349
|
+
'_blank'
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
function shareOnLinkedin() {
|
|
354
|
+
var LinkedinShareUrl = "https://www.linkedin.com/shareArticle?mini=true&url=" + encodeURIComponent(currentUrl);
|
|
355
|
+
window.open(
|
|
356
|
+
LinkedinShareUrl,
|
|
357
|
+
'_blank'
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
function shareOnTelegram() {
|
|
362
|
+
var TelegramShareUrl = "tg://msg_url?url=" + encodeURIComponent(currentUrl) ;
|
|
363
|
+
// console.log('TelegramShareUrl ', TelegramShareUrl )
|
|
364
|
+
window.open(
|
|
365
|
+
TelegramShareUrl,
|
|
366
|
+
'_blank'
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function shareOnWhatsapp() {
|
|
371
|
+
var WhatsappShareUrl = "whatsapp://send?text=" + currentUrl;
|
|
372
|
+
window.open(
|
|
373
|
+
WhatsappShareUrl,
|
|
374
|
+
'_blank'
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
function goToConsole(){
|
|
379
|
+
var url = new URL(currentUrl);
|
|
380
|
+
var tiledesk_projectid = url.searchParams.get("tiledesk_projectid");
|
|
381
|
+
var project_name = url.searchParams.get("project_name");
|
|
382
|
+
var urlConsole = baseUrlConsole + "#/project/"+tiledesk_projectid+"/home";
|
|
383
|
+
//var urlConsole = "dashboard/#/project/"+tiledesk_projectid+"/home";
|
|
384
|
+
window.open(
|
|
385
|
+
urlConsole,
|
|
386
|
+
'_blank'
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function goToTestPage(){
|
|
391
|
+
var urlTestPage = currentUrl.replace('index.html', 'index-dev.html')
|
|
392
|
+
window.open(
|
|
393
|
+
urlTestPage,
|
|
394
|
+
'_blank'
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
var url = new URL(currentUrl);
|
|
399
|
+
var tiledesk_projectid = url.searchParams.get("tiledesk_projectid");
|
|
400
|
+
var project_name = url.searchParams.get("project_name");
|
|
401
|
+
var role = url.searchParams.get("role")
|
|
402
|
+
var urlConsole = baseUrlConsole + "#/projects/"+tiledesk_projectid+"/home";
|
|
403
|
+
// console.log('tiledesk_projectid: ', tiledesk_projectid);
|
|
404
|
+
// console.log('project_name: ', project_name);
|
|
405
|
+
|
|
406
|
+
window.onload = function() {
|
|
407
|
+
document.getElementById("project_id").innerHTML = '"' + tiledesk_projectid + '"';
|
|
408
|
+
document.getElementById("project_name").innerHTML = project_name;
|
|
409
|
+
|
|
410
|
+
if(role !== 'agent'){
|
|
411
|
+
document.getElementById("testPageButton").style.display = 'block'
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// window.tileDeskAsyncInit = function() {
|
|
416
|
+
// window.tiledesk.on('onLoadParams', function(event_data) {
|
|
417
|
+
// // console.log('onLoadParams: ')
|
|
418
|
+
// window.tiledesk.open();
|
|
419
|
+
// });
|
|
420
|
+
|
|
421
|
+
// window.tiledesk.on('onInit', function(event_data) {
|
|
422
|
+
// setTimeout(() => {
|
|
423
|
+
// document.getElementById("preloader").style.display = "none";
|
|
424
|
+
// }, 1000);
|
|
425
|
+
|
|
426
|
+
// });
|
|
427
|
+
// };
|
|
428
|
+
|
|
429
|
+
function getQueryVariable(variable) {
|
|
430
|
+
var query = window.location.search.substring(1);
|
|
431
|
+
var vars = query.split("&");
|
|
432
|
+
for (var i=0;i<vars.length;i++) {
|
|
433
|
+
var pair = vars[i].split("=");
|
|
434
|
+
if(pair[0] == variable){return pair[1];}
|
|
435
|
+
}
|
|
436
|
+
return(false);
|
|
437
|
+
}
|
|
438
|
+
</script>
|
|
439
|
+
|
|
440
|
+
</head>
|
|
441
|
+
|
|
442
|
+
<body class="website white mockup" >
|
|
443
|
+
<div id="preloader">
|
|
444
|
+
<div class="logo"></div>
|
|
445
|
+
</div>
|
|
446
|
+
|
|
447
|
+
<div id="wrapper">
|
|
448
|
+
<header id="header">
|
|
449
|
+
<nav class="navbar navbar-inverse" role="navigation">
|
|
450
|
+
<div class="container">
|
|
451
|
+
<div class="navbar-header">
|
|
452
|
+
|
|
453
|
+
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
|
454
|
+
<span class="sr-only">Toggle navigation</span>
|
|
455
|
+
<span class="icon-bar"></span>
|
|
456
|
+
<span class="icon-bar"></span>
|
|
457
|
+
<span class="icon-bar"></span>
|
|
458
|
+
</button>
|
|
459
|
+
<a class="navbar-brand" href="https://console.tiledesk.com/"></a>
|
|
460
|
+
</div>
|
|
461
|
+
|
|
462
|
+
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
|
463
|
+
<ul class="nav navbar-nav">
|
|
464
|
+
<li><a href="https://developer.tiledesk.com/widget/web-sdk" target="_blank">WEB SDK & Docs<span></span></a></li>
|
|
465
|
+
<li><a href="https://www.tiledesk.com/pricing-cloud/" target="_blank">Pricing<span></span></a></li>
|
|
466
|
+
<li><a href="https://www.tiledesk.com/blog/" target="_blank">Blog<span></span></a></li>
|
|
467
|
+
</ul>
|
|
468
|
+
|
|
469
|
+
<ul class="nav navbar-nav navbar-right">
|
|
470
|
+
<li class="sign-up"><a onclick="goToConsole()" href="#">GO TO CONSOLE</a></li>
|
|
471
|
+
</ul>
|
|
472
|
+
|
|
473
|
+
<ul class="nav navbar-nav navbar-right" id="testPageButton" style="display: none;">
|
|
474
|
+
<li class="sign-up"><a onclick="goToTestPage()" href="#">GO TO TEST PAGE</a></li>
|
|
475
|
+
</ul>
|
|
476
|
+
</div>
|
|
477
|
+
</div>
|
|
478
|
+
</nav>
|
|
479
|
+
</header>
|
|
480
|
+
|
|
481
|
+
<div id="main" class="container">
|
|
482
|
+
<!-- <div class="row">
|
|
483
|
+
<div class="col-md-6">
|
|
484
|
+
<h1 id="project_name" style="min-height: 39px;"></h1>
|
|
485
|
+
<h2></h2>
|
|
486
|
+
<div class="b_integrations_agent_links">
|
|
487
|
+
<a href="" data-toggle="modal" data-target="#embedModal" id="enbed" style="display: none;"><em class="fa-code fa"></em>Embed</a>
|
|
488
|
+
<a href="" data-toggle="modal" data-target="#shareModal"><em class="fa-reply fa"></em>Share</a>
|
|
489
|
+
</div>
|
|
490
|
+
</div>
|
|
491
|
+
<div class="col-md-6">
|
|
492
|
+
</div>
|
|
493
|
+
</div> -->
|
|
494
|
+
<div class="mockup"></div>
|
|
495
|
+
|
|
496
|
+
<div class="modal fade" tabindex="-1" id="embedModal" role="dialog">
|
|
497
|
+
<div class="modal-dialog">
|
|
498
|
+
<div class="modal-content">
|
|
499
|
+
<div class="modal-header">
|
|
500
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
501
|
+
<h4 class="modal-title">Use following code to integrate the widget into your site:</h4>
|
|
502
|
+
</div>
|
|
503
|
+
<div class="modal-body" style="font-family: monospace;font-size: 12px;">
|
|
504
|
+
<span style="margin-bottom: 0px; border:none !important">
|
|
505
|
+
<script type="application/javascript"> <br>
|
|
506
|
+
window.tiledeskSettings = <br>
|
|
507
|
+
{ <br>
|
|
508
|
+
projectid: </span>
|
|
509
|
+
<span id="project_id"> </span>
|
|
510
|
+
<span style="border:none !important">
|
|
511
|
+
<br>
|
|
512
|
+
}; <br>
|
|
513
|
+
(function(d, s, id) { <br>
|
|
514
|
+
var w=window; var d=document; var i=function() { i.c(arguments); };<br>
|
|
515
|
+
i.q=[]; i.c=function(args){ i.q.push(args); }; w.Tiledesk=i;<br>
|
|
516
|
+
var js, fjs=d.getElementsByTagName(s)[0];<br>
|
|
517
|
+
if (d.getElementById(id)) return;<br>
|
|
518
|
+
js=d.createElement(s); js.id=id; js.async=true;<br>
|
|
519
|
+
js.src="<span id="base_url"> </span>";<br>
|
|
520
|
+
fjs.parentNode.insertBefore(js, fjs);<br>
|
|
521
|
+
}(document, 'script', 'tiledesk-jssdk'));<br>
|
|
522
|
+
</script>
|
|
523
|
+
</span>
|
|
524
|
+
|
|
525
|
+
</div>
|
|
526
|
+
</div>
|
|
527
|
+
</div>
|
|
528
|
+
</div>
|
|
529
|
+
|
|
530
|
+
<div class="modal fade" tabindex="-1" id="shareModal" role="dialog" style="display: none;">
|
|
531
|
+
<div class="modal-dialog">
|
|
532
|
+
<div class="modal-content">
|
|
533
|
+
<div class="modal-header">
|
|
534
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
535
|
+
<h4 class="modal-title">Share this page via social networks:</h4>
|
|
536
|
+
</div>
|
|
537
|
+
<div class="modal-body">
|
|
538
|
+
|
|
539
|
+
<a onclick="shareOnFacebook()" style="cursor: pointer;text-decoration: none;">
|
|
540
|
+
|
|
541
|
+
<img src="./tiledesk_widget_files/facebook.png" alt="Facebook">
|
|
542
|
+
</a>
|
|
543
|
+
|
|
544
|
+
<!-- Twitter -->
|
|
545
|
+
<a onclick="shareOnTwitter()" style="cursor: pointer;text-decoration: none;">
|
|
546
|
+
<img src="./tiledesk_widget_files/twitter.png" alt="Twitter">
|
|
547
|
+
</a>
|
|
548
|
+
|
|
549
|
+
<!-- LinkedIn -->
|
|
550
|
+
<a onclick="shareOnLinkedin()" style="cursor: pointer;text-decoration: none;">
|
|
551
|
+
<img src="./tiledesk_widget_files/linkedin.png" alt="LinkedIn">
|
|
552
|
+
</a>
|
|
553
|
+
|
|
554
|
+
<!-- telegram -->
|
|
555
|
+
<a onclick="shareOnTelegram()" style="cursor: pointer;text-decoration: none;">
|
|
556
|
+
<img src="./tiledesk_widget_files/telegram.png" alt="Telegram">
|
|
557
|
+
</a>
|
|
558
|
+
|
|
559
|
+
<!-- whatsapp -->
|
|
560
|
+
<!-- <a onclick="shareOnWhatsapp()" style="cursor: pointer">
|
|
561
|
+
<img src="./tiledesk_widget_files/whatsapp.png" alt="Whatsapp">
|
|
562
|
+
</a> -->
|
|
563
|
+
|
|
564
|
+
</div>
|
|
565
|
+
</div>
|
|
566
|
+
</div>
|
|
567
|
+
</div>
|
|
568
|
+
</div>
|
|
569
|
+
</div>
|
|
570
|
+
|
|
571
|
+
<footer id="footer">
|
|
572
|
+
<div class="b-agent-demo_powered_by">
|
|
573
|
+
<a href="https://console.tiledesk.com/" target="_blank" style="cursor: pointer;text-decoration: none;">
|
|
574
|
+
<span style="position: relative; top: 2px;">Powered by</span>
|
|
575
|
+
<img src="./tiledesk_widget_files/logo@2x-black.png">
|
|
576
|
+
</a>
|
|
577
|
+
</div>
|
|
578
|
+
</footer>
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
<!-- <script>
|
|
582
|
+
// non-blocking CSS delivery
|
|
583
|
+
var loadDeferredStyles = function() {
|
|
584
|
+
var addStylesNode = document.getElementById("deferred-styles");
|
|
585
|
+
console.log('addStylesNode ', addStylesNode)
|
|
586
|
+
var replacement = document.createElement("div");
|
|
587
|
+
replacement.innerHTML = addStylesNode.textContent;
|
|
588
|
+
document.body.appendChild(replacement);
|
|
589
|
+
addStylesNode.parentElement.removeChild(addStylesNode);
|
|
590
|
+
};
|
|
591
|
+
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame ||
|
|
592
|
+
window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
|
|
593
|
+
if (raf) {
|
|
594
|
+
raf(function() { window.setTimeout(loadDeferredStyles, 0); });
|
|
595
|
+
} else {
|
|
596
|
+
window.addEventListener('load', loadDeferredStyles);
|
|
597
|
+
}
|
|
598
|
+
</script> -->
|
|
599
|
+
|
|
600
|
+
<!-- Google Analytics -->
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
<div>
|
|
606
|
+
<link href="./tiledesk_widget_files/bootstrap.min.css" rel="stylesheet" type="text/css">
|
|
607
|
+
<!-- <link href="./tiledesk_widget_files/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
|
|
608
|
+
<link href="./tiledesk_widget_files/website-poly.min.css" rel="stylesheet" type="text/css">
|
|
609
|
+
<!-- <link href="./tiledesk_widget_files/css" rel="stylesheet" type="text/css"> -->
|
|
610
|
+
</div>
|
|
611
|
+
</body>
|
|
612
|
+
</html>
|