pro-xy-ui 0.5.9 → 0.6.1
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/.esformatter +28 -28
- package/.eslintrc +15 -15
- package/bin/pro-xy-ui +25 -27
- package/index.html +38 -38
- package/lib/app/_common/app-menu.js +42 -42
- package/lib/app/_common/app-menu.ts +41 -41
- package/lib/app/_common/patchResize.js +33 -33
- package/lib/app/_common/patchResize.ts +32 -32
- package/lib/app/_common/pipes.js +33 -33
- package/lib/app/_common/pipes.ts +21 -21
- package/lib/app/_common/rxjs-extensions.js +20 -20
- package/lib/app/_common/rxjs-extensions.ts +21 -21
- package/lib/app/app.component.css +39 -39
- package/lib/app/app.component.html +35 -35
- package/lib/app/app.module.js +92 -92
- package/lib/app/app.module.ts +89 -89
- package/lib/app/main.js +11 -11
- package/lib/app/main.ts +11 -11
- package/lib/app/model/config.js +69 -69
- package/lib/app/model/config.ts +79 -79
- package/lib/app/model/http.js +116 -116
- package/lib/app/service/config.defaultConfig.js +74 -74
- package/lib/app/service/config.defaultConfig.ts +72 -72
- package/lib/app/service/config.service.js +44 -44
- package/lib/app/service/config.service.ts +39 -39
- package/lib/app/service/socket.service.js +109 -109
- package/lib/app/service/socket.service.ts +131 -131
- package/lib/app/service/traffic.service.js +98 -98
- package/lib/app/views/auto-responder/auto-responder.component.css +37 -37
- package/lib/app/views/auto-responder/auto-responder.component.html +41 -41
- package/lib/app/views/auto-responder/auto-responder.component.js +102 -102
- package/lib/app/views/auto-responder/auto-responder.component.ts +110 -110
- package/lib/app/views/composer/composer.component.css +7 -7
- package/lib/app/views/composer/composer.component.html +9 -9
- package/lib/app/views/composer/composer.component.js +147 -147
- package/lib/app/views/composer/composer.component.ts +148 -148
- package/lib/app/views/config/config.component.css +13 -13
- package/lib/app/views/config/config.component.html +14 -14
- package/lib/app/views/config/config.component.js +163 -163
- package/lib/app/views/config/diff.dialog.html +3 -3
- package/lib/app/views/config/diff.dialog.js +29 -29
- package/lib/app/views/config/diff.dialog.ts +17 -17
- package/lib/app/views/config/plugins.dialog.html +17 -17
- package/lib/app/views/config/plugins.dialog.js +29 -29
- package/lib/app/views/config/plugins.dialog.ts +17 -17
- package/lib/app/views/config-list-base.js +44 -44
- package/lib/app/views/config-list-base.ts +66 -66
- package/lib/app/views/connection/connection.component.html +9 -9
- package/lib/app/views/connection/connection.component.js +87 -89
- package/lib/app/views/connection/connection.component.ts +83 -85
- package/lib/app/views/delay/delay.component.css +23 -23
- package/lib/app/views/delay/delay.component.html +35 -35
- package/lib/app/views/delay/delay.component.js +34 -34
- package/lib/app/views/find/find.component.css +30 -30
- package/lib/app/views/find/find.component.html +10 -10
- package/lib/app/views/find/find.component.js +113 -113
- package/lib/app/views/find/find.component.ts +111 -111
- package/lib/app/views/inspector/inspector.component.css +14 -14
- package/lib/app/views/inspector/inspector.component.html +17 -17
- package/lib/app/views/inspector/inspector.component.js +64 -64
- package/lib/app/views/inspector/inspector.component.ts +54 -54
- package/lib/app/views/logs/logs.component.css +7 -7
- package/lib/app/views/logs/logs.component.html +13 -13
- package/lib/app/views/logs/logs.component.js +56 -56
- package/lib/app/views/logs/logs.component.ts +46 -46
- package/lib/app/views/requests/request-row.component.css +15 -15
- package/lib/app/views/requests/request-row.component.html +7 -7
- package/lib/app/views/requests/request-row.component.js +68 -68
- package/lib/app/views/requests/request.bodyMenu.js +41 -41
- package/lib/app/views/requests/request.bodyMenu.ts +61 -61
- package/lib/app/views/requests/request.headMenu.js +25 -25
- package/lib/app/views/requests/requests.component.css +49 -49
- package/lib/app/views/requests/requests.component.html +33 -33
- package/lib/app/views/requests/requests.component.js +127 -127
- package/lib/app/views/status/status.component.css +18 -18
- package/lib/app/views/status/status.component.html +8 -8
- package/lib/app/views/status/status.component.js +49 -49
- package/lib/app/views/status/status.component.ts +45 -45
- package/lib/app/views/url-replace/url-replace.component.css +32 -32
- package/lib/app/views/url-replace/url-replace.component.html +36 -36
- package/lib/app/views/url-replace/url-replace.component.js +34 -34
- package/lib/index.js +23 -23
- package/lib/lib.d.ts +2 -2
- package/lib/style.css +100 -100
- package/lib/systemjs.config.js +75 -75
- package/package.json +64 -64
- package/readme.md +5 -5
- package/tsconfig.json +23 -23
- package/typings.json +11 -11
- package/npm-shrinkwrap.json +0 -2568
package/.esformatter
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
{
|
|
2
|
-
"indent" : {
|
|
3
|
-
"value" : "\t",
|
|
4
|
-
"SwitchStatement": 0,
|
|
5
|
-
"MemberExpression": 0,
|
|
6
|
-
"LineComment": -1,
|
|
7
|
-
"ParameterList" : 2
|
|
8
|
-
},
|
|
9
|
-
"lineBreak" : {
|
|
10
|
-
"before": {
|
|
11
|
-
"ArrayExpressionClosing" : 1
|
|
12
|
-
},
|
|
13
|
-
"after": {
|
|
14
|
-
"ArrayExpressionOpening" : 1,
|
|
15
|
-
"ArrayExpressionComma": 1
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"whiteSpace" : {
|
|
19
|
-
"after": {
|
|
20
|
-
"PropertyName": 0,
|
|
21
|
-
"BlockComment": -1
|
|
22
|
-
},
|
|
23
|
-
"before": {
|
|
24
|
-
"BlockComment": -1,
|
|
25
|
-
"LineComment": -1
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"indent" : {
|
|
3
|
+
"value" : "\t",
|
|
4
|
+
"SwitchStatement": 0,
|
|
5
|
+
"MemberExpression": 0,
|
|
6
|
+
"LineComment": -1,
|
|
7
|
+
"ParameterList" : 2
|
|
8
|
+
},
|
|
9
|
+
"lineBreak" : {
|
|
10
|
+
"before": {
|
|
11
|
+
"ArrayExpressionClosing" : 1
|
|
12
|
+
},
|
|
13
|
+
"after": {
|
|
14
|
+
"ArrayExpressionOpening" : 1,
|
|
15
|
+
"ArrayExpressionComma": 1
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"whiteSpace" : {
|
|
19
|
+
"after": {
|
|
20
|
+
"PropertyName": 0,
|
|
21
|
+
"BlockComment": -1
|
|
22
|
+
},
|
|
23
|
+
"before": {
|
|
24
|
+
"BlockComment": -1,
|
|
25
|
+
"LineComment": -1
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
package/.eslintrc
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"node": true,
|
|
4
|
-
"es6": true
|
|
5
|
-
},
|
|
6
|
-
"globals": {},
|
|
7
|
-
"rules": {
|
|
8
|
-
"strict": 0,
|
|
9
|
-
"no-use-before-define": 0,
|
|
10
|
-
"semi": 2,
|
|
11
|
-
"no-unused-vars": 2,
|
|
12
|
-
"no-undef": 2,
|
|
13
|
-
"no-console": 0
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"node": true,
|
|
4
|
+
"es6": true
|
|
5
|
+
},
|
|
6
|
+
"globals": {},
|
|
7
|
+
"rules": {
|
|
8
|
+
"strict": 0,
|
|
9
|
+
"no-use-before-define": 0,
|
|
10
|
+
"semi": 2,
|
|
11
|
+
"no-unused-vars": 2,
|
|
12
|
+
"no-undef": 2,
|
|
13
|
+
"no-console": 0
|
|
14
|
+
}
|
|
15
|
+
}
|
package/bin/pro-xy-ui
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
//this is for sure not the best way to start NW application, but working
|
|
3
|
-
//TODO: find how to correctly build NW app
|
|
4
|
-
|
|
5
|
-
var path = require("path");
|
|
6
|
-
var cp = require("child_process");
|
|
7
|
-
|
|
8
|
-
var nwBin = require.resolve("nw/bin/nw");
|
|
9
|
-
|
|
10
|
-
if (/^win/.test(process.platform)) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
nwProcess.unref();
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
//this is for sure not the best way to start NW application, but working
|
|
3
|
+
//TODO: find how to correctly build NW app
|
|
4
|
+
|
|
5
|
+
var path = require("path");
|
|
6
|
+
var cp = require("child_process");
|
|
7
|
+
|
|
8
|
+
var nwBin = require.resolve("nw/bin/nw");
|
|
9
|
+
nwBin = path.resolve(__dirname, "../node_modules/.bin/nw");
|
|
10
|
+
if (/^win/.test(process.platform)) {
|
|
11
|
+
nwBin += ".cmd";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
var homeDir = process.env.HOME || process.env.USERPROFILE;
|
|
15
|
+
var nwProcess = cp.spawn(nwBin, [
|
|
16
|
+
path.resolve(__dirname, "..")
|
|
17
|
+
], {
|
|
18
|
+
detached: true,
|
|
19
|
+
stdio: "ignore",
|
|
20
|
+
shell: /^win/.test(process.platform),
|
|
21
|
+
env: Object.assign({
|
|
22
|
+
CHROME_LOG_FILE: path.join(homeDir, "pro-xy-logs/pro-xy-ui.log")
|
|
23
|
+
}, process.env)
|
|
24
|
+
});
|
|
25
|
+
nwProcess.unref();
|
package/index.html
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<html>
|
|
2
|
-
|
|
3
|
-
<head>
|
|
4
|
-
<title>PRO-XY UI</title>
|
|
5
|
-
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
|
|
6
|
-
<link rel="stylesheet" href="/node_modules/@angular/material/prebuilt-themes/indigo-pink.css">
|
|
7
|
-
<!-- <link rel="stylesheet" href="/node_modules/ng2-dnd/bundles/style.css">-->
|
|
8
|
-
<link type="text/css" rel="stylesheet" href="./lib/style.css">
|
|
9
|
-
|
|
10
|
-
<!-- <script>require('nw.gui').Window.get().showDevTools();debugger;</script> -->
|
|
11
|
-
<!-- <script src="./node_modules/core-js/client/shim.min.js"></script> -->
|
|
12
|
-
<script src="./node_modules/zone.js/dist/zone.js"></script>
|
|
13
|
-
<script src="./node_modules/reflect-metadata/Reflect.js"></script>
|
|
14
|
-
<script src="./node_modules/systemjs/dist/system.src.js"></script>
|
|
15
|
-
<!-- 2. Configure SystemJS -->
|
|
16
|
-
<script src="./lib/systemjs.config.js"></script>
|
|
17
|
-
</head>
|
|
18
|
-
|
|
19
|
-
<body>
|
|
20
|
-
<my-app class="font-sm"><div id="loadingMsg">Loading...</div></my-app>
|
|
21
|
-
<script>
|
|
22
|
-
// Load native UI library
|
|
23
|
-
var ngui = require('nw.gui');
|
|
24
|
-
var nwin = ngui.Window.get();
|
|
25
|
-
|
|
26
|
-
onload = function() {
|
|
27
|
-
nwin.show();
|
|
28
|
-
nwin.maximize();
|
|
29
|
-
}
|
|
30
|
-
System.import('app').catch(function(err) {
|
|
31
|
-
console.error(err);
|
|
32
|
-
});
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<!-- <script src="./lib/index.js"></script> -->
|
|
36
|
-
</body>
|
|
37
|
-
|
|
38
|
-
</html>
|
|
1
|
+
<html>
|
|
2
|
+
|
|
3
|
+
<head>
|
|
4
|
+
<title>PRO-XY UI</title>
|
|
5
|
+
<link rel="stylesheet" href="/node_modules/bootstrap/dist/css/bootstrap.min.css">
|
|
6
|
+
<link rel="stylesheet" href="/node_modules/@angular/material/prebuilt-themes/indigo-pink.css">
|
|
7
|
+
<!-- <link rel="stylesheet" href="/node_modules/ng2-dnd/bundles/style.css">-->
|
|
8
|
+
<link type="text/css" rel="stylesheet" href="./lib/style.css">
|
|
9
|
+
|
|
10
|
+
<!-- <script>require('nw.gui').Window.get().showDevTools();debugger;</script> -->
|
|
11
|
+
<!-- <script src="./node_modules/core-js/client/shim.min.js"></script> -->
|
|
12
|
+
<script src="./node_modules/zone.js/dist/zone.js"></script>
|
|
13
|
+
<script src="./node_modules/reflect-metadata/Reflect.js"></script>
|
|
14
|
+
<script src="./node_modules/systemjs/dist/system.src.js"></script>
|
|
15
|
+
<!-- 2. Configure SystemJS -->
|
|
16
|
+
<script src="./lib/systemjs.config.js"></script>
|
|
17
|
+
</head>
|
|
18
|
+
|
|
19
|
+
<body>
|
|
20
|
+
<my-app class="font-sm"><div id="loadingMsg">Loading...</div></my-app>
|
|
21
|
+
<script>
|
|
22
|
+
// Load native UI library
|
|
23
|
+
var ngui = require('nw.gui');
|
|
24
|
+
var nwin = ngui.Window.get();
|
|
25
|
+
|
|
26
|
+
onload = function() {
|
|
27
|
+
nwin.show();
|
|
28
|
+
nwin.maximize();
|
|
29
|
+
}
|
|
30
|
+
System.import('app').catch(function(err) {
|
|
31
|
+
console.error(err);
|
|
32
|
+
});
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<!-- <script src="./lib/index.js"></script> -->
|
|
36
|
+
</body>
|
|
37
|
+
|
|
38
|
+
</html>
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var path = nw.require("path");
|
|
4
|
-
var LOG_FILE_LOCATION = path.join(process.env.HOME, "pro-xy-logs/pro-xy.log");
|
|
5
|
-
var CONFIG_LOCATION = path.join(process.env.HOME, ".pro-xyrc.json");
|
|
6
|
-
var mainMenu;
|
|
7
|
-
var globalItems = [
|
|
8
|
-
new nw.MenuItem({ label: "Reload app", click: () => chrome.runtime.reload() }),
|
|
9
|
-
new nw.MenuItem({ label: "Open", submenu: createOpenMenu() })
|
|
10
|
-
];
|
|
11
|
-
function openAppMenu(evt) {
|
|
12
|
-
if (evt.ctrlKey) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
evt.preventDefault();
|
|
16
|
-
if (!mainMenu) {
|
|
17
|
-
mainMenu = new nw.Menu();
|
|
18
|
-
}
|
|
19
|
-
while (mainMenu.items.length) {
|
|
20
|
-
mainMenu.removeAt(0);
|
|
21
|
-
}
|
|
22
|
-
if (evt.menuItems) {
|
|
23
|
-
evt.menuItems.forEach(item => mainMenu.append(item));
|
|
24
|
-
}
|
|
25
|
-
if (!evt.preventGlobalItems) {
|
|
26
|
-
globalItems.forEach(item => mainMenu.append(item));
|
|
27
|
-
}
|
|
28
|
-
mainMenu.popup(evt.pageX, evt.pageY);
|
|
29
|
-
}
|
|
30
|
-
exports.openAppMenu = openAppMenu;
|
|
31
|
-
function createOpenMenu() {
|
|
32
|
-
var openMenu = new nw.Menu();
|
|
33
|
-
openMenu.append(new nw.MenuItem({
|
|
34
|
-
label: "Config file (in system editor)",
|
|
35
|
-
click: () => nw.Shell.openItem(CONFIG_LOCATION)
|
|
36
|
-
}));
|
|
37
|
-
openMenu.append(new nw.MenuItem({
|
|
38
|
-
label: "Log file (in system editor)",
|
|
39
|
-
click: () => nw.Shell.openItem(LOG_FILE_LOCATION)
|
|
40
|
-
}));
|
|
41
|
-
return openMenu;
|
|
42
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var path = nw.require("path");
|
|
4
|
+
var LOG_FILE_LOCATION = path.join(process.env.HOME, "pro-xy-logs/pro-xy.log");
|
|
5
|
+
var CONFIG_LOCATION = path.join(process.env.HOME, ".pro-xyrc.json");
|
|
6
|
+
var mainMenu;
|
|
7
|
+
var globalItems = [
|
|
8
|
+
new nw.MenuItem({ label: "Reload app", click: () => chrome.runtime.reload() }),
|
|
9
|
+
new nw.MenuItem({ label: "Open", submenu: createOpenMenu() })
|
|
10
|
+
];
|
|
11
|
+
function openAppMenu(evt) {
|
|
12
|
+
if (evt.ctrlKey) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
evt.preventDefault();
|
|
16
|
+
if (!mainMenu) {
|
|
17
|
+
mainMenu = new nw.Menu();
|
|
18
|
+
}
|
|
19
|
+
while (mainMenu.items.length) {
|
|
20
|
+
mainMenu.removeAt(0);
|
|
21
|
+
}
|
|
22
|
+
if (evt.menuItems) {
|
|
23
|
+
evt.menuItems.forEach(item => mainMenu.append(item));
|
|
24
|
+
}
|
|
25
|
+
if (!evt.preventGlobalItems) {
|
|
26
|
+
globalItems.forEach(item => mainMenu.append(item));
|
|
27
|
+
}
|
|
28
|
+
mainMenu.popup(evt.pageX, evt.pageY);
|
|
29
|
+
}
|
|
30
|
+
exports.openAppMenu = openAppMenu;
|
|
31
|
+
function createOpenMenu() {
|
|
32
|
+
var openMenu = new nw.Menu();
|
|
33
|
+
openMenu.append(new nw.MenuItem({
|
|
34
|
+
label: "Config file (in system editor)",
|
|
35
|
+
click: () => nw.Shell.openItem(CONFIG_LOCATION)
|
|
36
|
+
}));
|
|
37
|
+
openMenu.append(new nw.MenuItem({
|
|
38
|
+
label: "Log file (in system editor)",
|
|
39
|
+
click: () => nw.Shell.openItem(LOG_FILE_LOCATION)
|
|
40
|
+
}));
|
|
41
|
+
return openMenu;
|
|
42
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
var path = nw.require("path");
|
|
2
|
-
|
|
3
|
-
var LOG_FILE_LOCATION = path.join(process.env.HOME, "pro-xy-logs/pro-xy.log");
|
|
4
|
-
var CONFIG_LOCATION = path.join(process.env.HOME, ".pro-xyrc.json");
|
|
5
|
-
|
|
6
|
-
var mainMenu;
|
|
7
|
-
var globalItems = [
|
|
8
|
-
new nw.MenuItem({ label: "Reload app", click: () => chrome.runtime.reload() }),
|
|
9
|
-
new nw.MenuItem({ label: "Open", submenu: createOpenMenu() })
|
|
10
|
-
];
|
|
11
|
-
|
|
12
|
-
export function openAppMenu(evt) {
|
|
13
|
-
if (evt.ctrlKey) { return; }
|
|
14
|
-
evt.preventDefault();
|
|
15
|
-
|
|
16
|
-
if (!mainMenu) { mainMenu = new nw.Menu(); }
|
|
17
|
-
|
|
18
|
-
while (mainMenu.items.length) { mainMenu.removeAt(0); }
|
|
19
|
-
|
|
20
|
-
if (evt.menuItems) {
|
|
21
|
-
evt.menuItems.forEach(item => mainMenu.append(item));
|
|
22
|
-
}
|
|
23
|
-
if (!evt.preventGlobalItems) {
|
|
24
|
-
globalItems.forEach(item => mainMenu.append(item));
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
mainMenu.popup(evt.pageX, evt.pageY);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function createOpenMenu() {
|
|
31
|
-
var openMenu = new nw.Menu();
|
|
32
|
-
openMenu.append(new nw.MenuItem({
|
|
33
|
-
label: "Config file (in system editor)",
|
|
34
|
-
click: () => nw.Shell.openItem(CONFIG_LOCATION)
|
|
35
|
-
}));
|
|
36
|
-
openMenu.append(new nw.MenuItem({
|
|
37
|
-
label: "Log file (in system editor)",
|
|
38
|
-
click: () => nw.Shell.openItem(LOG_FILE_LOCATION)
|
|
39
|
-
}));
|
|
40
|
-
return openMenu;
|
|
41
|
-
}
|
|
1
|
+
var path = nw.require("path");
|
|
2
|
+
|
|
3
|
+
var LOG_FILE_LOCATION = path.join(process.env.HOME, "pro-xy-logs/pro-xy.log");
|
|
4
|
+
var CONFIG_LOCATION = path.join(process.env.HOME, ".pro-xyrc.json");
|
|
5
|
+
|
|
6
|
+
var mainMenu;
|
|
7
|
+
var globalItems = [
|
|
8
|
+
new nw.MenuItem({ label: "Reload app", click: () => chrome.runtime.reload() }),
|
|
9
|
+
new nw.MenuItem({ label: "Open", submenu: createOpenMenu() })
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export function openAppMenu(evt) {
|
|
13
|
+
if (evt.ctrlKey) { return; }
|
|
14
|
+
evt.preventDefault();
|
|
15
|
+
|
|
16
|
+
if (!mainMenu) { mainMenu = new nw.Menu(); }
|
|
17
|
+
|
|
18
|
+
while (mainMenu.items.length) { mainMenu.removeAt(0); }
|
|
19
|
+
|
|
20
|
+
if (evt.menuItems) {
|
|
21
|
+
evt.menuItems.forEach(item => mainMenu.append(item));
|
|
22
|
+
}
|
|
23
|
+
if (!evt.preventGlobalItems) {
|
|
24
|
+
globalItems.forEach(item => mainMenu.append(item));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
mainMenu.popup(evt.pageX, evt.pageY);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function createOpenMenu() {
|
|
31
|
+
var openMenu = new nw.Menu();
|
|
32
|
+
openMenu.append(new nw.MenuItem({
|
|
33
|
+
label: "Config file (in system editor)",
|
|
34
|
+
click: () => nw.Shell.openItem(CONFIG_LOCATION)
|
|
35
|
+
}));
|
|
36
|
+
openMenu.append(new nw.MenuItem({
|
|
37
|
+
label: "Log file (in system editor)",
|
|
38
|
+
click: () => nw.Shell.openItem(LOG_FILE_LOCATION)
|
|
39
|
+
}));
|
|
40
|
+
return openMenu;
|
|
41
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
function patchResize(element, resizeCallback) {
|
|
4
|
-
element.onmouseover = resizableStart;
|
|
5
|
-
function resizableStart(e) {
|
|
6
|
-
this.originalW = this.clientWidth;
|
|
7
|
-
// this.originalH = this.clientHeight;
|
|
8
|
-
this.onmousemove = resizableCheck;
|
|
9
|
-
this.onmouseup = this.onmouseout = resizableEnd;
|
|
10
|
-
}
|
|
11
|
-
function resizableCheck(e) {
|
|
12
|
-
if (this.clientWidth !== this.originalW /*|| this.clientHeight !== this.originalH*/) {
|
|
13
|
-
this.originalX = e.clientX;
|
|
14
|
-
//this.originalY = e.clientY;
|
|
15
|
-
this.onmousemove = resizableMove;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
function resizableMove(e) {
|
|
19
|
-
var newW = this.originalW + e.clientX - this.originalX;
|
|
20
|
-
//newH = this.originalH + e.clientY - this.originalY;
|
|
21
|
-
if (newW < this.originalW) {
|
|
22
|
-
this.style.width = newW + 'px';
|
|
23
|
-
}
|
|
24
|
-
// if (newH < this.originalH) {
|
|
25
|
-
// this.style.height = newH + 'px';
|
|
26
|
-
// }
|
|
27
|
-
resizeCallback && resizeCallback({ w: newW });
|
|
28
|
-
}
|
|
29
|
-
function resizableEnd() {
|
|
30
|
-
this.onmousemove = this.onmouseout = this.onmouseup = null;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
exports.patchResize = patchResize;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
function patchResize(element, resizeCallback) {
|
|
4
|
+
element.onmouseover = resizableStart;
|
|
5
|
+
function resizableStart(e) {
|
|
6
|
+
this.originalW = this.clientWidth;
|
|
7
|
+
// this.originalH = this.clientHeight;
|
|
8
|
+
this.onmousemove = resizableCheck;
|
|
9
|
+
this.onmouseup = this.onmouseout = resizableEnd;
|
|
10
|
+
}
|
|
11
|
+
function resizableCheck(e) {
|
|
12
|
+
if (this.clientWidth !== this.originalW /*|| this.clientHeight !== this.originalH*/) {
|
|
13
|
+
this.originalX = e.clientX;
|
|
14
|
+
//this.originalY = e.clientY;
|
|
15
|
+
this.onmousemove = resizableMove;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function resizableMove(e) {
|
|
19
|
+
var newW = this.originalW + e.clientX - this.originalX;
|
|
20
|
+
//newH = this.originalH + e.clientY - this.originalY;
|
|
21
|
+
if (newW < this.originalW) {
|
|
22
|
+
this.style.width = newW + 'px';
|
|
23
|
+
}
|
|
24
|
+
// if (newH < this.originalH) {
|
|
25
|
+
// this.style.height = newH + 'px';
|
|
26
|
+
// }
|
|
27
|
+
resizeCallback && resizeCallback({ w: newW });
|
|
28
|
+
}
|
|
29
|
+
function resizableEnd() {
|
|
30
|
+
this.onmousemove = this.onmouseout = this.onmouseup = null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.patchResize = patchResize;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
export function patchResize(element, resizeCallback) {
|
|
2
|
-
element.onmouseover = resizableStart;
|
|
3
|
-
|
|
4
|
-
function resizableStart(e) {
|
|
5
|
-
this.originalW = this.clientWidth;
|
|
6
|
-
// this.originalH = this.clientHeight;
|
|
7
|
-
this.onmousemove = resizableCheck;
|
|
8
|
-
this.onmouseup = this.onmouseout = resizableEnd;
|
|
9
|
-
}
|
|
10
|
-
function resizableCheck(e) {
|
|
11
|
-
if (this.clientWidth !== this.originalW /*|| this.clientHeight !== this.originalH*/) {
|
|
12
|
-
this.originalX = e.clientX;
|
|
13
|
-
//this.originalY = e.clientY;
|
|
14
|
-
this.onmousemove = resizableMove;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function resizableMove(e) {
|
|
18
|
-
var newW = this.originalW + e.clientX - this.originalX;
|
|
19
|
-
//newH = this.originalH + e.clientY - this.originalY;
|
|
20
|
-
if (newW < this.originalW) {
|
|
21
|
-
this.style.width = newW + 'px';
|
|
22
|
-
}
|
|
23
|
-
// if (newH < this.originalH) {
|
|
24
|
-
// this.style.height = newH + 'px';
|
|
25
|
-
// }
|
|
26
|
-
resizeCallback && resizeCallback({ w: newW });
|
|
27
|
-
}
|
|
28
|
-
function resizableEnd() {
|
|
29
|
-
this.onmousemove = this.onmouseout = this.onmouseup = null;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
}
|
|
1
|
+
export function patchResize(element, resizeCallback) {
|
|
2
|
+
element.onmouseover = resizableStart;
|
|
3
|
+
|
|
4
|
+
function resizableStart(e) {
|
|
5
|
+
this.originalW = this.clientWidth;
|
|
6
|
+
// this.originalH = this.clientHeight;
|
|
7
|
+
this.onmousemove = resizableCheck;
|
|
8
|
+
this.onmouseup = this.onmouseout = resizableEnd;
|
|
9
|
+
}
|
|
10
|
+
function resizableCheck(e) {
|
|
11
|
+
if (this.clientWidth !== this.originalW /*|| this.clientHeight !== this.originalH*/) {
|
|
12
|
+
this.originalX = e.clientX;
|
|
13
|
+
//this.originalY = e.clientY;
|
|
14
|
+
this.onmousemove = resizableMove;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function resizableMove(e) {
|
|
18
|
+
var newW = this.originalW + e.clientX - this.originalX;
|
|
19
|
+
//newH = this.originalH + e.clientY - this.originalY;
|
|
20
|
+
if (newW < this.originalW) {
|
|
21
|
+
this.style.width = newW + 'px';
|
|
22
|
+
}
|
|
23
|
+
// if (newH < this.originalH) {
|
|
24
|
+
// this.style.height = newH + 'px';
|
|
25
|
+
// }
|
|
26
|
+
resizeCallback && resizeCallback({ w: newW });
|
|
27
|
+
}
|
|
28
|
+
function resizableEnd() {
|
|
29
|
+
this.onmousemove = this.onmouseout = this.onmouseup = null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
package/lib/app/_common/pipes.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
const core_1 = require("@angular/core");
|
|
10
|
-
let JsonHtmlPipe = class JsonHtmlPipe {
|
|
11
|
-
transform(val) {
|
|
12
|
-
return JSON.stringify(val, null, 4)
|
|
13
|
-
.replace(' ', ' ')
|
|
14
|
-
.replace('\n', '<br/>');
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
JsonHtmlPipe = __decorate([
|
|
18
|
-
core_1.Pipe({
|
|
19
|
-
name: 'jsonhtml'
|
|
20
|
-
})
|
|
21
|
-
], JsonHtmlPipe);
|
|
22
|
-
exports.JsonHtmlPipe = JsonHtmlPipe;
|
|
23
|
-
let JsonPipe = class JsonPipe {
|
|
24
|
-
transform(val) {
|
|
25
|
-
return JSON.stringify(val, null, "\t");
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
JsonPipe = __decorate([
|
|
29
|
-
core_1.Pipe({
|
|
30
|
-
name: 'json'
|
|
31
|
-
})
|
|
32
|
-
], JsonPipe);
|
|
33
|
-
exports.JsonPipe = JsonPipe;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
const core_1 = require("@angular/core");
|
|
10
|
+
let JsonHtmlPipe = class JsonHtmlPipe {
|
|
11
|
+
transform(val) {
|
|
12
|
+
return JSON.stringify(val, null, 4)
|
|
13
|
+
.replace(' ', ' ')
|
|
14
|
+
.replace('\n', '<br/>');
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
JsonHtmlPipe = __decorate([
|
|
18
|
+
core_1.Pipe({
|
|
19
|
+
name: 'jsonhtml'
|
|
20
|
+
})
|
|
21
|
+
], JsonHtmlPipe);
|
|
22
|
+
exports.JsonHtmlPipe = JsonHtmlPipe;
|
|
23
|
+
let JsonPipe = class JsonPipe {
|
|
24
|
+
transform(val) {
|
|
25
|
+
return JSON.stringify(val, null, "\t");
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
JsonPipe = __decorate([
|
|
29
|
+
core_1.Pipe({
|
|
30
|
+
name: 'json'
|
|
31
|
+
})
|
|
32
|
+
], JsonPipe);
|
|
33
|
+
exports.JsonPipe = JsonPipe;
|
package/lib/app/_common/pipes.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { Pipe } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Pipe({
|
|
4
|
-
name: 'jsonhtml'
|
|
5
|
-
})
|
|
6
|
-
export class JsonHtmlPipe {
|
|
7
|
-
transform(val) {
|
|
8
|
-
return JSON.stringify(val, null, 4)
|
|
9
|
-
.replace(' ', ' ')
|
|
10
|
-
.replace('\n', '<br/>');
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@Pipe({
|
|
15
|
-
name: 'json'
|
|
16
|
-
})
|
|
17
|
-
export class JsonPipe {
|
|
18
|
-
transform(val) {
|
|
19
|
-
return JSON.stringify(val, null, "\t");
|
|
20
|
-
}
|
|
21
|
-
}
|
|
1
|
+
import { Pipe } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'jsonhtml'
|
|
5
|
+
})
|
|
6
|
+
export class JsonHtmlPipe {
|
|
7
|
+
transform(val) {
|
|
8
|
+
return JSON.stringify(val, null, 4)
|
|
9
|
+
.replace(' ', ' ')
|
|
10
|
+
.replace('\n', '<br/>');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@Pipe({
|
|
15
|
+
name: 'json'
|
|
16
|
+
})
|
|
17
|
+
export class JsonPipe {
|
|
18
|
+
transform(val) {
|
|
19
|
+
return JSON.stringify(val, null, "\t");
|
|
20
|
+
}
|
|
21
|
+
}
|