Skip to content

Commit bb05e3a

Browse files
author
djmaze
committed
Merge branch 'master' into plugin-hooks
2 parents 830fa5b + f26065b commit bb05e3a

File tree

264 files changed

+875
-9117
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

264 files changed

+875
-9117
lines changed

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,23 @@ RainLoop 1.15 vs SnappyMail
116116

117117
|js/* |RainLoop |Snappy |
118118
|--------------- |--------: |--------: |
119-
|admin.js |2.158.025 | 101.796 |
120-
|app.js |4.215.733 | 501.679 |
119+
|admin.js |2.158.025 | 100.608 |
120+
|app.js |4.215.733 | 495.934 |
121121
|boot.js | 672.433 | 4.726 |
122122
|libs.js | 647.679 | 227.974 |
123123
|polyfills.js | 325.908 | 0 |
124124
|serviceworker.js | 0 | 285 |
125-
|TOTAL |8.019.778 | 836.460 |
125+
|TOTAL |8.019.778 | 829.355 |
126126

127127
|js/min/* |RainLoop |Snappy |RL gzip |SM gzip |RL brotli |SM brotli |
128128
|--------------- |--------: |--------: |------: |------: |--------: |--------: |
129-
|admin.min.js | 255.514 | 51.172 | 73.899 | 15.082 | 60.674 | 13.491 |
130-
|app.min.js | 516.000 | 243.404 |140.430 | 71.302 |110.657 | 60.167 |
131-
|boot.min.js | 66.456 | 2.525 | 22.553 | 1.391 | 20.043 | 1.201 |
129+
|admin.min.js | 255.514 | 50.607 | 73.899 | 14.944 | 60.674 | 13.364 |
130+
|app.min.js | 516.000 | 240.553 |140.430 | 70.291 |110.657 | 59.309 |
131+
|boot.min.js | 66.456 | 2.442 | 22.553 | 1.371 | 20.043 | 1.178 |
132132
|libs.min.js | 574.626 | 115.877 |177.280 | 42.809 |151.855 | 38.099 |
133133
|polyfills.min.js | 32.608 | 0 | 11.315 | 0 | 10.072 | 0 |
134-
|TOTAL |1.445.204 | 412.978 |425.477 |130.584 |353.301 |112.958 |
135-
|TOTAL (no admin) |1.189.690 | 361.806 |351.061 |115.502 |292.627 | 99.467 |
134+
|TOTAL |1.445.204 | 409.479 |425.477 |129.415 |353.301 |111.950 |
135+
|TOTAL (no admin) |1.189.690 | 358.872 |351.061 |114.471 |292.627 | 98.586 |
136136

137137
For a user its around 66% smaller and faster than traditional RainLoop.
138138

@@ -166,12 +166,12 @@ For a user its around 66% smaller and faster than traditional RainLoop.
166166

167167
|css/* |RainLoop |Snappy |RL gzip |SM gzip |SM brotli |
168168
|------------ |-------: |-------: |------: |------: |--------: |
169-
|app.css | 340.334 | 107.316 | 46,959 | 18.818 | 16.150 |
170-
|app.min.css | 274.791 | 88.449 | 39.618 | 16.838 | 14.830 |
169+
|app.css | 340.334 | 107.279 | 46,959 | 18.816 | 16.160 |
170+
|app.min.css | 274.791 | 88.402 | 39.618 | 16.831 | 14.827 |
171171
|boot.css | | 2.066 | | 913 | 742 |
172172
|boot.min.css | | 1.696 | | 818 | 664 |
173-
|admin.css | | 48.053 | | 9.494 | 8.310 |
174-
|admin.min.css | | 38.740 | | 8.441 | 7.501 |
173+
|admin.css | | 46.393 | | 9.237 | 8.073 |
174+
|admin.min.css | | 37.306 | | 8.191 | 7.282 |
175175

176176

177177
### Squire vs CKEditor
@@ -189,8 +189,7 @@ Still TODO:
189189

190190
CKEditor including the 7 asset requests (css,language,plugins,icons) is 633.46 KB / 180.47 KB (gzip).
191191

192-
To use the old CKEditor, you must enable it in /data/\_data\_/\_default\_/configs/application.ini
193-
in the [labs] section add/edit: `use_ck_html_editor = On`
192+
To use the old CKEditor, you must install the plugin.
194193

195194
### PHP73 branch
196195

dev/App/Abstract.js

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import ko from 'ko';
22

33
import {
4-
doc,
54
elementById,
65
Settings
76
} from 'Common/Globals';
@@ -26,27 +25,6 @@ export class AbstractApp {
2625
this.Remote = Remote;
2726
}
2827

29-
remote() {
30-
return this.Remote || null;
31-
}
32-
33-
/**
34-
* @param {string} link
35-
* @returns {boolean}
36-
*/
37-
download(link) {
38-
if (ThemeStore.isMobile()) {
39-
open(link, '_self');
40-
focus();
41-
} else {
42-
const oLink = doc.createElement('a');
43-
oLink.href = link;
44-
doc.body.appendChild(oLink).click();
45-
oLink.remove();
46-
}
47-
return true;
48-
}
49-
5028
logoutReload(close = false) {
5129
const url = logoutLink();
5230

@@ -74,7 +52,7 @@ export class AbstractApp {
7452

7553
i18nToNodes(componentInfo.element);
7654

77-
if (undefined !== params.inline && ko.unwrap(params.inline)) {
55+
if (params.inline && ko.unwrap(params.inline)) {
7856
params.element.style.display = 'inline-block';
7957
}
8058
}
@@ -87,12 +65,8 @@ export class AbstractApp {
8765
register('Input', InputComponent);
8866
register('Select', SelectComponent);
8967
register('TextArea', TextAreaComponent);
68+
register('Checkbox', CheckboxMaterialDesignComponent, 'CheckboxMaterialDesignComponent');
9069
register('CheckboxSimple', CheckboxComponent, 'CheckboxComponent');
91-
if (!Settings.app('materialDesign')) {
92-
register('Checkbox', CheckboxComponent);
93-
} else {
94-
register('Checkbox', CheckboxMaterialDesignComponent, 'CheckboxMaterialDesignComponent');
95-
}
9670

9771
initOnStartOrLangChange();
9872

dev/App/Admin.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ class AdminApp extends AbstractApp {
1616
this.weakPassword = ko.observable(false);
1717
}
1818

19-
bootend() {
20-
progressJs.end();
21-
}
22-
2319
bootstart() {
2420
super.bootstart();
2521

@@ -35,7 +31,7 @@ class AdminApp extends AbstractApp {
3531
startScreens([LoginAdminScreen]);
3632
}
3733

38-
this.bootend();
34+
progressJs.end();
3935
}
4036
}
4137

dev/App/User.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -867,6 +867,23 @@ class AppUser extends AbstractApp {
867867
}
868868
}
869869

870+
/**
871+
* @param {string} link
872+
* @returns {boolean}
873+
*/
874+
download(link) {
875+
if (ThemeStore.isMobile()) {
876+
open(link, '_self');
877+
focus();
878+
} else {
879+
const oLink = createElement('a');
880+
oLink.href = link;
881+
doc.body.appendChild(oLink).click();
882+
oLink.remove();
883+
}
884+
return true;
885+
}
886+
870887
logout() {
871888
Remote.logout(() => this.logoutReload((SettingsGet('ParentEmail')||{length:0}).length));
872889
}

dev/Common/File.js

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -11,96 +11,96 @@ const
1111
sizes = ['B', 'KiB', 'MiB', 'GiB', 'TiB'],
1212

1313
exts = {
14-
'eml': 'message/rfc822',
15-
'mime': 'message/rfc822',
16-
'rtx': 'text/richtext',
17-
'vcard': 'text/vcard',
18-
'vcf': 'text/vcard',
19-
'htm': 'text/html',
20-
'html': 'text/html',
21-
'csv': 'text/csv',
22-
'ics': 'text/calendar',
23-
'ifb': 'text/calendar',
24-
'xml': 'text/xml',
25-
'json': app+'json',
26-
'p10': app+'pkcs10',
27-
'p7c': app+'pkcs7-mime',
28-
'p7m': app+'pkcs7-mime',
29-
'p7s': app+'pkcs7-signature',
30-
'torrent': app+'x-bittorrent',
14+
eml: 'message/rfc822',
15+
mime: 'message/rfc822',
16+
rtx: 'text/richtext',
17+
vcard: 'text/vcard',
18+
vcf: 'text/vcard',
19+
htm: 'text/html',
20+
html: 'text/html',
21+
csv: 'text/csv',
22+
ics: 'text/calendar',
23+
ifb: 'text/calendar',
24+
xml: 'text/xml',
25+
json: app+'json',
26+
p10: app+'pkcs10',
27+
p7c: app+'pkcs7-mime',
28+
p7m: app+'pkcs7-mime',
29+
p7s: app+'pkcs7-signature',
30+
torrent: app+'x-bittorrent',
3131

3232
// scripts
33-
'js': app+'javascript',
34-
'pl': 'text/perl',
35-
'css': 'text/css',
36-
'asp': 'text/asp',
37-
'php': app+'x-httpd-php',
38-
'phtml': app+'x-httpd-php',
33+
js: app+'javascript',
34+
pl: 'text/perl',
35+
css: 'text/css',
36+
asp: 'text/asp',
37+
php: app+'x-httpd-php',
38+
phtml: app+'x-httpd-php',
3939

4040
// images
41-
'jpg': 'image/jpeg',
42-
'ico': 'image/x-icon',
43-
'tif': 'image/tiff',
44-
'svg': 'image/svg+xml',
45-
'svgz': 'image/svg+xml',
41+
jpg: 'image/jpeg',
42+
ico: 'image/x-icon',
43+
tif: 'image/tiff',
44+
svg: 'image/svg+xml',
45+
svgz: 'image/svg+xml',
4646

4747
// archives
48-
'zip': app+'zip',
48+
zip: app+'zip',
4949
'7z': app+'x-7z-compressed',
50-
'rar': app+'x-rar-compressed',
51-
'cab': app+'vnd.ms-cab-compressed',
52-
'gz': app+'x-gzip',
53-
'tgz': app+'x-gzip',
54-
'bz': app+'x-bzip',
55-
'bz2': app+'x-bzip2',
56-
'deb': app+'x-debian-package',
50+
rar: app+'x-rar-compressed',
51+
cab: app+'vnd.ms-cab-compressed',
52+
gz: app+'x-gzip',
53+
tgz: app+'x-gzip',
54+
bz: app+'x-bzip',
55+
bz2: app+'x-bzip2',
56+
deb: app+'x-debian-package',
5757

5858
// audio
59-
'mp3': 'audio/mpeg',
60-
'wav': 'audio/x-wav',
61-
'mp4a': 'audio/mp4',
62-
'weba': 'audio/webm',
63-
'm3u': 'audio/x-mpegurl',
59+
mp3: 'audio/mpeg',
60+
wav: 'audio/x-wav',
61+
mp4a: 'audio/mp4',
62+
weba: 'audio/webm',
63+
m3u: 'audio/x-mpegurl',
6464

6565
// video
66-
'qt': 'video/quicktime',
67-
'mov': 'video/quicktime',
68-
'wmv': 'video/windows-media',
69-
'avi': 'video/x-msvideo',
66+
qt: 'video/quicktime',
67+
mov: 'video/quicktime',
68+
wmv: 'video/windows-media',
69+
avi: 'video/x-msvideo',
7070
'3gp': 'video/3gpp',
7171
'3g2': 'video/3gpp2',
72-
'mp4v': 'video/mp4',
73-
'mpg4': 'video/mp4',
74-
'ogv': 'video/ogg',
75-
'm4v': 'video/x-m4v',
76-
'asf': 'video/x-ms-asf',
77-
'asx': 'video/x-ms-asf',
78-
'wm': 'video/x-ms-wm',
79-
'wmx': 'video/x-ms-wmx',
80-
'wvx': 'video/x-ms-wvx',
81-
'movie': 'video/x-sgi-movie',
72+
mp4v: 'video/mp4',
73+
mpg4: 'video/mp4',
74+
ogv: 'video/ogg',
75+
m4v: 'video/x-m4v',
76+
asf: 'video/x-ms-asf',
77+
asx: 'video/x-ms-asf',
78+
wm: 'video/x-ms-wm',
79+
wmx: 'video/x-ms-wmx',
80+
wvx: 'video/x-ms-wvx',
81+
movie: 'video/x-sgi-movie',
8282

8383
// adobe
84-
'pdf': app+'pdf',
85-
'psd': 'image/vnd.adobe.photoshop',
86-
'ai': app+'postscript',
87-
'eps': app+'postscript',
88-
'ps': app+'postscript',
84+
pdf: app+'pdf',
85+
psd: 'image/vnd.adobe.photoshop',
86+
ai: app+'postscript',
87+
eps: app+'postscript',
88+
ps: app+'postscript',
8989

9090
// ms office
91-
'doc': app+'msword',
92-
'rtf': app+'rtf',
93-
'xls': app+'vnd.ms-excel',
94-
'ppt': app+'vnd.ms-powerpoint',
95-
'docx': msOffice+'wordprocessingml.document',
96-
'xlsx': msOffice+'spreadsheetml.sheet',
97-
'dotx': msOffice+'wordprocessingml.template',
98-
'pptx': msOffice+'presentationml.presentation',
91+
doc: app+'msword',
92+
rtf: app+'rtf',
93+
xls: app+'vnd.ms-excel',
94+
ppt: app+'vnd.ms-powerpoint',
95+
docx: msOffice+'wordprocessingml.document',
96+
xlsx: msOffice+'spreadsheetml.sheet',
97+
dotx: msOffice+'wordprocessingml.template',
98+
pptx: msOffice+'presentationml.presentation',
9999

100100
// open office
101-
'odt': openDoc+'text',
102-
'ods': openDoc+'spreadsheet',
103-
'odp': openDoc+'presentation'
101+
odt: openDoc+'text',
102+
ods: openDoc+'spreadsheet',
103+
odp: openDoc+'presentation'
104104
};
105105

106106
export const FileType = {

dev/Common/Html.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { createCKEditor } from 'External/CKEditor.js';
2-
31
const
42
htmlre = /[&<>"']/g,
53
htmlmap = {
@@ -180,11 +178,11 @@ class HtmlEditor {
180178
this.onReady && this.onReady();
181179
};
182180

183-
if (window.CKEDITOR) {
184-
this.editor = createCKEditor(this.element);
185-
this.editor.on('instanceReady', onReady);
186-
} else {
187-
this.editor = new SquireUI(this.element, this.editor);
181+
if (rl.createWYSIWYG) {
182+
this.editor = rl.createWYSIWYG(this.element, onReady);
183+
}
184+
if (!this.editor) {
185+
this.editor = new SquireUI(this.element);
188186
setTimeout(onReady,1);
189187
}
190188

dev/Common/Plugins.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function runHook(name, args = []) {
3636
* @param {?number=} timeout
3737
*/
3838
rl.pluginRemoteRequest = (callback, action, parameters, timeout) => {
39-
rl.app && rl.app.remote().defaultRequest(callback, 'Plugin' + action, parameters, timeout);
39+
rl.app && rl.app.Remote.defaultRequest(callback, 'Plugin' + action, parameters, timeout);
4040
};
4141

4242
/**

0 commit comments

Comments
 (0)