phirepass-widgets 0.0.46 → 0.0.47
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/dist/cjs/{index-DTAHGGCM.js → index-BiurVooY.js} +58 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +186 -20
- package/dist/cjs/phirepass-terminal.cjs.entry.js +3 -3
- package/dist/cjs/phirepass-widgets.cjs.js +2 -2
- package/dist/cjs/{protocol-C0YjPrve.js → protocol-BDROfN76.js} +2 -1
- package/dist/collection/common/protocol.js +1 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.chevron.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +421 -119
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.file.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.folder.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.go_up.svg +6 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +190 -19
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.refresh.svg +8 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.upload.svg +7 -0
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/{phirepass-widgets/p-rdgKcesn.js → components/p-BcIhGXR0.js} +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +2 -2
- package/dist/esm/{index-D6RLmr6w.js → index-zZMsduaU.js} +58 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-sftp-client.entry.js +186 -20
- package/dist/esm/phirepass-terminal.entry.js +3 -3
- package/dist/esm/phirepass-widgets.js +3 -3
- package/dist/esm/{protocol-rdgKcesn.js → protocol-BcIhGXR0.js} +1 -0
- package/dist/phirepass-widgets/p-32ca8ca5.entry.js +1 -0
- package/dist/phirepass-widgets/{p-f8e6ba02.entry.js → p-5b21bc31.entry.js} +5 -5
- package/dist/{components/p-rdgKcesn.js → phirepass-widgets/p-BcIhGXR0.js} +1 -1
- package/dist/phirepass-widgets/p-zZMsduaU.js +2 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/protocol.d.ts +37 -13
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +27 -1
- package/package.json +1 -1
- package/dist/phirepass-widgets/p-5e9ce2ac.entry.js +0 -1
- package/dist/phirepass-widgets/p-D6RLmr6w.js +0 -2
|
@@ -392,6 +392,13 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
+
if (typeof nodeName === "function") {
|
|
396
|
+
return nodeName(
|
|
397
|
+
vnodeData === null ? {} : vnodeData,
|
|
398
|
+
vNodeChildren,
|
|
399
|
+
vdomFnUtils
|
|
400
|
+
);
|
|
401
|
+
}
|
|
395
402
|
const vnode = newVNode(nodeName, null);
|
|
396
403
|
vnode.$attrs$ = vnodeData;
|
|
397
404
|
if (vNodeChildren.length > 0) {
|
|
@@ -421,6 +428,36 @@ var newVNode = (tag, text) => {
|
|
|
421
428
|
};
|
|
422
429
|
var Host = {};
|
|
423
430
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
431
|
+
var vdomFnUtils = {
|
|
432
|
+
forEach: (children, cb) => children.map(convertToPublic).forEach(cb),
|
|
433
|
+
map: (children, cb) => children.map(convertToPublic).map(cb).map(convertToPrivate)
|
|
434
|
+
};
|
|
435
|
+
var convertToPublic = (node) => ({
|
|
436
|
+
vattrs: node.$attrs$,
|
|
437
|
+
vchildren: node.$children$,
|
|
438
|
+
vkey: node.$key$,
|
|
439
|
+
vname: node.$name$,
|
|
440
|
+
vtag: node.$tag$,
|
|
441
|
+
vtext: node.$text$
|
|
442
|
+
});
|
|
443
|
+
var convertToPrivate = (node) => {
|
|
444
|
+
if (typeof node.vtag === "function") {
|
|
445
|
+
const vnodeData = { ...node.vattrs };
|
|
446
|
+
if (node.vkey) {
|
|
447
|
+
vnodeData.key = node.vkey;
|
|
448
|
+
}
|
|
449
|
+
if (node.vname) {
|
|
450
|
+
vnodeData.name = node.vname;
|
|
451
|
+
}
|
|
452
|
+
return h(node.vtag, vnodeData, ...node.vchildren || []);
|
|
453
|
+
}
|
|
454
|
+
const vnode = newVNode(node.vtag, node.vtext);
|
|
455
|
+
vnode.$attrs$ = node.vattrs;
|
|
456
|
+
vnode.$children$ = node.vchildren;
|
|
457
|
+
vnode.$key$ = node.vkey;
|
|
458
|
+
vnode.$name$ = node.vname;
|
|
459
|
+
return vnode;
|
|
460
|
+
};
|
|
424
461
|
|
|
425
462
|
// src/runtime/normalize-watchers.ts
|
|
426
463
|
var normalizeWatchers = (raw) => {
|
|
@@ -503,6 +540,27 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
503
540
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
504
541
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
505
542
|
}
|
|
543
|
+
} else if (memberName === "style") {
|
|
544
|
+
{
|
|
545
|
+
for (const prop in oldValue) {
|
|
546
|
+
if (!newValue || newValue[prop] == null) {
|
|
547
|
+
if (prop.includes("-")) {
|
|
548
|
+
elm.style.removeProperty(prop);
|
|
549
|
+
} else {
|
|
550
|
+
elm.style[prop] = "";
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
for (const prop in newValue) {
|
|
556
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
557
|
+
if (prop.includes("-")) {
|
|
558
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
559
|
+
} else {
|
|
560
|
+
elm.style[prop] = newValue[prop];
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
506
564
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
507
565
|
if (newValue) {
|
|
508
566
|
queueRefAttachment(newValue, elm);
|
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-BiurVooY.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-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"],"token":[1],"serverId":[1,"server-id"],"max":[32],"show_login_screen":[32],"show_login_screen_username":[32],"show_login_screen_password":[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"],"token":[1],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
|
|
9
|
+
return index.bootstrapLazy([["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"],"token":[1],"serverId":[1,"server-id"],"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],"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"],"token":[1],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var protocol = require('./protocol-
|
|
3
|
+
var index = require('./index-BiurVooY.js');
|
|
4
|
+
var protocol = require('./protocol-BDROfN76.js');
|
|
5
5
|
|
|
6
6
|
const phirepassSftpClientLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==';
|
|
7
7
|
|
|
8
8
|
const phirepassSftpClientMaxSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTE1LCAxMjMsIDE0MCkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtbWF4aW1pemUyIHctMyBoLTMiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iMTUgMyAyMSAzIDIxIDkiPjwvcG9seWxpbmU+CiAgICA8cG9seWxpbmUgcG9pbnRzPSI5IDIxIDMgMjEgMyAxNSI+PC9wb2x5bGluZT4KICAgIDxsaW5lIHgxPSIyMSIgeDI9IjE0IiB5MT0iMyIgeTI9IjEwIj48L2xpbmU+CiAgICA8bGluZSB4MT0iMyIgeDI9IjEwIiB5MT0iMjEiIHkyPSIxNCI+PC9saW5lPgo8L3N2Zz4K';
|
|
9
9
|
|
|
10
|
-
const
|
|
10
|
+
const phirepassSftpClientChevronSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogICAgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIKICAgIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNoZXZyb24tcmlnaHQgdy0zIGgtMyB0ZXh0LW11dGVkLWZvcmVncm91bmQvNTAgc2hyaW5rLTAiPgogICAgPHBhdGggZD0ibTkgMTggNi02LTYtNiI+PC9wYXRoPgo8L3N2Zz4K';
|
|
11
|
+
|
|
12
|
+
const phirepassSftpClientFolderSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1mb2xkZXIgdy0zLjUgaC0zLjUgdGV4dC1wcmltYXJ5IHNocmluay0wIj4KICAgIDxwYXRoCiAgICAgICAgZD0iTTIwIDIwYTIgMiAwIDAgMCAyLTJWOGEyIDIgMCAwIDAtMi0yaC03LjlhMiAyIDAgMCAxLTEuNjktLjlMOS42IDMuOUEyIDIgMCAwIDAgNy45MyAzSDRhMiAyIDAgMCAwLTIgMnYxM2EyIDIgMCAwIDAgMiAyWiI+PC9wYXRoPgo8L3N2Zz4K';
|
|
13
|
+
|
|
14
|
+
const phirepassSftpClientFileSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTE1LCAxMjMsIDE0MCkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtZmlsZSB3LTMuNSBoLTMuNSB0ZXh0LW11dGVkLWZvcmVncm91bmQgc2hyaW5rLTAiPgogICAgPHBhdGggZD0iTTE1IDJINmEyIDIgMCAwIDAtMiAydjE2YTIgMiAwIDAgMCAyIDJoMTJhMiAyIDAgMCAwIDItMlY3WiI+PC9wYXRoPgogICAgPHBhdGggZD0iTTE0IDJ2NGEyIDIgMCAwIDAgMiAyaDQiPjwvcGF0aD4KPC9zdmc+Cg==';
|
|
15
|
+
|
|
16
|
+
const phirepassSftpClientGoUpSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtYXJyb3ctdXAgdy0zLjUgaC0zLjUiPgogICAgPHBhdGggZD0ibTUgMTIgNy03IDcgNyI+PC9wYXRoPgogICAgPHBhdGggZD0iTTEyIDE5VjUiPjwvcGF0aD4KPC9zdmc+Cg==';
|
|
17
|
+
|
|
18
|
+
const phirepassSftpClientRefreshSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtcmVmcmVzaC1jdyB3LTMuNSBoLTMuNSI+CiAgICA8cGF0aCBkPSJNMyAxMmE5IDkgMCAwIDEgOS05IDkuNzUgOS43NSAwIDAgMSA2Ljc0IDIuNzRMMjEgOCI+PC9wYXRoPgogICAgPHBhdGggZD0iTTIxIDN2NWgtNSI+PC9wYXRoPgogICAgPHBhdGggZD0iTTIxIDEyYTkgOSAwIDAgMS05IDkgOS43NSA5Ljc1IDAgMCAxLTYuNzQtMi43NEwzIDE2Ij48L3BhdGg+CiAgICA8cGF0aCBkPSJNOCAxNkgzdjUiPjwvcGF0aD4KPC9zdmc+Cg==';
|
|
19
|
+
|
|
20
|
+
const phirepassSftpClientUploadSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtdXBsb2FkIHctMy41IGgtMy41Ij4KICAgIDxwYXRoIGQ9Ik0yMSAxNXY0YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi00Ij48L3BhdGg+CiAgICA8cG9seWxpbmUgcG9pbnRzPSIxNyA4IDEyIDMgNyA4Ij48L3BvbHlsaW5lPgogICAgPGxpbmUgeDE9IjEyIiB4Mj0iMTIiIHkxPSIzIiB5Mj0iMTUiPjwvbGluZT4KPC9zdmc+Cg==';
|
|
21
|
+
|
|
22
|
+
const phirepassSftpClientCss = () => `:host{--radius:0.375rem;--card:220 18% 10%;--border:220 15% 18%;--primary:160 60% 45%;--radius:0.375rem;--destructive:0 70% 50%;--muted:220 15% 13%;--muted-foreground:220 10% 50%;--primary-foreground:220 20% 7%;--scroll-track:220 16% 12%;--scroll-thumb:220 12% 34%;--scroll-thumb-hover:160 45% 44%;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace;height:100%;width:100%;border:1px solid hsl(var(--border));background-color:hsl(var(--card));border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;position:relative;.listing{flex:1;display:flex;flex-direction:column;justify-content:space-between;min-height:0;header{height:30px;background:rgba(28, 31, 38, 0.6);border-bottom:1px solid hsl(var(--border));display:flex;align-items:center;justify-content:space-between;.actions{display:flex;align-items:center;.action{cursor:pointer;padding:4px;display:flex;align-items:center;z-index:1;img{height:14px;padding:4px;border-radius:4px}&:hover{background-color:hsl(var(--border) / 0.6)}}}.title{color:hsl(var(--primary));height:14px;padding:0 12px;display:flex;align-items:center;font-size:0.75rem;line-height:1rem;img{height:14px;margin-right:5px}.text{display:flex;flex-direction:row;justify-content:center;margin-top:2px;.name{margin-right:10px}.description{color:hsl(var(--muted-foreground))}}}}main{flex:1;display:flex;flex-direction:column;position:relative;min-height:0;overflow:hidden;.loader{color:hsl(var(--muted-foreground));font-size:13px;animation:pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;text-align:center;display:flex;align-items:center;justify-content:center;position:absolute;height:100%;width:100%;background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px)}.error{font-size:13px;text-align:center;color:hsl(var(--destructive));height:100%;display:flex;align-items:center;justify-content:center}.navigation{height:25px;padding:10px;font-size:0.75rem;line-height:1rem;background-color:hsl(var(--card));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid hsl(var(--border));position:sticky;top:0;z-index:3;.breadcrumbs{display:flex;align-items:center;margin-right:10px;.breadcrumb{color:hsl(var(--primary));margin-right:4px;cursor:pointer;&:after{margin-left:4px}&:hover{color:rgb(189, 219, 209)}&:last-child{margin-right:0;color:rgb(189, 219, 209);cursor:default}}.arrow{height:12px;width:12px;opacity:0.6;top:2px;margin-right:4px;position:relative}}.actions{display:flex;align-items:center;gap:8px}.action{border:none;background:transparent;color:rgb(189, 219, 209);font-size:1.1rem;line-height:1;padding:2px 4px;border-radius:4px;cursor:pointer;&:hover{background-color:hsl(var(--border) / 0.6)}img{height:14px;width:14px;display:block}}.action.disconnect{color:#ff4d5f;font-size:0.65rem;letter-spacing:0.08em;padding:4px 8px;&:hover{color:#ff6b7a;background-color:hsl(var(--destructive) / 0.12)}}}.content{flex:1;min-height:0;overflow:auto;font-size:0.75rem;line-height:1rem;scrollbar-width:thin;scrollbar-color:hsl(var(--scroll-thumb)) hsl(var(--scroll-track));&::-webkit-scrollbar{width:10px;height:10px}&::-webkit-scrollbar-track{background:hsl(var(--scroll-track))}&::-webkit-scrollbar-thumb{background:hsl(var(--scroll-thumb));border-radius:999px;border:2px solid hsl(var(--scroll-track))}&::-webkit-scrollbar-thumb:hover{background:hsl(var(--scroll-thumb-hover))}table{width:100%;border-collapse:separate;border-spacing:0;thead{background-color:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));th{padding:8px 10px;text-align:left;color:hsl(var(--muted-foreground));position:sticky;top:0;z-index:2;background-color:hsl(var(--muted));border-bottom:1px solid hsl(var(--border));line-height:0.95rem}}tbody{padding:10px 10px;tr{border-bottom:1px solid hsl(var(--border) / 0.4);td{padding:10px 10px 9px;color:hsl(var(--muted-foreground));.name{&.file{color:rgb(189, 219, 209)}&.folder{color:hsl(var(--primary))}}.kind{height:14px;width:14px;margin-right:5px;top:3px;position:relative}}&:hover{cursor:pointer;background-color:hsl(var(--muted) / 0.4)}&.selected{background-color:hsl(var(--primary) / 0.3);&:hover{background-color:hsl(var(--primary) / 0.4)}}}}}}}footer{height:25px;background:rgba(28, 31, 38, 0.6);border-top:1px solid hsl(var(--border));font-size:0.75rem;line-height:1rem;display:flex;align-items:center;justify-content:space-between;padding:0 10px;.status{font-size:0.65rem;color:hsl(var(--muted-foreground));.selected-item{margin-left:10px;color:hsl(var(--primary))}}.version{font-size:0.65rem;color:hsl(var(--muted-foreground))}}}.creds{position:absolute;top:0;left:0;height:100%;width:100%;display:flex;justify-content:center;align-items:center;;&.blurred{background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px)}.auth{display:flex;flex-direction:column;background:hsl(var(--card));position:relative;background-color:rgba(21, 24, 30, 0.95);border:1px solid hsl(var(--border));padding:30px;box-shadow:rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.5) 0px 25px 50px -12px;border-radius:var(--radius);.title{margin-bottom:12px;color:hsl(var(--primary))}label{font-size:0.75rem;line-height:1rem;margin-bottom:1rem;color:hsl(var(--muted-foreground))}input{font-size:0.875rem;line-height:1.25rem;padding-top:0.5rem;padding-bottom:0.5rem;padding-left:0.75rem;padding-right:0.75rem;background-color:rgb(28, 31, 38);border-color:rgb(39, 44, 53);border-width:1px;border-radius:calc(var(--radius) - 2px);width:100%;margin-bottom:12px;color:rgb(189, 219, 209);box-sizing:border-box;&:focus{outline:none;border-color:hsl(var(--primary));box-shadow:0 0 0 1px hsl(var(--primary))}}button[type='submit']{margin-top:12px;width:100%;background-color:hsl(var(--primary));color:hsl(var(--primary-foreground));letter-spacing:0.05em;font-size:13px;font-weight:500;padding:0.5rem 1rem;border-radius:calc(var(--radius) - 2px);height:2rem;cursor:pointer;border:none;&:hover{background-color:hsl(var(--primary) / 0.9)}}}}}:host(.max){height:100vh;width:100vw;position:fixed;top:0;left:0;z-index:9999}`;
|
|
11
23
|
|
|
12
24
|
const PhirepassSftpClient = class {
|
|
13
25
|
constructor(hostRef) {
|
|
@@ -19,8 +31,9 @@ const PhirepassSftpClient = class {
|
|
|
19
31
|
domReady = false;
|
|
20
32
|
runtimeReady = false;
|
|
21
33
|
connected = false;
|
|
34
|
+
uploadInputEl;
|
|
22
35
|
// private inputMode: InputMode = InputMode.Default;
|
|
23
|
-
|
|
36
|
+
session_id;
|
|
24
37
|
// private usernameBuffer = "";
|
|
25
38
|
// private passwordBuffer = "";
|
|
26
39
|
name = 'SFTP';
|
|
@@ -46,6 +59,7 @@ const PhirepassSftpClient = class {
|
|
|
46
59
|
if (newValue) {
|
|
47
60
|
this.open_comms();
|
|
48
61
|
this.channel.connect();
|
|
62
|
+
this.status = 'Connecting...';
|
|
49
63
|
}
|
|
50
64
|
}
|
|
51
65
|
serverId;
|
|
@@ -63,7 +77,18 @@ const PhirepassSftpClient = class {
|
|
|
63
77
|
max = false;
|
|
64
78
|
show_login_screen = false;
|
|
65
79
|
show_login_screen_username = false;
|
|
80
|
+
show_error = false;
|
|
81
|
+
error_message = '';
|
|
66
82
|
show_login_screen_password = false;
|
|
83
|
+
show_navigation = false;
|
|
84
|
+
breadcrumbs = [];
|
|
85
|
+
current_dir = '.';
|
|
86
|
+
listing = [];
|
|
87
|
+
show_content = false;
|
|
88
|
+
show_loader = false;
|
|
89
|
+
version = '';
|
|
90
|
+
status = 'Disconnected';
|
|
91
|
+
selected_item = null;
|
|
67
92
|
toggle_max() {
|
|
68
93
|
this.maximizeEvent?.emit(!this.max);
|
|
69
94
|
}
|
|
@@ -100,6 +125,7 @@ const PhirepassSftpClient = class {
|
|
|
100
125
|
connect() {
|
|
101
126
|
this.connected = true;
|
|
102
127
|
this.channel.connect();
|
|
128
|
+
this.status = 'Connecting...';
|
|
103
129
|
// const container = this.containerEl;
|
|
104
130
|
// console.log('Attempting to connect terminal to container:', container);
|
|
105
131
|
// if (container) {
|
|
@@ -133,22 +159,63 @@ const PhirepassSftpClient = class {
|
|
|
133
159
|
}
|
|
134
160
|
return `${protocol}://${this.serverHost}:${this.serverPort}`;
|
|
135
161
|
}
|
|
136
|
-
handle_error(
|
|
137
|
-
|
|
162
|
+
handle_error(error) {
|
|
163
|
+
switch (error.kind) {
|
|
164
|
+
case protocol.ErrorType.Generic:
|
|
165
|
+
case protocol.ErrorType.Authentication:
|
|
166
|
+
this.error_message = error.message || 'An unknown error occurred.';
|
|
167
|
+
break;
|
|
168
|
+
case protocol.ErrorType.RequiresUsername:
|
|
169
|
+
this.show_login_screen_username = true;
|
|
170
|
+
this.show_login_screen_password = false;
|
|
171
|
+
this.show_login_screen = true;
|
|
172
|
+
break;
|
|
173
|
+
case protocol.ErrorType.RequiresPassword:
|
|
174
|
+
this.show_login_screen_username = false;
|
|
175
|
+
this.show_login_screen_password = true;
|
|
176
|
+
this.show_login_screen = true;
|
|
177
|
+
break;
|
|
178
|
+
case protocol.ErrorType.RequiresUsernamePassword:
|
|
179
|
+
this.show_login_screen_username = true;
|
|
180
|
+
this.show_login_screen_password = true;
|
|
181
|
+
this.show_login_screen = true;
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
setTimeout(() => {
|
|
185
|
+
this.show_loader = false;
|
|
186
|
+
}, 1_000);
|
|
138
187
|
}
|
|
139
|
-
handle_auth_success(
|
|
188
|
+
handle_auth_success(auth) {
|
|
140
189
|
this.clear_creds_buffer();
|
|
190
|
+
this.version = auth.version;
|
|
141
191
|
this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
|
|
142
192
|
this.channel.open_sftp_tunnel(this.nodeId);
|
|
193
|
+
this.status = 'Connected';
|
|
143
194
|
}
|
|
144
|
-
handle_tunnel_opened(
|
|
145
|
-
|
|
195
|
+
handle_tunnel_opened(web) {
|
|
196
|
+
this.session_id = web.sid;
|
|
146
197
|
// this.terminal.reset();
|
|
147
198
|
// this.fit_terminal_safely();
|
|
148
199
|
// this.send_ssh_terminal_resize();
|
|
200
|
+
this.channel.send_sftp_list_data(this.nodeId, this.session_id, this.current_dir);
|
|
149
201
|
}
|
|
150
|
-
|
|
151
|
-
|
|
202
|
+
handle_sftp_list_items(web) {
|
|
203
|
+
setTimeout(() => {
|
|
204
|
+
this.show_loader = false;
|
|
205
|
+
}, 500);
|
|
206
|
+
this.listing = web.dir.items;
|
|
207
|
+
this.current_dir = web.path;
|
|
208
|
+
this.breadcrumbs = web.path.split('/').map((path, index, arr) => {
|
|
209
|
+
if (path === '' && index === 0) {
|
|
210
|
+
return { label: '/', path: '/' };
|
|
211
|
+
}
|
|
212
|
+
return { label: path, path: arr.slice(0, index + 1).join('/') };
|
|
213
|
+
});
|
|
214
|
+
this.show_content = true;
|
|
215
|
+
this.show_navigation = true;
|
|
216
|
+
}
|
|
217
|
+
handle_tunnel_data(web) {
|
|
218
|
+
console.log('received tunnel data:', web);
|
|
152
219
|
}
|
|
153
220
|
handle_tunnel_closed(_web_) {
|
|
154
221
|
// this.session_id = undefined;
|
|
@@ -168,16 +235,18 @@ const PhirepassSftpClient = class {
|
|
|
168
235
|
this.channel.on_connection_open(() => {
|
|
169
236
|
this.connectionStateChanged.emit([protocol.ConnectionState.Connected]);
|
|
170
237
|
this.channel.authenticate(this.token, this.nodeId);
|
|
238
|
+
this.status = 'Authenticating...';
|
|
171
239
|
});
|
|
172
240
|
this.channel.on_connection_close(() => {
|
|
173
241
|
this.connectionStateChanged.emit([protocol.ConnectionState.Disconnected]);
|
|
174
|
-
|
|
242
|
+
this.status = 'Disconnected';
|
|
175
243
|
});
|
|
176
244
|
this.channel.on_connection_error((err) => {
|
|
177
245
|
this.connectionStateChanged.emit([protocol.ConnectionState.Error, err]);
|
|
246
|
+
this.status = 'Error ' + err.message;
|
|
178
247
|
});
|
|
179
248
|
this.channel.on_connection_message((_raw_) => {
|
|
180
|
-
//
|
|
249
|
+
//
|
|
181
250
|
});
|
|
182
251
|
this.channel.on_protocol_message((msg) => {
|
|
183
252
|
const { web } = msg.data;
|
|
@@ -197,8 +266,11 @@ const PhirepassSftpClient = class {
|
|
|
197
266
|
case protocol.ProtocolMessageType.TunnelData:
|
|
198
267
|
this.handle_tunnel_data(web);
|
|
199
268
|
break;
|
|
269
|
+
case protocol.ProtocolMessageType.SFTPListItems:
|
|
270
|
+
this.handle_sftp_list_items(web);
|
|
271
|
+
break;
|
|
200
272
|
default:
|
|
201
|
-
console.warn('
|
|
273
|
+
console.warn('Unhandled protocol message type:', web);
|
|
202
274
|
}
|
|
203
275
|
});
|
|
204
276
|
}
|
|
@@ -215,15 +287,109 @@ const PhirepassSftpClient = class {
|
|
|
215
287
|
// this.inputMode = InputMode.Default;
|
|
216
288
|
this.clear_creds_buffer();
|
|
217
289
|
}
|
|
290
|
+
list_breadcrumb(path) {
|
|
291
|
+
this.show_loader = true;
|
|
292
|
+
this.selected_item = null;
|
|
293
|
+
this.channel.send_sftp_list_data(this.nodeId, this.session_id, path);
|
|
294
|
+
}
|
|
295
|
+
go_to_parent_directory() {
|
|
296
|
+
if (!this.session_id) {
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (this.current_dir === '/') {
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
const parent = this.breadcrumbs[this.breadcrumbs.length - 2]?.path || '/';
|
|
303
|
+
this.list_breadcrumb(parent);
|
|
304
|
+
}
|
|
305
|
+
refresh_directory() {
|
|
306
|
+
if (!this.session_id) {
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
this.list_breadcrumb(this.current_dir);
|
|
310
|
+
}
|
|
311
|
+
disconnect_session() {
|
|
312
|
+
this.close_comms();
|
|
313
|
+
this.session_id = undefined;
|
|
314
|
+
this.status = 'Disconnected';
|
|
315
|
+
this.show_loader = false;
|
|
316
|
+
}
|
|
317
|
+
open_upload_picker() {
|
|
318
|
+
this.uploadInputEl?.click();
|
|
319
|
+
}
|
|
320
|
+
on_upload_selected(event) {
|
|
321
|
+
const input = event.target;
|
|
322
|
+
const file = input.files?.[0];
|
|
323
|
+
if (!file) {
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
this.show_error = true;
|
|
327
|
+
this.error_message = 'Upload is not available yet in this widget.';
|
|
328
|
+
setTimeout(() => {
|
|
329
|
+
this.show_error = false;
|
|
330
|
+
}, 2_000);
|
|
331
|
+
input.value = '';
|
|
332
|
+
}
|
|
333
|
+
is_selected(item) {
|
|
334
|
+
if (!this.selected_item) {
|
|
335
|
+
return false;
|
|
336
|
+
}
|
|
337
|
+
return this.selected_item.path === item.path &&
|
|
338
|
+
this.selected_item.name === item.name;
|
|
339
|
+
}
|
|
340
|
+
list_directory(entry) {
|
|
341
|
+
if (!this.session_id) {
|
|
342
|
+
console.warn('No active session. Cannot list directory.');
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
if (entry.kind === 'File') {
|
|
346
|
+
console.warn('Cannot list directory of a file. Ignoring click.');
|
|
347
|
+
this.selected_item = entry;
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
const path = [entry.path, entry.name].join('/');
|
|
351
|
+
if (path === this.current_dir) {
|
|
352
|
+
console.warn('Already in this directory. Ignoring click.');
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
this.show_loader = true;
|
|
356
|
+
this.selected_item = null;
|
|
357
|
+
this.channel.send_sftp_list_data(this.nodeId, this.session_id, path);
|
|
358
|
+
}
|
|
359
|
+
get_full_path(item) {
|
|
360
|
+
return [item.path, item.name].join('/');
|
|
361
|
+
}
|
|
218
362
|
render() {
|
|
219
|
-
return (index.h(index.Host, { key: '
|
|
363
|
+
return (index.h(index.Host, { key: 'c19b87e943347cc55424450e7e4f10bc3447e828', class: {
|
|
220
364
|
'default': !this.max,
|
|
221
365
|
'max': this.max,
|
|
222
|
-
} }, index.h("section", { key: '
|
|
223
|
-
index.h("header", { key: '
|
|
224
|
-
'
|
|
225
|
-
|
|
226
|
-
|
|
366
|
+
} }, index.h("section", { key: '88ecbc0d1a1460dd262150706216f7f758fb7981', class: "listing" }, !this.hideHeader &&
|
|
367
|
+
index.h("header", { key: 'dd28677d023aeaf431cb3b99449751f6385c767d' }, index.h("section", { key: 'ad56b31550d096cb59e92bc6167be11b76a9c368', class: "title" }, index.h("img", { key: '00ce4e832edfb672b0eadb0462a5a132cfa67e09', src: phirepassSftpClientLogoSvg, alt: "SFTP Client" }), index.h("div", { key: 'ee186cc2c643afefa425bb6ce862686dce5ba6ab', class: "text" }, index.h("div", { key: '29c5922bf9826930ac33fe6c200bf47fce1e183e', class: "name" }, this.name), index.h("div", { key: '76d6bba6cb51b9907db533395c258ee7458cf5ce', class: "description" }, this.description))), index.h("section", { key: 'd3bfbf402aed51cba973830b14b9d4f276011535', class: "actions" }, index.h("div", { key: '87eb4484d8552a582c35e4960a82003f7570bf26', class: "action", onClick: () => this.toggle_max() }, index.h("img", { key: '3ff40a471fc54a1d97a4aa5c4746dc837082307d', src: phirepassSftpClientMaxSvg, alt: "Maximize" })))), index.h("main", { key: 'a441806676df938682df422acce7b640e452eece' }, this.show_navigation && index.h("nav", { key: 'd7fe91b30ecd998985301c2f0ac5064ee4bfc9fa', class: "navigation" }, index.h("div", { key: '17bd0d958fb55b8a89b6af7becbeb1cd892066a5', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index$1, breadcrumbs) => (index.h(index.h.Fragment, null, index.h("span", { key: index$1, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index$1 < breadcrumbs.length - 1 && index.h("img", { class: "arrow", src: phirepassSftpClientChevronSvg }))))), index.h("section", { key: '0f65ff3c51a3aeba3bf046445fc858b05e1e5106', class: "actions", "aria-label": "SFTP actions" }, index.h("button", { key: '5184ea48385f5b1f235e7fe0a01eed0171782e76', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, index.h("img", { key: '345aa00fe17569c8d9037e9304b381868effe862', src: phirepassSftpClientGoUpSvg, alt: "Go up" })), index.h("button", { key: 'eec7a682ed944746eabf939dfff1073bb85dfae6', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, index.h("img", { key: 'ab1faf4dc27ca0a85b152c559b2f4953c7fddb15', src: phirepassSftpClientRefreshSvg, alt: "Refresh" })), index.h("button", { key: '529ad0cd6e000978294be16aedb9ec8f2b6d699e', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, index.h("img", { key: '669ceed59555391014ea531e4398517a1c4bc77a', src: phirepassSftpClientUploadSvg, alt: "Upload" })), index.h("button", { key: '3b0602bd52a1ed066e76f136ba18e67a2e923f05', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), index.h("input", { key: '272d2fe2f2d61b02c4d2e5c8624f2c0ccc7daa92', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && index.h("div", { key: '2f080688bfa4c95663c278d875eceebbda78094a', class: "content" }, index.h("table", { key: '3c10b9615ba21dce3aaa47850d03f083d0ef0107' }, index.h("thead", { key: '366af5b1b875d394450b78b6490c813ac930f0fa' }, index.h("tr", { key: 'd3116485a0f02953c96e309f1c44d5e47cea9dcd' }, index.h("th", { key: '6af47d08c0bac5dd887ceda7b3f75101caeaebc3' }, "Name"), index.h("th", { key: '3c8c72711429b988e24118810ef3ea30eb779bb7' }, "Size"), index.h("th", { key: '8dd16c387287e4dd3bf29dbea304f6dd8871686a' }, "Permissions"), index.h("th", { key: '7b2c6ca49d8dd4150895307a4499d3e083cc8900' }, "Owner"), index.h("th", { key: '1723d32cf185dbaeea6d3bd9dbe3f72fc055c5a2' }, "Modified"))), index.h("tbody", { key: '685d9eae4f0ac61e07b44710be235bafaaefa7df' }, this.listing.map((item, index$1) => (index.h("tr", { key: index$1, class: {
|
|
368
|
+
'selected': this.is_selected(item),
|
|
369
|
+
}, onClick: () => this.list_directory(item) }, index.h("td", null, item.kind === 'Folder' ? index.h("img", { class: "kind", src: phirepassSftpClientFolderSvg, alt: "Folder" }) : index.h("img", { class: "kind", src: phirepassSftpClientFileSvg, alt: "File" }), index.h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), index.h("td", null, item.attributes.size), index.h("td", null, item.attributes.permissions ?? '-'), index.h("td", null, item.attributes.user ?? '-'), index.h("td", null, new Date(item.attributes.mtime * 1000).toLocaleString()))))))), this.show_loader && index.h("div", { key: '8337354a4cd9ca456d7845ff4934ceebb36f7dc6', class: "loader" }, "Loading..."), this.show_error && index.h("div", { key: 'c547ad1c0f24de427a77129f77402830910e98b4', class: "error" }, this.error_message)), index.h("footer", { key: 'e452f0e2f7982049df57498ef9ed1cf63c70e9eb' }, index.h("section", { key: '00111d90943b2bfb21392dede79af5e009d43524', class: "status" }, index.h("span", { key: '1c10ae5cb21118059fe61625f9fc4d0aa18be448' }, this.status), this.selected_item && index.h("span", { key: '82939fb59d72ca3823e8c580578a6f13ce4079b0', class: "selected-item" }, this.get_full_path(this.selected_item))), index.h("section", { key: '38380847cf818eb024ec5743ffd92e3369b2cc40', class: "version" }, "Version: ", this.version))), this.show_login_screen &&
|
|
370
|
+
index.h("section", { key: '1840f9bae95e8906c38dade1e15f6c52f360829b', class: {
|
|
371
|
+
'creds': true,
|
|
372
|
+
'blurred': this.show_login_screen,
|
|
373
|
+
} }, index.h("form", { key: 'b7b7c3494329a93aafc6c948c879ba8ecd8bd42a', class: "auth", onSubmit: (event) => {
|
|
374
|
+
const formData = new FormData(event.target);
|
|
375
|
+
let username = undefined;
|
|
376
|
+
if (this.show_login_screen_username) {
|
|
377
|
+
username = formData.get('username');
|
|
378
|
+
}
|
|
379
|
+
let password = undefined;
|
|
380
|
+
if (this.show_login_screen_password) {
|
|
381
|
+
password = formData.get('password');
|
|
382
|
+
}
|
|
383
|
+
this.channel.open_sftp_tunnel(this.nodeId, username, password);
|
|
384
|
+
this.show_login_screen_username = false;
|
|
385
|
+
this.show_login_screen_password = false;
|
|
386
|
+
this.show_login_screen = false;
|
|
387
|
+
this.show_loader = true;
|
|
388
|
+
event.stopPropagation();
|
|
389
|
+
event.preventDefault();
|
|
390
|
+
} }, index.h("div", { key: '25a15115fb41d65d59750a176d46a7e844286e00', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
|
|
391
|
+
index.h("div", { key: '13f5053dbf65445220551f554df5ab03fb7fb7c0' }, index.h("label", { key: '5016afe8eb38c54800697fbe2d4602269966edc9', htmlFor: "username" }, "Username"), index.h("input", { key: '48e7e3029b0369e06f5d1bafcf4bc9bc3fccfb1a', id: "username", autoComplete: 'off', name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
|
|
392
|
+
index.h("div", { key: 'cd06fc73813094a57899c3be077f3dba0a5ca133' }, index.h("label", { key: 'f64e3145d4df56d4654dedb0188c2a33db09634b', htmlFor: "password" }, "Password"), index.h("input", { key: '6e22d7cfbf40b8d2e77a23730d55df2e900d5da7', id: "password", autoComplete: 'off', name: "password", type: "password", placeholder: "" })), index.h("div", { key: '9405dbf23cb588db9b2368c3155a9230ab046438' }, index.h("button", { key: 'b8087e7b9a828db3d6b36f8fe06d564c76d01402', type: "submit" }, "Connect"))))));
|
|
227
393
|
}
|
|
228
394
|
static get watchers() { return {
|
|
229
395
|
"nodeId": [{
|
|
@@ -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-BiurVooY.js');
|
|
4
|
+
var protocol = require('./protocol-BDROfN76.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
@@ -694,7 +694,7 @@ const PhirepassTerminal = class {
|
|
|
694
694
|
this.usernameBuffer = "";
|
|
695
695
|
}
|
|
696
696
|
render() {
|
|
697
|
-
return (index.h(index.Host, { key: '
|
|
697
|
+
return (index.h(index.Host, { key: '13831d1794d5739dcd61460571dbdd86eb3b7368' }, index.h("div", { key: '1a68fbc0c601df5525e278627567fa1c62c59992', id: "ccc", ref: el => (this.containerEl = el) })));
|
|
698
698
|
}
|
|
699
699
|
static get watchers() { return {
|
|
700
700
|
"nodeId": [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-BiurVooY.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["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"],"token":[1],"serverId":[1,"server-id"],"max":[32],"show_login_screen":[32],"show_login_screen_username":[32],"show_login_screen_password":[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"],"token":[1],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["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"],"token":[1],"serverId":[1,"server-id"],"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],"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"],"token":[1],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -762,7 +762,7 @@ async function __wbg_init(module_or_path) {
|
|
|
762
762
|
}
|
|
763
763
|
|
|
764
764
|
if (module_or_path === undefined) {
|
|
765
|
-
module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-
|
|
765
|
+
module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-BDROfN76.js', document.baseURI).href)));
|
|
766
766
|
}
|
|
767
767
|
const imports = __wbg_get_imports();
|
|
768
768
|
|
|
@@ -782,6 +782,7 @@ exports.ProtocolMessageType = void 0;
|
|
|
782
782
|
ProtocolMessageType["TunnelOpened"] = "TunnelOpened";
|
|
783
783
|
ProtocolMessageType["TunnelClosed"] = "TunnelClosed";
|
|
784
784
|
ProtocolMessageType["TunnelData"] = "TunnelData";
|
|
785
|
+
ProtocolMessageType["SFTPListItems"] = "SFTPListItems";
|
|
785
786
|
})(exports.ProtocolMessageType || (exports.ProtocolMessageType = {}));
|
|
786
787
|
exports.InputMode = void 0;
|
|
787
788
|
(function (InputMode) {
|
|
@@ -6,6 +6,7 @@ export var ProtocolMessageType;
|
|
|
6
6
|
ProtocolMessageType["TunnelOpened"] = "TunnelOpened";
|
|
7
7
|
ProtocolMessageType["TunnelClosed"] = "TunnelClosed";
|
|
8
8
|
ProtocolMessageType["TunnelData"] = "TunnelData";
|
|
9
|
+
ProtocolMessageType["SFTPListItems"] = "SFTPListItems";
|
|
9
10
|
})(ProtocolMessageType || (ProtocolMessageType = {}));
|
|
10
11
|
export var InputMode;
|
|
11
12
|
(function (InputMode) {
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
|
|
2
|
+
stroke="rgb(189, 219, 209)" stroke-width="2" stroke-linecap="round"
|
|
3
|
+
stroke-linejoin="round"
|
|
4
|
+
class="lucide lucide-chevron-right w-3 h-3 text-muted-foreground/50 shrink-0">
|
|
5
|
+
<path d="m9 18 6-6-6-6"></path>
|
|
6
|
+
</svg>
|