-
Notifications
You must be signed in to change notification settings - Fork 1
/
text.html
87 lines (80 loc) · 3.04 KB
/
text.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
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>BotUI - Hello World</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/botui/build/botui.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/botui/build/botui-theme-default.css" />
</head>
<body>
<!-- <div class="botui-app-container" id="hello-world">
<bot-ui></bot-ui>
</div> -->
<div class="botui botui-container">
<div class="botui-messages-container">
<div class="botui-message"> <!-- This element will also have any classes applied via 'cssClass' to 'message' -->
<div :class="[{human: msg.human, 'botui-message-content': true}, msg.type]"> <!-- -->
<span></span> <!-- If type is text, this will hold that text -->
<iframe></iframe> <!-- If type is embed -->
</div>
</div>
</div>
<div class="botui-actions-container">
<div>
<form class="botui-actions-text" :class="action.cssClass"> <!-- -->
<input class="botui-actions-text-input" :class="action.text.cssClass" required/> <!-- -->
<button class="botui-actions-text-submit">Go</button> <!-- only present on mobile devices -->
</form>
<div class="botui-actions-buttons" :class="action.cssClass"> <!-- -->
<button :class="button.cssClass" class="botui-actions-buttons-button"> <!-- -->
<i class="botui-icon botui-action-button-icon fa" :class="'fa-' + button.icon"></i> <!-- -->
<!-- button text -->
</button>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/vue/latest/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/botui/build/botui.js"></script>
<!-- <script>
var botui = new BotUI('hello-world');
botui.message.add({
content: 'Hello World from bot!'
}).then(function () {
botui.message.add({
delay: 1000,
human: true,
}).then(function () {
botui.action.text({