-
Notifications
You must be signed in to change notification settings - Fork 113
/
config.ts
261 lines (250 loc) · 7.63 KB
/
config.ts
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
import { defineConfig } from '@tok/generation';
export default defineConfig({
// If you want to add language/currency localization – see ./examples/meditation as reference
pages: [
{
slides: [
// intro
{
media: {
type: 'sticker',
src: import('./assets/stickers/duck_hello.tgs'),
size: 250,
},
shape: 'square',
pagination: 'count',
title: 'Welcome to Telegram Onboarding Kit',
description:
"Create stunning onboarding and paywall for your Telegram Bot using the full power of Mini Apps<br><br>It's <b>simple</b>, <b>fast</b>, highly <b>customizable</b> and <a href='https://github.com/Easterok/telegram-onboarding-kit' target='_blank'>open-source</a>!",
button: 'Next',
},
// image
{
media: {
type: 'image',
src: import('./assets/img/durov.webp'),
},
shape: 'rounded',
pagination: 'count',
title: 'Onboarding supports many types of content',
description:
"Here you can see <b>Image</b>. But it's just the beginning...",
button: 'Next',
},
// sticker
{
media: {
type: 'sticker',
src: import('./assets/stickers/duck_love.tgs'),
size: 250,
},
shape: 'square',
pagination: 'count',
title: 'Telegram stickers',
description:
'Just download any <b>.tgs</b> sticker from Telegram and use it in your onboardings',
button: 'Next',
},
// form
{
extends: 'form', // note, it's important to extend from 'form' here
media: {
type: 'sticker',
src: import('./assets/stickers/duck_spy.tgs'),
size: 150,
},
shape: 'square',
pagination: 'count',
title: 'Forms',
description: 'User fills in the form – the bot receives the data',
form: [
{
id: 'text_from_form',
placeholder: 'Text input',
type: 'text',
},
{
id: 'number_from_form',
placeholder: 'Number input',
type: 'number',
},
{
id: 'checkbox_from_form',
placeholder: 'Checkbox',
type: 'checkbox',
},
],
button: 'Next',
},
// video
{
media: {
type: 'video',
src: import('./assets/videos/spongebob.mp4'),
poster: import('./assets/img/spongebob_poster.webp'),
style: 'aspect-ratio: 400/287', // here we manually set video aspect-ratio (default is 16:9)
},
shape: 'rounded',
pagination: 'count',
title: 'Videos',
description:
"Typically, video starts <b>automatically</b><br><br>However, on iOS, it will only autoplay upon any prior tap on the page ('Next' button doesn't count). If video doesn't autoplay, user will see preview and pretty animation, inviting them to tap to play the video",
button: 'Next',
},
// list
{
media: {
type: 'sticker',
src: import('./assets/stickers/duck_juggling.tgs'),
size: 150,
},
shape: 'square',
pagination: 'count',
title: 'Lists',
description:
'Lists can be used to showcase <b>features</b> of your product. Items support customizable icons',
list: [
{
media: {
type: 'icon',
src: import('./assets/icons/guide.svg'),
size: 30,
},
text: 'Some cool feature',
},
{
media: {
type: 'icon',
src: import('./assets/icons/track.svg'),
size: 30,
},
text: 'Some very cool feature',
},
{
media: {
type: 'icon',
src: import('./assets/icons/time.svg'),
size: 30,
},
text: 'Some extremely cool feature',
},
],
button: 'Next',
},
// "everything is customizable" slide
{
media: {
type: 'sticker',
src: import('./assets/stickers/duck_xray.tgs'),
size: 250,
},
shape: 'square',
pagination: 'count',
title: 'Everything is customizable',
description: '',
textAlign: 'center',
list: [
'<b>CSS styles</b>: extend primary colors from Telegram or set yours',
'Button text and actions (look down)',
'Use our carefully crafted <b>presets</b> or easily create your own',
],
button: 'Super-Duper Next',
},
// slide with other features
{
media: {
type: 'sticker',
src: import('./assets/stickers/duck_cool.tgs'),
size: 150,
},
shape: 'square',
pagination: 'count',
title: 'Some other features:',
description: '',
list: [
'One-click 0$ <b>deploy</b> on GitHub Pages',
'Language and currency localization',
'Buttons with <b>haptic</b> feedback',
'Content pre-loading for high speed',
'<b>Low-code</b> approach to building onboardings',
'Many examples/presets',
"And many more... (see <a href='https://github.com/Easterok/telegram-onboarding-kit' target='_blank'>GitHub</a>)",
],
button: 'Next',
},
// go to paywall slide
{
media: {
type: 'sticker',
src: import('./assets/stickers/duck_knife.tgs'),
size: 250,
},
shape: 'square',
pagination: 'count',
textAlign: 'center',
title: 'But onboarding slides are not enough...',
description: "Let's go to Paywall",
button: {
content: 'Go to Paywall',
to: '/paywall',
},
},
],
},
// paywall
{
extends: 'paywall',
path: '/paywall',
media: {
type: 'sticker',
src: import('./assets/stickers/duck_money.tgs'),
size: 150,
},
shape: 'square',
title: 'Your beautiful Paywall',
list: [
'Adjustable product cards',
'<b>👛 Wallet Pay</b> and <b>Telegram Payments</b> ready. Add custom methods easily',
'Subscriptions or One-time payments',
],
products: [
{
id: '1_month_subscription',
title: '1 month subscription',
description: '2$/month',
discount: '',
price: 2,
},
{
id: '1_year_subscription',
title: '1 year subscription',
description: '1$/month',
discount: 'Discount 50%',
price: 12,
},
{
id: 'lifetime_access',
title: 'Lifetime access',
description: '20$ once',
discount: 'Best offer',
price: 20,
},
],
mainButtonText: 'Buy for {price}',
popup: {
// popup for payment methods choice
type: 'web',
},
links: [
{
text: 'Privacy policy',
href: 'https://google.com',
},
{
text: 'Terms of use',
href: 'https://google.com',
},
],
},
],
});