@steedos/webapp 2.2.33 → 3.0.0-beta.6
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/LICENSE.txt +661 -0
- package/README.md +15 -17
- package/dist/README.md +4 -0
- package/dist/assets/icons/License-for-icons.txt +267 -0
- package/dist/assets/icons/README-dist.md +18 -0
- package/dist/assets/icons/action-sprite/svg/symbols.svg +1 -0
- package/dist/assets/icons/custom-sprite/svg/symbols.svg +1 -0
- package/dist/assets/icons/doctype-sprite/svg/symbols.svg +1 -0
- package/dist/assets/icons/standard-sprite/svg/symbols.svg +1 -0
- package/dist/assets/icons/utility-sprite/svg/symbols-rtl.svg +1 -0
- package/dist/assets/icons/utility-sprite/svg/symbols.svg +1 -0
- package/dist/assets/index-D4PMTHQ6.js +60674 -0
- package/dist/browsers.html +76 -0
- package/dist/css/main.css +15 -0
- package/dist/customize.css +104 -0
- package/dist/favicon.ico +0 -0
- package/dist/fonts/FontAwesome.otf +0 -0
- package/dist/fonts/Material-Design-Iconic-Font/Material-Design-Iconic-Font.eot +0 -0
- package/dist/fonts/Material-Design-Iconic-Font/Material-Design-Iconic-Font.svg +787 -0
- package/dist/fonts/Material-Design-Iconic-Font/Material-Design-Iconic-Font.ttf +0 -0
- package/dist/fonts/Material-Design-Iconic-Font/Material-Design-Iconic-Font.woff +0 -0
- package/dist/fonts/Material-Design-Iconic-Font/Material-Design-Iconic-Font.woff2 +0 -0
- package/dist/fonts/fontawesome-webfont.eot +0 -0
- package/dist/fonts/fontawesome-webfont.svg +2671 -0
- package/dist/fonts/fontawesome-webfont.ttf +0 -0
- package/dist/fonts/fontawesome-webfont.woff +0 -0
- package/dist/fonts/fontawesome-webfont.woff2 +0 -0
- package/dist/geetest/gt3.js +353 -0
- package/dist/images/background.svg +1 -0
- package/dist/images/bg.jpg +0 -0
- package/dist/images/default-avatar.png +0 -0
- package/dist/images/defaultBackground.svg +1 -0
- package/dist/images/logo.png +0 -0
- package/dist/images/logo_platform.en-us.png +0 -0
- package/dist/images/logo_platform.png +0 -0
- package/dist/images/logo_platform_white.png +0 -0
- package/dist/images/unsupported.png +0 -0
- package/dist/index.html +68 -0
- package/dist/js/infinitescroll.js +115 -0
- package/dist/js/jquery.fitvids.js +89 -0
- package/dist/js/nw_core.js +163 -0
- package/dist/js/selectize/selectize.bootstrap2.css +494 -0
- package/dist/js/selectize/selectize.bootstrap3.css +408 -0
- package/dist/js/selectize/selectize.css +324 -0
- package/dist/js/selectize/selectize.default.css +394 -0
- package/dist/js/selectize/selectize.js +3829 -0
- package/dist/js/workflow_client.css +55 -0
- package/dist/js/workflow_client.js +174 -0
- package/dist/lib/jquery/jquery-1.11.2.min.js +4 -0
- package/dist/lib/select2/select2-spinner.gif +0 -0
- package/dist/lib/select2/select2.png +0 -0
- package/dist/lib/select2/select2x2.png +0 -0
- package/dist/lib/swipebox/img/icons.png +0 -0
- package/dist/lib/swipebox/img/icons.svg +1 -0
- package/dist/lib/swipebox/img/loader.gif +0 -0
- package/dist/locales/en/translation.json +3 -0
- package/dist/locales/zh-CN/translation.json +3 -0
- package/dist/manifest.json +15 -0
- package/dist/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css +9 -0
- package/dist/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js +1 -0
- package/dist/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js +16 -0
- package/dist/plugins/toastr/toastr.min.css +1 -0
- package/dist/plugins/toastr/toastr.min.js +2 -0
- package/dist/sound/notification.mp3 +0 -0
- package/dist/steedos-init.js +165 -0
- package/dist/ui.icons.json +5064 -0
- package/dist/word/demo.doc +0 -0
- package/dist/workflow.html +36 -0
- package/package.json +32 -49
- package/.env +0 -3
- package/.eslintignore +0 -1
- package/.md +0 -8
- package/LICENSE +0 -21
- package/tsconfig.json +0 -28
- package/tsconfig.lib.json +0 -34
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
"v0.4.9 Geetest Inc.";
|
|
2
|
+
|
|
3
|
+
(function (window) {
|
|
4
|
+
"use strict";
|
|
5
|
+
if (typeof window === 'undefined') {
|
|
6
|
+
throw new Error('Geetest requires browser environment');
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
var document = window.document;
|
|
10
|
+
var Math = window.Math;
|
|
11
|
+
var head = document.getElementsByTagName("head")[0];
|
|
12
|
+
|
|
13
|
+
function _Object(obj) {
|
|
14
|
+
this._obj = obj;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
_Object.prototype = {
|
|
18
|
+
_each: function (process) {
|
|
19
|
+
var _obj = this._obj;
|
|
20
|
+
for (var k in _obj) {
|
|
21
|
+
if (_obj.hasOwnProperty(k)) {
|
|
22
|
+
process(k, _obj[k]);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return this;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
function Config(config) {
|
|
30
|
+
var self = this;
|
|
31
|
+
new _Object(config)._each(function (key, value) {
|
|
32
|
+
self[key] = value;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Config.prototype = {
|
|
37
|
+
api_server: 'api.geetest.com',
|
|
38
|
+
protocol: 'http://',
|
|
39
|
+
typePath: '/gettype.php',
|
|
40
|
+
fallback_config: {
|
|
41
|
+
slide: {
|
|
42
|
+
static_servers: ["static.geetest.com", "dn-staticdown.qbox.me"],
|
|
43
|
+
type: 'slide',
|
|
44
|
+
slide: '/static/js/geetest.0.0.0.js'
|
|
45
|
+
},
|
|
46
|
+
fullpage: {
|
|
47
|
+
static_servers: ["static.geetest.com", "dn-staticdown.qbox.me"],
|
|
48
|
+
type: 'fullpage',
|
|
49
|
+
fullpage: '/static/js/fullpage.0.0.0.js'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
_get_fallback_config: function () {
|
|
53
|
+
var self = this;
|
|
54
|
+
if (isString(self.type)) {
|
|
55
|
+
return self.fallback_config[self.type];
|
|
56
|
+
} else if (self.new_captcha) {
|
|
57
|
+
return self.fallback_config.fullpage;
|
|
58
|
+
} else {
|
|
59
|
+
return self.fallback_config.slide;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
_extend: function (obj) {
|
|
63
|
+
var self = this;
|
|
64
|
+
new _Object(obj)._each(function (key, value) {
|
|
65
|
+
self[key] = value;
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
var isNumber = function (value) {
|
|
70
|
+
return (typeof value === 'number');
|
|
71
|
+
};
|
|
72
|
+
var isString = function (value) {
|
|
73
|
+
return (typeof value === 'string');
|
|
74
|
+
};
|
|
75
|
+
var isBoolean = function (value) {
|
|
76
|
+
return (typeof value === 'boolean');
|
|
77
|
+
};
|
|
78
|
+
var isObject = function (value) {
|
|
79
|
+
return (typeof value === 'object' && value !== null);
|
|
80
|
+
};
|
|
81
|
+
var isFunction = function (value) {
|
|
82
|
+
return (typeof value === 'function');
|
|
83
|
+
};
|
|
84
|
+
var MOBILE = /Mobi/i.test(navigator.userAgent);
|
|
85
|
+
var pt = MOBILE ? 3 : 0;
|
|
86
|
+
|
|
87
|
+
var callbacks = {};
|
|
88
|
+
var status = {};
|
|
89
|
+
|
|
90
|
+
var nowDate = function () {
|
|
91
|
+
var date = new Date();
|
|
92
|
+
var year = date.getFullYear();
|
|
93
|
+
var month = date.getMonth() + 1;
|
|
94
|
+
var day = date.getDate();
|
|
95
|
+
var hours = date.getHours();
|
|
96
|
+
var minutes = date.getMinutes();
|
|
97
|
+
var seconds = date.getSeconds();
|
|
98
|
+
|
|
99
|
+
if (month >= 1 && month <= 9) {
|
|
100
|
+
month = '0' + month;
|
|
101
|
+
}
|
|
102
|
+
if (day >= 0 && day <= 9) {
|
|
103
|
+
day = '0' + day;
|
|
104
|
+
}
|
|
105
|
+
if (hours >= 0 && hours <= 9) {
|
|
106
|
+
hours = '0' + hours;
|
|
107
|
+
}
|
|
108
|
+
if (minutes >= 0 && minutes <= 9) {
|
|
109
|
+
minutes = '0' + minutes;
|
|
110
|
+
}
|
|
111
|
+
if (seconds >= 0 && seconds <= 9) {
|
|
112
|
+
seconds = '0' + seconds;
|
|
113
|
+
}
|
|
114
|
+
var currentdate = year + '-' + month + '-' + day + " " + hours + ":" + minutes + ":" + seconds;
|
|
115
|
+
return currentdate;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
var random = function () {
|
|
119
|
+
return parseInt(Math.random() * 10000) + (new Date()).valueOf();
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
var loadScript = function (url, cb) {
|
|
123
|
+
var script = document.createElement("script");
|
|
124
|
+
script.charset = "UTF-8";
|
|
125
|
+
script.async = true;
|
|
126
|
+
|
|
127
|
+
// 瀵筭eetest鐨勯潤鎬佽祫婧愭坊鍔� crossOrigin
|
|
128
|
+
if ( /static\.geetest\.com/g.test(url)) {
|
|
129
|
+
script.crossOrigin = "anonymous";
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
script.onerror = function () {
|
|
133
|
+
cb(true);
|
|
134
|
+
};
|
|
135
|
+
var loaded = false;
|
|
136
|
+
script.onload = script.onreadystatechange = function () {
|
|
137
|
+
if (!loaded &&
|
|
138
|
+
(!script.readyState ||
|
|
139
|
+
"loaded" === script.readyState ||
|
|
140
|
+
"complete" === script.readyState)) {
|
|
141
|
+
|
|
142
|
+
loaded = true;
|
|
143
|
+
setTimeout(function () {
|
|
144
|
+
cb(false);
|
|
145
|
+
}, 0);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
script.src = url;
|
|
149
|
+
head.appendChild(script);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
var normalizeDomain = function (domain) {
|
|
153
|
+
// special domain: uems.sysu.edu.cn/jwxt/geetest/
|
|
154
|
+
// return domain.replace(/^https?:\/\/|\/.*$/g, ''); uems.sysu.edu.cn
|
|
155
|
+
return domain.replace(/^https?:\/\/|\/$/g, ''); // uems.sysu.edu.cn/jwxt/geetest
|
|
156
|
+
};
|
|
157
|
+
var normalizePath = function (path) {
|
|
158
|
+
path = path.replace(/\/+/g, '/');
|
|
159
|
+
if (path.indexOf('/') !== 0) {
|
|
160
|
+
path = '/' + path;
|
|
161
|
+
}
|
|
162
|
+
return path;
|
|
163
|
+
};
|
|
164
|
+
var normalizeQuery = function (query) {
|
|
165
|
+
if (!query) {
|
|
166
|
+
return '';
|
|
167
|
+
}
|
|
168
|
+
var q = '?';
|
|
169
|
+
new _Object(query)._each(function (key, value) {
|
|
170
|
+
if (isString(value) || isNumber(value) || isBoolean(value)) {
|
|
171
|
+
q = q + encodeURIComponent(key) + '=' + encodeURIComponent(value) + '&';
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
if (q === '?') {
|
|
175
|
+
q = '';
|
|
176
|
+
}
|
|
177
|
+
return q.replace(/&$/, '');
|
|
178
|
+
};
|
|
179
|
+
var makeURL = function (protocol, domain, path, query) {
|
|
180
|
+
domain = normalizeDomain(domain);
|
|
181
|
+
|
|
182
|
+
var url = normalizePath(path) + normalizeQuery(query);
|
|
183
|
+
if (domain) {
|
|
184
|
+
url = protocol + domain + url;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return url;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
var load = function (config, send, protocol, domains, path, query, cb) {
|
|
191
|
+
var tryRequest = function (at) {
|
|
192
|
+
|
|
193
|
+
var url = makeURL(protocol, domains[at], path, query);
|
|
194
|
+
loadScript(url, function (err) {
|
|
195
|
+
if (err) {
|
|
196
|
+
if (at >= domains.length - 1) {
|
|
197
|
+
cb(true);
|
|
198
|
+
// report gettype error
|
|
199
|
+
if (send) {
|
|
200
|
+
config.error_code = 508;
|
|
201
|
+
var url = protocol + domains[at] + path;
|
|
202
|
+
reportError(config, url);
|
|
203
|
+
}
|
|
204
|
+
} else {
|
|
205
|
+
tryRequest(at + 1);
|
|
206
|
+
}
|
|
207
|
+
} else {
|
|
208
|
+
cb(false);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
tryRequest(0);
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
var jsonp = function (domains, path, config, callback) {
|
|
217
|
+
if (isObject(config.getLib)) {
|
|
218
|
+
config._extend(config.getLib);
|
|
219
|
+
callback(config);
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (config.offline) {
|
|
223
|
+
callback(config._get_fallback_config());
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
var cb = "geetest_" + random();
|
|
228
|
+
window[cb] = function (data) {
|
|
229
|
+
if (data.status == 'success') {
|
|
230
|
+
callback(data.data);
|
|
231
|
+
} else if (!data.status) {
|
|
232
|
+
callback(data);
|
|
233
|
+
} else {
|
|
234
|
+
callback(config._get_fallback_config());
|
|
235
|
+
}
|
|
236
|
+
window[cb] = undefined;
|
|
237
|
+
try {
|
|
238
|
+
delete window[cb];
|
|
239
|
+
} catch (e) {
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
load(config, true, config.protocol, domains, path, {
|
|
243
|
+
gt: config.gt,
|
|
244
|
+
callback: cb
|
|
245
|
+
}, function (err) {
|
|
246
|
+
if (err) {
|
|
247
|
+
callback(config._get_fallback_config());
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
var reportError = function (config, url) {
|
|
253
|
+
load(config, false, config.protocol, ['monitor.geetest.com'], '/monitor/send', {
|
|
254
|
+
time: nowDate(),
|
|
255
|
+
captcha_id: config.gt,
|
|
256
|
+
challenge: config.challenge,
|
|
257
|
+
pt: pt,
|
|
258
|
+
exception_url: url,
|
|
259
|
+
error_code: config.error_code
|
|
260
|
+
}, function (err) {})
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
var throwError = function (errorType, config) {
|
|
264
|
+
var errors = {
|
|
265
|
+
networkError: '缃戠粶閿欒',
|
|
266
|
+
gtTypeError: 'gt瀛楁涓嶆槸瀛楃涓茬被鍨�'
|
|
267
|
+
};
|
|
268
|
+
if (typeof config.onError === 'function') {
|
|
269
|
+
config.onError(errors[errorType]);
|
|
270
|
+
} else {
|
|
271
|
+
throw new Error(errors[errorType]);
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
var detect = function () {
|
|
276
|
+
return window.Geetest || document.getElementById("gt_lib");
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
if (detect()) {
|
|
280
|
+
status.slide = "loaded";
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
window.initGeetest = function (userConfig, callback) {
|
|
284
|
+
|
|
285
|
+
var config = new Config(userConfig);
|
|
286
|
+
|
|
287
|
+
if (userConfig.https) {
|
|
288
|
+
config.protocol = 'https://';
|
|
289
|
+
} else if (!userConfig.protocol) {
|
|
290
|
+
config.protocol = window.location.protocol + '//';
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// for KFC
|
|
294
|
+
if (userConfig.gt === '050cffef4ae57b5d5e529fea9540b0d1' ||
|
|
295
|
+
userConfig.gt === '3bd38408ae4af923ed36e13819b14d42') {
|
|
296
|
+
config.apiserver = 'yumchina.geetest.com/'; // for old js
|
|
297
|
+
config.api_server = 'yumchina.geetest.com';
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
if(userConfig.gt){
|
|
301
|
+
window.GeeGT = userConfig.gt
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
if(userConfig.challenge){
|
|
305
|
+
window.GeeChallenge = userConfig.challenge
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
if (isObject(userConfig.getType)) {
|
|
309
|
+
config._extend(userConfig.getType);
|
|
310
|
+
}
|
|
311
|
+
jsonp((config.api_server_v3 || [config.api_server || config.apiserver]), config.typePath, config, function (newConfig) {
|
|
312
|
+
var type = newConfig.type;
|
|
313
|
+
var init = function () {
|
|
314
|
+
config._extend(newConfig);
|
|
315
|
+
callback(new window.Geetest(config));
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
callbacks[type] = callbacks[type] || [];
|
|
319
|
+
var s = status[type] || 'init';
|
|
320
|
+
if (s === 'init') {
|
|
321
|
+
status[type] = 'loading';
|
|
322
|
+
|
|
323
|
+
callbacks[type].push(init);
|
|
324
|
+
|
|
325
|
+
load(config, true, config.protocol, newConfig.static_servers || newConfig.domains, newConfig[type] || newConfig.path, null, function (err) {
|
|
326
|
+
if (err) {
|
|
327
|
+
status[type] = 'fail';
|
|
328
|
+
throwError('networkError', config);
|
|
329
|
+
} else {
|
|
330
|
+
status[type] = 'loaded';
|
|
331
|
+
var cbs = callbacks[type];
|
|
332
|
+
for (var i = 0, len = cbs.length; i < len; i = i + 1) {
|
|
333
|
+
var cb = cbs[i];
|
|
334
|
+
if (isFunction(cb)) {
|
|
335
|
+
cb();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
callbacks[type] = [];
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
} else if (s === "loaded") {
|
|
342
|
+
init();
|
|
343
|
+
} else if (s === "fail") {
|
|
344
|
+
throwError('networkError', config);
|
|
345
|
+
} else if (s === "loading") {
|
|
346
|
+
callbacks[type].push(init);
|
|
347
|
+
}
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
})(window);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" fill="none"><g opacity=".2" clip-path="url(#E)"><path d="M1466.4 1795.2c950.37 0 1720.8-627.52 1720.8-1401.6S2416.77-1008 1466.4-1008-254.4-380.482-254.4 393.6s770.428 1401.6 1720.8 1401.6z" fill="url(#A)"/><path d="M394.2 1815.6c746.58 0 1351.8-493.2 1351.8-1101.6S1140.78-387.6 394.2-387.6-957.6 105.603-957.6 714-352.38 1815.6 394.2 1815.6z" fill="url(#B)"/><path d="M1548.6 1885.2c631.92 0 1144.2-417.45 1144.2-932.4S2180.52 20.4 1548.6 20.4 404.4 437.85 404.4 952.8s512.276 932.4 1144.2 932.4z" fill="url(#C)"/><path d="M265.8 1215.6c690.246 0 1249.8-455.595 1249.8-1017.6S956.046-819.6 265.8-819.6-984-364.005-984 198-424.445 1215.6 265.8 1215.6z" fill="url(#D)"/></g><defs><radialGradient id="A" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(1466.4 393.6) rotate(90) scale(1401.6 1720.8)"><stop stop-color="#107c10"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="B" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(394.2 714) rotate(90) scale(1101.6 1351.8)"><stop stop-color="#0078d4"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="C" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(1548.6 952.8) rotate(90) scale(932.4 1144.2)"><stop stop-color="#ffb900" stop-opacity=".75"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="D" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(265.8 198) rotate(90) scale(1017.6 1249.8)"><stop stop-color="#d83b01" stop-opacity=".75"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><clipPath id="E"><path fill="#fff" d="M0 0h1920v1080H0z"/></clipPath></defs></svg>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080" fill="none"><g opacity=".2" clip-path="url(#E)"><path d="M1466.4 1795.2c950.37 0 1720.8-627.52 1720.8-1401.6S2416.77-1008 1466.4-1008-254.4-380.482-254.4 393.6s770.428 1401.6 1720.8 1401.6z" fill="url(#A)"/><path d="M394.2 1815.6c746.58 0 1351.8-493.2 1351.8-1101.6S1140.78-387.6 394.2-387.6-957.6 105.603-957.6 714-352.38 1815.6 394.2 1815.6z" fill="url(#B)"/><path d="M1548.6 1885.2c631.92 0 1144.2-417.45 1144.2-932.4S2180.52 20.4 1548.6 20.4 404.4 437.85 404.4 952.8s512.276 932.4 1144.2 932.4z" fill="url(#C)"/><path d="M265.8 1215.6c690.246 0 1249.8-455.595 1249.8-1017.6S956.046-819.6 265.8-819.6-984-364.005-984 198-424.445 1215.6 265.8 1215.6z" fill="url(#D)"/></g><defs><radialGradient id="A" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(1466.4 393.6) rotate(90) scale(1401.6 1720.8)"><stop stop-color="#107c10"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="B" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(394.2 714) rotate(90) scale(1101.6 1351.8)"><stop stop-color="#0078d4"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="C" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(1548.6 952.8) rotate(90) scale(932.4 1144.2)"><stop stop-color="#ffb900" stop-opacity=".75"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><radialGradient id="D" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(265.8 198) rotate(90) scale(1017.6 1249.8)"><stop stop-color="#d83b01" stop-opacity=".75"/><stop offset="1" stop-color="#c4c4c4" stop-opacity="0"/></radialGradient><clipPath id="E"><path fill="#fff" d="M0 0h1920v1080H0z"/></clipPath></defs></svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Steedos</title>
|
|
8
|
+
|
|
9
|
+
<script src="https://unpkg.steedos.cn/@steedos-widgets/amis@6.3.0-patch.3/sdk/sdk.js"></script>
|
|
10
|
+
|
|
11
|
+
<link rel="stylesheet" href="https://unpkg.steedos.cn/@fortawesome/fontawesome-free@6.2.0/css/all.min.css" />
|
|
12
|
+
<link rel="stylesheet" href="https://unpkg.steedos.cn/@salesforce-ux/design-system@2.22.2/assets/styles/salesforce-lightning-design-system.min.css">
|
|
13
|
+
|
|
14
|
+
<link rel="stylesheet" href="https://unpkg.steedos.cn/@steedos-widgets/amis@6.3.0-patch.3/lib/themes/antd.css">
|
|
15
|
+
<link rel="stylesheet" href="https://unpkg.steedos.cn/@steedos-widgets/amis@6.3.0-patch.3/lib/helper.css">
|
|
16
|
+
<link rel="stylesheet" href="https://unpkg.steedos.cn/@steedos-widgets/amis@6.3.0-patch.3/sdk/iconfont.css">
|
|
17
|
+
|
|
18
|
+
<script src="https://unpkg.steedos.cn/lodash@4.17.21/lodash.js"></script>
|
|
19
|
+
<script src="https://unpkg.steedos.cn/jquery@3.7.1/dist/jquery.min.js"></script>
|
|
20
|
+
<script src="https://unpkg.steedos.cn/crypto-js@4.1.1/crypto-js.js"></script>
|
|
21
|
+
<script async="">
|
|
22
|
+
window['React'] = amisRequire('react');
|
|
23
|
+
window['ReactDOM'] = amisRequire('react-dom');
|
|
24
|
+
window['moment'] = amisRequire('moment');
|
|
25
|
+
window['Amis'] = amisRequire('amis');
|
|
26
|
+
window['AmisCore'] = amisRequire('amis-core');
|
|
27
|
+
window['AmisUI'] = amisRequire('amis-ui');
|
|
28
|
+
|
|
29
|
+
window['Amis'].registerFilter('t', function (key,param) {
|
|
30
|
+
return typeof key === 'string' ? window.t(key,param) : key;
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
// 监听窗口的 load 事件,确保所有脚本都加载完成
|
|
34
|
+
window.addEventListener('load', function() {
|
|
35
|
+
window.lodash = window._; // 将 window.lodash 设置为 window._
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
const loadJs = (url, callback)=>{
|
|
39
|
+
let scriptTag = document.createElement("script");
|
|
40
|
+
scriptTag.type = "text/javascript";
|
|
41
|
+
scriptTag.src = url;
|
|
42
|
+
scriptTag.async = false;
|
|
43
|
+
document.getElementsByTagName("head")[0].appendChild(scriptTag);
|
|
44
|
+
scriptTag.onload = function(script){
|
|
45
|
+
if(callback){
|
|
46
|
+
callback(script)
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const loadCss = (url)=>{
|
|
52
|
+
let styleTag = document.createElement("link");
|
|
53
|
+
styleTag.setAttribute("rel", "stylesheet");
|
|
54
|
+
styleTag.setAttribute("type", "text/css");
|
|
55
|
+
styleTag.setAttribute("href", url);
|
|
56
|
+
document.getElementsByTagName("head")[0].appendChild(styleTag);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
window.loadJs = loadJs;
|
|
60
|
+
window.loadCss = loadCss;
|
|
61
|
+
|
|
62
|
+
</script>
|
|
63
|
+
<script type="module" crossorigin src="/assets/index-D4PMTHQ6.js"></script>
|
|
64
|
+
</head>
|
|
65
|
+
<body class="skin-blue-light fixed steedos sidebar-mini three-columns" >
|
|
66
|
+
<div id="root" class="steedos skin-blue-light creator h-full flex flex-col relative overflow-hidden"></div>
|
|
67
|
+
</body>
|
|
68
|
+
</html>
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* global maxPages */
|
|
2
|
+
|
|
3
|
+
// Code snippet inspired by https://github.com/douglasrodrigues5/ghost-blog-infinite-scroll
|
|
4
|
+
$(function ($) {
|
|
5
|
+
var currentPage = 1;
|
|
6
|
+
var pathname = window.location.pathname;
|
|
7
|
+
var $document = $(document);
|
|
8
|
+
var $result = $('.post-feed');
|
|
9
|
+
var buffer = 300;
|
|
10
|
+
|
|
11
|
+
var ticking = false;
|
|
12
|
+
var isLoading = false;
|
|
13
|
+
|
|
14
|
+
var lastScrollY = window.scrollY;
|
|
15
|
+
var lastWindowHeight = window.innerHeight;
|
|
16
|
+
var lastDocumentHeight = $document.height();
|
|
17
|
+
|
|
18
|
+
function onScroll() {
|
|
19
|
+
lastScrollY = window.scrollY;
|
|
20
|
+
requestTick();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function onResize() {
|
|
24
|
+
lastWindowHeight = window.innerHeight;
|
|
25
|
+
lastDocumentHeight = $document.height();
|
|
26
|
+
requestTick();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function requestTick() {
|
|
30
|
+
if (!ticking) {
|
|
31
|
+
requestAnimationFrame(infiniteScroll);
|
|
32
|
+
}
|
|
33
|
+
ticking = true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function sanitizePathname(path) {
|
|
37
|
+
var paginationRegex = /(?:page\/)(\d)(?:\/)$/i;
|
|
38
|
+
|
|
39
|
+
// remove hash params from path
|
|
40
|
+
path = path.replace(/#(.*)$/g, '').replace('////g', '/');
|
|
41
|
+
|
|
42
|
+
// remove pagination from the path and replace the current pages
|
|
43
|
+
// with the actual requested page. E. g. `/page/3/` indicates that
|
|
44
|
+
// the user actually requested page 3, so we should request page 4
|
|
45
|
+
// next, unless it's the last page already.
|
|
46
|
+
if (path.match(paginationRegex)) {
|
|
47
|
+
currentPage = parseInt(path.match(paginationRegex)[1]);
|
|
48
|
+
|
|
49
|
+
path = path.replace(paginationRegex, '');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return path;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function infiniteScroll() {
|
|
56
|
+
// sanitize the pathname from possible pagination or hash params
|
|
57
|
+
pathname = sanitizePathname(pathname);
|
|
58
|
+
|
|
59
|
+
// return if already loading
|
|
60
|
+
if (isLoading) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// return if not scroll to the bottom
|
|
65
|
+
if (lastScrollY + lastWindowHeight <= lastDocumentHeight - buffer) {
|
|
66
|
+
ticking = false;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* maxPages is defined in default.hbs and is the value
|
|
72
|
+
* of the amount of pagination pages.
|
|
73
|
+
* If we reached the last page or are past it,
|
|
74
|
+
* we return and disable the listeners.
|
|
75
|
+
*/
|
|
76
|
+
if (currentPage >= maxPages) {
|
|
77
|
+
window.removeEventListener('scroll', onScroll, {passive: true});
|
|
78
|
+
window.removeEventListener('resize', onResize);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
isLoading = true;
|
|
83
|
+
|
|
84
|
+
// next page
|
|
85
|
+
currentPage += 1;
|
|
86
|
+
|
|
87
|
+
// Load more
|
|
88
|
+
var nextPage = pathname + 'page/' + currentPage + '/';
|
|
89
|
+
|
|
90
|
+
$.get(nextPage, function (content) {
|
|
91
|
+
var parse = document.createRange().createContextualFragment(content);
|
|
92
|
+
var posts = parse.querySelectorAll('.post');
|
|
93
|
+
if (posts.length) {
|
|
94
|
+
[].forEach.call(posts, function (post) {
|
|
95
|
+
$result[0].appendChild(post);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}).fail(function (xhr) {
|
|
99
|
+
// 404 indicates we've run out of pages
|
|
100
|
+
if (xhr.status === 404) {
|
|
101
|
+
window.removeEventListener('scroll', onScroll, {passive: true});
|
|
102
|
+
window.removeEventListener('resize', onResize);
|
|
103
|
+
}
|
|
104
|
+
}).always(function () {
|
|
105
|
+
lastDocumentHeight = $document.height();
|
|
106
|
+
isLoading = false;
|
|
107
|
+
ticking = false;
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
window.addEventListener('scroll', onScroll, {passive: true});
|
|
112
|
+
window.addEventListener('resize', onResize);
|
|
113
|
+
|
|
114
|
+
infiniteScroll();
|
|
115
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*jshint browser:true */
|
|
2
|
+
/*!
|
|
3
|
+
* FitVids 1.3
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2017, Chris Coyier + Dave Rupert + Ghost Foundation
|
|
7
|
+
* This is an unofficial release, ported by John O'Nolan
|
|
8
|
+
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
|
|
9
|
+
* Released under the MIT license
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
;(function( $ ){
|
|
14
|
+
|
|
15
|
+
'use strict';
|
|
16
|
+
|
|
17
|
+
$.fn.fitVids = function( options ) {
|
|
18
|
+
var settings = {
|
|
19
|
+
customSelector: null,
|
|
20
|
+
ignore: null
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
if(!document.getElementById('fit-vids-style')) {
|
|
24
|
+
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
|
|
25
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
26
|
+
var css = '.fluid-width-video-container{flex-grow: 1;width:100%;}.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
|
|
27
|
+
var div = document.createElement("div");
|
|
28
|
+
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
|
|
29
|
+
head.appendChild(div.childNodes[1]);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if ( options ) {
|
|
33
|
+
$.extend( settings, options );
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return this.each(function(){
|
|
37
|
+
var selectors = [
|
|
38
|
+
'iframe[src*="player.vimeo.com"]',
|
|
39
|
+
'iframe[src*="youtube.com"]',
|
|
40
|
+
'iframe[src*="youtube-nocookie.com"]',
|
|
41
|
+
'iframe[src*="kickstarter.com"][src*="video.html"]',
|
|
42
|
+
'object',
|
|
43
|
+
'embed'
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
if (settings.customSelector) {
|
|
47
|
+
selectors.push(settings.customSelector);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
var ignoreList = '.fitvidsignore';
|
|
51
|
+
|
|
52
|
+
if(settings.ignore) {
|
|
53
|
+
ignoreList = ignoreList + ', ' + settings.ignore;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var $allVideos = $(this).find(selectors.join(','));
|
|
57
|
+
$allVideos = $allVideos.not('object object'); // SwfObj conflict patch
|
|
58
|
+
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
|
|
59
|
+
|
|
60
|
+
$allVideos.each(function(){
|
|
61
|
+
var $this = $(this);
|
|
62
|
+
if($this.parents(ignoreList).length > 0) {
|
|
63
|
+
return; // Disable FitVids on this video.
|
|
64
|
+
}
|
|
65
|
+
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
|
|
66
|
+
if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
|
|
67
|
+
{
|
|
68
|
+
$this.attr('height', 9);
|
|
69
|
+
$this.attr('width', 16);
|
|
70
|
+
}
|
|
71
|
+
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
|
|
72
|
+
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
|
|
73
|
+
aspectRatio = height / width;
|
|
74
|
+
if(!$this.attr('name')){
|
|
75
|
+
var videoName = 'fitvid' + $.fn.fitVids._count;
|
|
76
|
+
$this.attr('name', videoName);
|
|
77
|
+
$.fn.fitVids._count++;
|
|
78
|
+
}
|
|
79
|
+
$this.wrap('<div class="fluid-width-video-container"><div class="fluid-width-video-wrapper"></div></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
|
|
80
|
+
$this.removeAttr('height').removeAttr('width');
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// Internal counter for unique video names.
|
|
86
|
+
$.fn.fitVids._count = 0;
|
|
87
|
+
|
|
88
|
+
// Works with either jQuery or Zepto
|
|
89
|
+
})( window.jQuery || window.Zepto );
|