forked from KazuAlex/openpollslack
-
Notifications
You must be signed in to change notification settings - Fork 4
/
index_plus.html
350 lines (336 loc) · 11.6 KB
/
index_plus.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
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="slack-app-id" content="A0162QE8600" />
<link rel="icon" type="image/png" href="./assets/logo.png" />
<title>Open source poll for Slack</title>
<!-- STYLES -->
<link rel="stylesheet" type="text/css" href="./assets/css/index.css" />
<link rel="stylesheet" type="text/css" href="./assets/css/bootstrap.min.css" />
<link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet" />
<!-- SCRIPTS -->
<script type="text/javascript" src="./assets/js/bootstrap.bundle.min.js"></script>
</head>
<body>
<div class="navigation">
<div class="up" onclick="goUp()">
🡅
</div>
<div class="down" onclick="goDown()">
🡇
</div>
</div>
<div id="main">
<h1>
Open source poll for <img alt="slack" height="180" src="./assets/slack_logo_white.svg" />
</h1>
<div id="oauth-success">
<div class="alert alert-success" role="alert">
<strong>Success !</strong>
<span>The app has been added to your workspace.</span>
</div>
</div>
<div id="oauth-error">
<div class="alert alert-danger" role="alert">
<strong>Error !</strong>
<span>Cannot add the app to your workspace. Try again.</span>
</div>
</div>
<div id="buttons">
<a target="_blank" href="https://slack.com/oauth/v2/authorize?client_id=399001638530.4500979337046&scope=channels:read,chat:write,chat:write.public,commands,groups:read,mpim:read,users:read">
<img alt="Add to Slack" src="https://platform.slack-edge.com/img/add_to_slack@2x.png" srcset="https://platform.slack-edge.com/img/add_to_slack.png 2x, https://platform.slack-edge.com/img/add_to_slack@4x.png 4x" height="80" />
</a>
<!-- <a href="https://www.buymeacoffee.com/kazualex" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 77px !important;width: 278px !important;" ></a> -->
<span style="font-size: large;">For more information please visit <a style="color: #00a300; font-weight: bold; text-decoration: underline;" target="_blank" href="https://github.com/polppol/openpollslack-i18n">GitHub page</a></span>
<span >This app was forked from <a style="color: whitesmoke; text-decoration: underline;" target="_blank" href="https://github.com/KazuAlex/openpollslack">KazuAlex/openpollslack</a></span>
</div>
</div>
<div id="usage">
<div class="usage">
<h1>How to use it ?</h1>
</div>
<div id="simple-poll" class="light-grey">
<div>
<div class="title">
<h2>Simple poll</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="./assets/poll-simple.png" alt="Simple poll" />
</div>
</div>
</div>
</div>
</div>
<div id="anonymous-poll">
<div>
<div class="title">
<h2>Anonymous poll</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll anonymous "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="./assets/poll-anonymous.png" alt="Anonymous poll" />
</div>
</div>
</div>
</div>
</div>
<div id="limited-poll" class="light-grey">
<div>
<div class="title">
<h2>Limited choice poll</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll limit 2 "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="./assets/poll-limited.png" alt="Limited poll" />
</div>
</div>
</div>
</div>
</div>
<div id="hidden-poll">
<div>
<div class="title">
<h2>Hidden poll votes</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll hidden "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="./assets/poll-hidden.png" alt="Hidden poll votes" />
</div>
</div>
</div>
</div>
</div>
<div id="both-poll" class="light-grey">
<div>
<div class="title">
<h2>Anonymous limited choice poll</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll anonymous limit 2 "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="./assets/poll-both.png" alt="Anonymous limited poll" />
</div>
</div>
</div>
</div>
</div>
<div id="add-choice-poll">
<div>
<div class="title">
<h2>Allow choices add by others</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll add-choice "What's you favourite color ?" "Red" "Green" "Blue" "Yellow"</code>
</div>
<div class="image">
<img src="./assets/poll-add-choice-en.png?V2" lt="Anonymous limited poll" />
</div>
</div>
</div>
</div>
</div>
<div id="ui-auto-detect-ch" class="light-grey">
<div>
<div class="title">
<h2>Auto select channel, Multiple languages support</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll</code>
</div>
<div class="image">
<img src="./assets/poll-lang-select.png" alt="poll-lang-select" />
</div>
</div>
</div>
</div>
</div>
<div id="ui-auto-detect">
<div>
<div class="title">
<h2>Auto detect if bot is in channel</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>Shortcut > Create Poll</code>
</div>
<div class="image">
<img src="./assets/poll-ch-check-feedback.png" alt="poll-ch-check-feedback" />
</div>
</div>
</div>
</div>
</div>
<div id="ui-poll" class="light-grey">
<div>
<div class="title">
<h2>UI Configable - Desktop View</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll config</code>
</div>
<div class="image">
<img src="./assets/UI-compare.png" alt="UI-compare" />
</div>
</div>
</div>
</div>
</div>
<div id="ui-poll2" class="">
<div>
<div class="title">
<h2>UI Configable - Mobile View</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll config</code>
</div>
<div class="image">
<img src="./assets/UI-compare-mobile.png" alt="UI-compare-mobile" />
</div>
</div>
</div>
</div>
</div>
<div id="ui-poll3" class="light-grey">
<div>
<div class="title">
<h2>UI Configable - Menu location</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll config</code>
</div>
<div class="image">
<img src="./assets/UI-menu-location.png" alt="UI-menu-location" />
</div>
</div>
</div>
</div>
</div>
<div id="ui-poll4" >
<div>
<div class="title">
<h2>UI Configable - Emoji</h2>
</div>
<div class="card">
<div class="card-body">
<div class="command">
<code>/poll config</code>
</div>
<div class="image">
<img src="./assets/UI-emoji.png" alt="UI-emoji" />
</div>
</div>
</div>
</div>
</div>
<div id="help" class="light-grey">
<div>
<div class="title">
<h2>Need help ?</h2>
</div>
<div class="card">
<div class="card-body">
Please use <a target="_blank" href="https://github.com/polppol/openpollslack-i18n/issues">Github issues</a> if you have any question or issue with the app.
</div>
</div>
</div>
</div>
</div>
<div id="bottom">
<div class="row">
<div class="cell col-12 col-sm-4">
<a href="https://github.com/polppol/openpollslack-i18n">GitHub | Source code</a>
</div>
<div class="cell col-12 col-sm-4">
<a href="./privacy/">Privacy Policy</a>
</div>
<div class="cell col-12 col-sm-4">
<div>
Contact
</div>
<div>
<a target="_blank" href="https://github.com/polppol/openpollslack-i18n/issues">Github issues</a>
</div>
</div>
</div>
</div>
<script type="text/javascript">
const urlParams = new URLSearchParams(window.location.search);
const oauth = urlParams.get('oauth');
if ('error' === oauth) {
const oauthDiv = document.getElementById('oauth-error');
oauthDiv.className = 'show';
} else if ('success' === oauth) {
const oauthDiv = document.getElementById('oauth-success');
oauthDiv.className = 'show';
}
function goUp() {
const screenHeight = window.innerHeight;
let currentY = window.scrollY - (window.scrollY % screenHeight);
let nextY = currentY;
if (0 === (window.scrollY % screenHeight)) {
nextY = currentY - screenHeight;
}
window.scrollTo(window.scrollX, nextY);
}
function goDown() {
const screenHeight = window.innerHeight;
let currentY = window.scrollY - (window.scrollY % screenHeight);
let nextY = currentY + screenHeight;
window.scrollTo(window.scrollX, nextY);
}
const ARROW_LEFT = 37;
const ARROW_UP = 38;
const ARROW_RIGHT = 39;
const ARROW_DOWN = 40;
document.addEventListener('keyup', function(event) {
if (
ARROW_UP === event.which
|| ARROW_LEFT === event.which
) {
event.preventDefault();
event.stopPropagation();
goUp();
} else if (
ARROW_DOWN === event.which
|| ARROW_RIGHT === event.which
) {
event.preventDefault();
event.stopPropagation();
goDown();
}
});
</script>
</body>
</html>