phirepass-widgets 0.0.117 → 0.0.118
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/README.md +1 -12
- package/dist/cjs/{index-DehquNXP.js → index-C3v5xmUo.js} +2 -74
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-rdp.cjs.entry.js +5 -16
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +1470 -0
- package/dist/cjs/phirepass-terminal.cjs.entry.js +4 -4
- package/dist/cjs/phirepass-widgets.cjs.js +2 -2
- package/dist/cjs/{protocol-BjOgJZ9-.js → protocol-DCBMfc2u.js} +21 -277
- package/dist/collection/collection-manifest.json +0 -2
- package/dist/collection/common/channel.js +1 -21
- package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +13 -36
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +0 -122
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +31 -181
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-CsYQJXY2.js +1 -0
- package/dist/components/phirepass-rdp.js +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +5 -5
- package/dist/esm/{index-BinptKL7.js → index-BVOulYtW.js} +2 -74
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-rdp.entry.js +5 -16
- package/dist/esm/phirepass-sftp-client.entry.js +1468 -0
- package/dist/esm/phirepass-terminal.entry.js +4 -4
- package/dist/esm/phirepass-widgets.js +3 -3
- package/dist/esm/{protocol-BekUePpu.js → protocol-CsYQJXY2.js} +20 -276
- package/dist/phirepass-widgets/{p-9e6f9220.entry.js → p-7ea2fdbc.entry.js} +5 -5
- package/dist/phirepass-widgets/p-BVOulYtW.js +3 -0
- package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
- package/dist/phirepass-widgets/p-c1c616ca.entry.js +1 -0
- package/dist/phirepass-widgets/p-f1bc04a8.entry.js +1 -0
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/channel.d.ts +0 -30
- package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +0 -10
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +0 -30
- package/dist/types/components.d.ts +34 -434
- package/package.json +4 -18
- package/dist/cjs/phirepass-downloader_3.cjs.entry.js +0 -3823
- package/dist/collection/common/fetch.js +0 -44
- package/dist/collection/components/phirepass-downloader/form.js +0 -69
- package/dist/collection/components/phirepass-downloader/format.js +0 -105
- package/dist/collection/components/phirepass-downloader/jobs.js +0 -393
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +0 -1109
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +0 -1466
- package/dist/collection/components/phirepass-downloader/source.js +0 -120
- package/dist/collection/components/phirepass-downloader/views/dialogs.js +0 -34
- package/dist/collection/components/phirepass-downloader/views/fetch-form.js +0 -65
- package/dist/collection/components/phirepass-downloader/views/icons.js +0 -34
- package/dist/collection/components/phirepass-downloader/views/job-row.js +0 -91
- package/dist/collection/components/phirepass-downloader/views/notices.js +0 -15
- package/dist/collection/components/phirepass-downloader/views/states.js +0 -19
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +0 -225
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +0 -549
- package/dist/collection/components/phirepass-media-player/player.js +0 -118
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +0 -35
- package/dist/collection/testing/fixtures.js +0 -219
- package/dist/collection/testing/mock-channel.js +0 -410
- package/dist/components/p-B4kFfbHE.js +0 -1
- package/dist/components/p-BekUePpu.js +0 -1
- package/dist/components/p-DIf-Ru26.js +0 -1
- package/dist/components/phirepass-downloader.d.ts +0 -11
- package/dist/components/phirepass-downloader.js +0 -1
- package/dist/components/phirepass-media-player.d.ts +0 -11
- package/dist/components/phirepass-media-player.js +0 -1
- package/dist/esm/phirepass-downloader_3.entry.js +0 -3819
- package/dist/phirepass-widgets/p-6a192c8d.entry.js +0 -1
- package/dist/phirepass-widgets/p-BekUePpu.js +0 -1
- package/dist/phirepass-widgets/p-BinptKL7.js +0 -3
- package/dist/phirepass-widgets/p-fe1ce8da.entry.js +0 -1
- package/dist/types/common/fetch.d.ts +0 -167
- package/dist/types/components/phirepass-downloader/form.d.ts +0 -54
- package/dist/types/components/phirepass-downloader/format.d.ts +0 -17
- package/dist/types/components/phirepass-downloader/jobs.d.ts +0 -123
- package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +0 -238
- package/dist/types/components/phirepass-downloader/source.d.ts +0 -61
- package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +0 -52
- package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +0 -31
- package/dist/types/components/phirepass-downloader/views/icons.d.ts +0 -5
- package/dist/types/components/phirepass-downloader/views/job-row.d.ts +0 -21
- package/dist/types/components/phirepass-downloader/views/notices.d.ts +0 -18
- package/dist/types/components/phirepass-downloader/views/states.d.ts +0 -38
- package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +0 -82
- package/dist/types/components/phirepass-media-player/player.d.ts +0 -53
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +0 -40
- package/dist/types/testing/fixtures.d.ts +0 -25
- package/dist/types/testing/mock-channel.d.ts +0 -132
package/README.md
CHANGED
|
@@ -7,12 +7,8 @@ Framework-agnostic web components for PhirePass, built with Stencil:
|
|
|
7
7
|
| Element | What it is |
|
|
8
8
|
|---|---|
|
|
9
9
|
| `<phirepass-terminal>` | SSH terminal (xterm.js) |
|
|
10
|
-
| `<phirepass-sftp-client>` | SFTP browser
|
|
10
|
+
| `<phirepass-sftp-client>` | SFTP browser |
|
|
11
11
|
| `<phirepass-rdp>` | RDP client |
|
|
12
|
-
| `<phirepass-downloader>` | Remote Fetch: the node downloads links, magnets and `.torrent` files into its own folder. `compact` for the drawer inside the SFTP browser, standalone otherwise |
|
|
13
|
-
| `<phirepass-media-player>` | Plays a file from the node with the browser's own `<video>`/`<audio>` (resume position, cast) |
|
|
14
|
-
|
|
15
|
-
Every component takes a `channelFactory` (or the downloader an injected `channel`), which is how the stories and tests run without a server. The downloader hides itself (and the SFTP browser hides Fetch) until `phirepass-channel` exposes the `send_download_*` methods.
|
|
16
12
|
|
|
17
13
|
## Development
|
|
18
14
|
|
|
@@ -21,17 +17,10 @@ Bun is the package manager / script runner (version pinned in `.bun-version`); N
|
|
|
21
17
|
```bash
|
|
22
18
|
bun install # install deps (bun.lock)
|
|
23
19
|
bun start # stencil dev server
|
|
24
|
-
bun run storybook # stencil build, then Storybook on :6006
|
|
25
20
|
bun run test # spec tests (vitest, Stencil environment)
|
|
26
|
-
bun run test:storybook # every story's play function in headless Chromium
|
|
27
|
-
bun run test:all # both
|
|
28
21
|
bun run build # production build
|
|
29
22
|
```
|
|
30
23
|
|
|
31
|
-
`bun run test:storybook` needs Chromium once: `bunx playwright install chromium`.
|
|
32
|
-
|
|
33
|
-
Stories live in `stories/`: one file per existing widget and one per Remote Fetch screen group (`stories/remote-fetch/1-sftp` … `9-notices`). Each screen is its own story, and its `play` function is its test. The mock channel (`src/testing/mock-channel.ts`) and fixtures (`src/testing/fixtures.ts`) are shared by stories and specs.
|
|
34
|
-
|
|
35
24
|
---
|
|
36
25
|
|
|
37
26
|
# Stencil Component Starter
|
|
@@ -140,7 +140,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
140
140
|
var styles = /* @__PURE__ */ new Map();
|
|
141
141
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
142
142
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
143
|
-
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
144
143
|
var MAX_LAZY_LOAD_RETRIES = 3;
|
|
145
144
|
var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
|
|
146
145
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -418,13 +417,6 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
418
417
|
}
|
|
419
418
|
}
|
|
420
419
|
}
|
|
421
|
-
if (typeof nodeName === "function") {
|
|
422
|
-
return nodeName(
|
|
423
|
-
vnodeData === null ? {} : vnodeData,
|
|
424
|
-
vNodeChildren,
|
|
425
|
-
vdomFnUtils
|
|
426
|
-
);
|
|
427
|
-
}
|
|
428
420
|
const vnode = newVNode(nodeName, null);
|
|
429
421
|
vnode.$attrs$ = vnodeData;
|
|
430
422
|
if (vNodeChildren.length > 0) {
|
|
@@ -454,36 +446,6 @@ var newVNode = (tag, text) => {
|
|
|
454
446
|
};
|
|
455
447
|
var Host = {};
|
|
456
448
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
457
|
-
var vdomFnUtils = {
|
|
458
|
-
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
459
|
-
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
460
|
-
};
|
|
461
|
-
var convertToPublic = (node) => ({
|
|
462
|
-
vattrs: node.$attrs$,
|
|
463
|
-
vchildren: node.$children$,
|
|
464
|
-
vkey: node.$key$,
|
|
465
|
-
vname: node.$name$,
|
|
466
|
-
vtag: node.$tag$,
|
|
467
|
-
vtext: node.$text$
|
|
468
|
-
});
|
|
469
|
-
var convertToPrivate = (node) => {
|
|
470
|
-
if (typeof node.vtag === "function") {
|
|
471
|
-
const vnodeData = { ...node.vattrs };
|
|
472
|
-
if (node.vkey) {
|
|
473
|
-
vnodeData.key = node.vkey;
|
|
474
|
-
}
|
|
475
|
-
if (node.vname) {
|
|
476
|
-
vnodeData.name = node.vname;
|
|
477
|
-
}
|
|
478
|
-
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
479
|
-
}
|
|
480
|
-
const vnode = newVNode(node.vtag, node.vtext);
|
|
481
|
-
vnode.$attrs$ = node.vattrs;
|
|
482
|
-
vnode.$children$ = node.vchildren;
|
|
483
|
-
vnode.$key$ = node.vkey;
|
|
484
|
-
vnode.$name$ = node.vname;
|
|
485
|
-
return vnode;
|
|
486
|
-
};
|
|
487
449
|
|
|
488
450
|
// src/runtime/normalize-watchers.ts
|
|
489
451
|
var normalizeWatchers = (raw) => {
|
|
@@ -661,26 +623,15 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
661
623
|
} catch (e) {
|
|
662
624
|
}
|
|
663
625
|
}
|
|
664
|
-
let xlink = false;
|
|
665
|
-
{
|
|
666
|
-
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
667
|
-
memberName = ln;
|
|
668
|
-
xlink = true;
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
626
|
if (newValue == null || newValue === false) {
|
|
672
627
|
if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
|
|
673
|
-
|
|
674
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
675
|
-
} else {
|
|
628
|
+
{
|
|
676
629
|
elm.removeAttribute(memberName);
|
|
677
630
|
}
|
|
678
631
|
}
|
|
679
632
|
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
680
633
|
newValue = newValue === true ? "" : newValue;
|
|
681
|
-
|
|
682
|
-
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
683
|
-
} else {
|
|
634
|
+
{
|
|
684
635
|
elm.setAttribute(memberName, newValue);
|
|
685
636
|
}
|
|
686
637
|
}
|
|
@@ -1006,14 +957,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1006
957
|
const isHostElement = isHost(renderFnResults);
|
|
1007
958
|
const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);
|
|
1008
959
|
hostTagName = hostElm.tagName;
|
|
1009
|
-
if (cmpMeta.$attrsToReflect$) {
|
|
1010
|
-
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1011
|
-
cmpMeta.$attrsToReflect$.forEach(([propName, attribute]) => {
|
|
1012
|
-
{
|
|
1013
|
-
rootVnode.$attrs$[attribute] = hostElm[propName];
|
|
1014
|
-
}
|
|
1015
|
-
});
|
|
1016
|
-
}
|
|
1017
960
|
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1018
961
|
for (const key of Object.keys(rootVnode.$attrs$)) {
|
|
1019
962
|
if (hostElm.hasAttribute(key) && !["key", "ref", "style", "class"].includes(key)) {
|
|
@@ -1254,9 +1197,6 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
1254
1197
|
}
|
|
1255
1198
|
}
|
|
1256
1199
|
};
|
|
1257
|
-
|
|
1258
|
-
// src/runtime/proxy-component.ts
|
|
1259
|
-
var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
|
|
1260
1200
|
var replayPendingSetterValues = (hostRef, cmpMeta) => {
|
|
1261
1201
|
var _a;
|
|
1262
1202
|
const instance = hostRef.$lazyInstance$;
|
|
@@ -1392,11 +1332,6 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1392
1332
|
const propFlags = members.find(([m]) => m === propName);
|
|
1393
1333
|
const propMemberFlags = propFlags ? propFlags[1][0] : 0;
|
|
1394
1334
|
const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
|
|
1395
|
-
if (propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
|
|
1396
|
-
// one is always external
|
|
1397
|
-
!isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
|
|
1398
|
-
return;
|
|
1399
|
-
}
|
|
1400
1335
|
const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
|
|
1401
1336
|
if (isBooleanTarget) {
|
|
1402
1337
|
newValue = newValue === null || newValue === "false" && true ? false : true;
|
|
@@ -1412,12 +1347,8 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1412
1347
|
/* @__PURE__ */ new Set([
|
|
1413
1348
|
...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
|
|
1414
1349
|
...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
|
|
1415
|
-
var _a2;
|
|
1416
1350
|
const attrName = m[1] || propName;
|
|
1417
1351
|
attrNameToPropName.set(attrName, propName);
|
|
1418
|
-
if (m[0] & 512 /* ReflectAttr */) {
|
|
1419
|
-
(_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);
|
|
1420
|
-
}
|
|
1421
1352
|
return attrName;
|
|
1422
1353
|
})
|
|
1423
1354
|
])
|
|
@@ -1621,9 +1552,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1621
1552
|
{
|
|
1622
1553
|
cmpMeta.$members$ = compactMeta[2];
|
|
1623
1554
|
}
|
|
1624
|
-
{
|
|
1625
|
-
cmpMeta.$attrsToReflect$ = [];
|
|
1626
|
-
}
|
|
1627
1555
|
{
|
|
1628
1556
|
cmpMeta.$watchers$ = normalizeWatchers(compactMeta[4]);
|
|
1629
1557
|
cmpMeta.$serializers$ = (_a2 = compactMeta[5]) != null ? _a2 : {};
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-C3v5xmUo.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["phirepass-rdp.cjs",[[769,"phirepass-rdp",{"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"username":[1],"password":[1],"destination":[1],"scale":[1],"dynamicResize":[4,"dynamic-resize"],"captureKeyboard":[4,"capture-keyboard"],"clipboard":[4],"serverId":[1,"server-id"],"
|
|
9
|
+
return index.bootstrapLazy([["phirepass-rdp.cjs",[[769,"phirepass-rdp",{"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"username":[1],"password":[1],"destination":[1],"scale":[1],"dynamicResize":[4,"dynamic-resize"],"captureKeyboard":[4,"capture-keyboard"],"clipboard":[4],"serverId":[1,"server-id"],"credentialsPrompt":[32],"statusMessage":[32],"toggleFullscreen":[64],"keyboardLockSupported":[64],"focusDesktop":[64],"sendCtrlAltDel":[64],"sendMetaKey":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-sftp-client.cjs",[[513,"phirepass-sftp-client",{"name":[1],"description":[1],"hideHeader":[4,"hide-header"],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"serverId":[1,"server-id"],"channelFactory":[16],"max":[32],"show_login_screen":[32],"show_login_screen_username":[32],"show_error":[32],"error_message":[32],"show_login_screen_password":[32],"show_navigation":[32],"breadcrumbs":[32],"current_dir":[32],"listing":[32],"show_content":[32],"show_loader":[32],"version":[32],"status":[32],"selected_item":[32],"show_upload_modal":[32],"upload_progress":[32],"upload_file_name":[32],"upload_speed":[32],"upload_finished":[32],"show_download_modal":[32],"download_progress":[32],"download_file_name":[32],"download_speed":[32],"download_finished":[32],"show_delete_modal":[32],"delete_file_name":[32],"delete_loading":[32],"delete_is_dir":[32],"delete_recursive":[32],"delete_error":[32],"prompt_kind":[32],"prompt_value":[32],"prompt_error":[32],"prompt_busy":[32],"chmod_target":[32],"chmod_mode":[32],"chmod_error":[32],"chmod_busy":[32],"show_editor":[32],"editor_name":[32],"editor_text":[32],"editor_saved_text":[32],"editor_busy":[32],"editor_error":[32],"editor_confirm_discard":[32],"editor_loaded":[32],"filter":[32],"sort_key":[32],"sort_asc":[32],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal.cjs",[[513,"phirepass-terminal",{"terminalOptions":[16],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"keyBar":[1,"key-bar"],"serverId":[1,"server-id"],"channelFactory":[16],"ctrlArmed":[32],"altArmed":[32]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var protocol = require('./protocol-
|
|
3
|
+
var index = require('./index-C3v5xmUo.js');
|
|
4
|
+
var protocol = require('./protocol-DCBMfc2u.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* RDP's display-control PDU describes a monitor in whole, even pixels within
|
|
@@ -319,12 +319,6 @@ const PhirepassRdp = class {
|
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
serverId;
|
|
322
|
-
/**
|
|
323
|
-
* Supplies the channel instead of a WebSocket to the server — for demos,
|
|
324
|
-
* screenshots and tests, as on the terminal and SFTP client. A property
|
|
325
|
-
* only; read once, when the widget connects.
|
|
326
|
-
*/
|
|
327
|
-
channelFactory;
|
|
328
322
|
onServerIdChange(_newValue, _oldValue) {
|
|
329
323
|
this.onNodeIdChange(this.nodeId, this.nodeId);
|
|
330
324
|
}
|
|
@@ -344,9 +338,7 @@ const PhirepassRdp = class {
|
|
|
344
338
|
// A widget can be moved in the DOM rather than destroyed, which
|
|
345
339
|
// disconnects and reconnects it; the second life is a real one.
|
|
346
340
|
this.disposed = false;
|
|
347
|
-
|
|
348
|
-
await protocol.__wbg_init();
|
|
349
|
-
}
|
|
341
|
+
await protocol.__wbg_init();
|
|
350
342
|
this.open_comms();
|
|
351
343
|
this.runtimeReady = true;
|
|
352
344
|
if (!this.nodeId) {
|
|
@@ -442,10 +434,7 @@ const PhirepassRdp = class {
|
|
|
442
434
|
this.channel.connect();
|
|
443
435
|
}
|
|
444
436
|
open_comms() {
|
|
445
|
-
if (this.
|
|
446
|
-
this.channel = this.channelFactory(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId, this.serverId || undefined);
|
|
447
|
-
}
|
|
448
|
-
else if (this.serverId) {
|
|
437
|
+
if (this.serverId) {
|
|
449
438
|
this.channel = new protocol.Channel(`${this.create_web_socket_endpoint()}/api/web/ws`, this.nodeId, this.serverId);
|
|
450
439
|
}
|
|
451
440
|
else {
|
|
@@ -764,7 +753,7 @@ const PhirepassRdp = class {
|
|
|
764
753
|
this.request_tunnel();
|
|
765
754
|
}
|
|
766
755
|
render() {
|
|
767
|
-
return (index.h(index.Host, { key: '
|
|
756
|
+
return (index.h(index.Host, { key: '56354df7bd0d3f01fcd5ff65ca5618ceb6af1b91' }, index.h("div", { key: '446dc83e41a29c3bc2c341a26092ed3581565967', class: "screen", ref: (el) => (this.containerEl = el) }, index.h("slot", { key: '2beafc92d81662dfac5c7b41356f6c6c802643b9' })), this.credentialsPrompt && (index.h("form", { key: 'dcc29b21fba03bb97526ec3d1cf5a1fb51b483e9', class: "prompt", onSubmit: (event) => this.submit_credentials(event) }, index.h("label", { key: 'b5a3e302089b2282aedbdbefd4fb5eaca7c34455', htmlFor: "rdp-username" }, "Username"), index.h("input", { key: '3bd1c902a6bc41bc7e69c16258cac78035a949bd', id: "rdp-username", type: "text", autocomplete: "off", autofocus: true, onInput: (event) => (this.usernameBuffer = event.target.value) }), index.h("label", { key: '2defe12d73b609cbad27c06447c3c3221ff3e5aa', htmlFor: "rdp-password" }, "Password"), index.h("input", { key: '55935891f24f0c1db71a14c42b2fc7a96c0c0ba6', id: "rdp-password", type: "password", autocomplete: "off", onInput: (event) => (this.passwordBuffer = event.target.value) }), index.h("button", { key: '83439c0e8756001c7042fc3b6754889d62a8eada', type: "submit" }, "Connect"))), this.statusMessage && !this.credentialsPrompt && (index.h("div", { key: '294262625f44a3f45d54bcd492875a9b6fd03219', class: "status" }, this.statusMessage))));
|
|
768
757
|
}
|
|
769
758
|
static get watchers() { return {
|
|
770
759
|
"nodeId": [{
|