phirepass-widgets 0.0.71 → 0.0.73
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/loader.cjs.js +1 -1
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +20 -19
- package/dist/cjs/phirepass-terminal.cjs.entry.js +6 -5
- package/dist/cjs/phirepass-widgets.cjs.js +1 -1
- package/dist/cjs/{protocol-CApagg_b.js → protocol-Cldo-J8L.js} +31 -28
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +38 -18
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +24 -4
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/components/p-DuwTRFG1.js +1 -0
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +5 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/phirepass-sftp-client.entry.js +20 -19
- package/dist/esm/phirepass-terminal.entry.js +6 -5
- package/dist/esm/phirepass-widgets.js +1 -1
- package/dist/esm/{protocol-DAIyU3gM.js → protocol-DuwTRFG1.js} +30 -27
- package/dist/phirepass-widgets/{p-a3e56764.entry.js → p-6da808f9.entry.js} +5 -5
- package/dist/phirepass-widgets/p-804b8045.entry.js +1 -0
- package/dist/phirepass-widgets/p-DuwTRFG1.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/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +1 -0
- package/dist/types/components/phirepass-terminal/phirepass-terminal.d.ts +1 -0
- package/dist/types/components.d.ts +8 -2
- package/package.json +2 -2
- package/dist/components/p-DAIyU3gM.js +0 -1
- package/dist/phirepass-widgets/p-DAIyU3gM.js +0 -1
- package/dist/phirepass-widgets/p-fb59aa0f.entry.js +0 -1
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["phirepass-sftp-client",[[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],"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],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal",[[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);
|
|
8
|
+
return bootstrapLazy([["phirepass-sftp-client",[[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"],"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],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal",[[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],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-DovZQ7sb.js';
|
|
2
|
-
import { _ as __wbg_init, E as ErrorType, C as Channel, a as ConnectionState, P as ProtocolMessageType } from './protocol-
|
|
2
|
+
import { _ as __wbg_init, E as ErrorType, C as Channel, a as ConnectionState, P as ProtocolMessageType } from './protocol-DuwTRFG1.js';
|
|
3
3
|
|
|
4
4
|
const phirepassSftpClientLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==';
|
|
5
5
|
|
|
@@ -51,6 +51,7 @@ const PhirepassSftpClient = class {
|
|
|
51
51
|
allowInsecure = false;
|
|
52
52
|
heartbeatInterval = 30_000;
|
|
53
53
|
nodeId;
|
|
54
|
+
serviceId;
|
|
54
55
|
token;
|
|
55
56
|
onNodeIdChange(newValue, _oldValue) {
|
|
56
57
|
// Handle the change in node_id here
|
|
@@ -348,7 +349,7 @@ const PhirepassSftpClient = class {
|
|
|
348
349
|
this.clear_creds_buffer();
|
|
349
350
|
this.version = auth.version;
|
|
350
351
|
this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
|
|
351
|
-
this.channel.open_sftp_tunnel(this.nodeId);
|
|
352
|
+
this.channel.open_sftp_tunnel(this.nodeId, this.serviceId);
|
|
352
353
|
this.status = 'Connected';
|
|
353
354
|
}
|
|
354
355
|
handle_tunnel_opened(web) {
|
|
@@ -923,18 +924,18 @@ const PhirepassSftpClient = class {
|
|
|
923
924
|
return `${typeChar}${chars.join('')}`;
|
|
924
925
|
}
|
|
925
926
|
render() {
|
|
926
|
-
return (h(Host, { key: '
|
|
927
|
+
return (h(Host, { key: '693cdfaab69be7ba55dd7333ac5f8ed5ccb0dbce', class: {
|
|
927
928
|
'default': !this.max,
|
|
928
929
|
'max': this.max,
|
|
929
|
-
} }, h("section", { key: '
|
|
930
|
-
h("header", { key: '
|
|
930
|
+
} }, h("section", { key: '504d57b244dd055f23b81807ef6a397032dcf088', class: "listing" }, !this.hideHeader &&
|
|
931
|
+
h("header", { key: 'cef1e0a272851379e6d9ca07092b8078c94e2509' }, h("section", { key: '49fe94d69837676a46e3c92f54496c2ffa1e3ecd', class: "title" }, h("img", { key: 'cec6b64508c31904b34496cc34b26f81ae3e290e', src: phirepassSftpClientLogoSvg, alt: "SFTP Client" }), h("div", { key: '3331b32275581f9bcf79b4b346e9820018868cbf', class: "text" }, h("div", { key: '289f2fef2e14c0a1954a99f6bbd920edbf66bf42', class: "name" }, this.name), h("div", { key: '8c88da9841dc39373f94cb313c7897cbc5a828a3', class: "description" }, this.description))), h("section", { key: 'f6f7ae566a225586c4a79ba31eecf998a1df010b', class: "actions" }, h("div", { key: 'd1a5e9c21e61320035eafe255213e883140815c4', class: "action", onClick: () => this.toggle_max() }, h("img", { key: '10f834c7a7846964bc84c2fd6eef39b09fa33e8f', src: phirepassSftpClientMaxSvg, alt: "Maximize" })))), h("main", { key: 'e17ee5827dc56cea9139697ce9024011a638e5ff' }, this.show_navigation && h("nav", { key: '277080aa09d738f21605d95d1bf70adc9156dfbb', class: "navigation" }, h("div", { key: '526b99f6b6c1161e41ee6dfcd13b48f8e52f85eb', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index, breadcrumbs) => (h("span", { key: index, class: "breadcrumb-container" }, h("span", { key: index, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index < breadcrumbs.length - 1 && h("img", { class: "arrow", src: phirepassSftpClientChevronSvg }))))), h("section", { key: '61a48831425637dc03662f6a8748619745a13b7b', class: "actions", "aria-label": "SFTP actions" }, h("button", { key: '53f150ed1579a653a6f843106ba14534156d46d2', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, h("img", { key: 'dd9853885e3a18882ded99fb28e0e270a9e8bb2b', src: phirepassSftpClientGoUpSvg, alt: "Go up" })), h("button", { key: '5a2a2f865b5169d2187cf5c8d5aa876163d708d3', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, h("img", { key: '62752fa2e46faf222fedd7f5f8a6e7d81242a089', src: phirepassSftpClientRefreshSvg, alt: "Refresh" })), h("button", { key: '09fe21b04d27e7e1abd87b14789e6bd8faa68a98', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, h("img", { key: '0b4ab6f686c7261844221835836e2dbee86866bf', src: phirepassSftpClientUploadSvg, alt: "Upload" })), h("button", { key: 'eab9cf7df64384db2cfb383ba2bc87ff84e9ef63', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), h("input", { key: '05609273cfc54c019f801768e560365845c38671', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && h("div", { key: 'ed910c6b7c2d5ac17e13fef9fd4597b1406b7d85', class: "content" }, h("table", { key: 'c28ed3308bf01665e313e1f8b8fb482f2dc0303a' }, h("thead", { key: '187c2e34ed9cbe57ea13083645472f0dc6f2e957' }, h("tr", { key: 'd43d3d698ba06cc24bc9fba9946a0bcf382327a1' }, h("th", { key: '8128742b1975b1c655e5665256cceb8f63441450' }, "Name"), h("th", { key: '35f91f13e38b62dfa97c742f4f23d14495f71462' }, "Size"), h("th", { key: '89f10d37b9558aadfc1e10e6729ef0bc63f30216' }, "Permissions"), h("th", { key: '51905e8a7d3391119290b59fb0f36420b23b5331' }, "Owner"), h("th", { key: 'a2133c42789fb79ec0bfd91c1ffe4f869a8b0acf' }, "Modified"), h("th", { key: 'a3b72803212e5ba60249777cdad37341c101a4b5', class: "action-col", "aria-label": "Actions" }))), h("tbody", { key: 'e5ee4a1cd8943a4966d33a43ee04df5f355f21e0' }, this.listing.map((item, index) => (h("tr", { key: index, class: {
|
|
931
932
|
'selected': this.is_selected(item),
|
|
932
933
|
}, onClick: () => this.list_directory(item) }, h("td", null, item.kind === 'Folder' ? h("img", { class: "kind", src: phirepassSftpClientFolderSvg, alt: "Folder" }) : h("img", { class: "kind", src: phirepassSftpClientFileSvg, alt: "File" }), h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), h("td", null, this.format_size(item.attributes.size)), h("td", null, this.format_permissions(item.attributes.permissions, item.kind)), h("td", null, item.attributes.user ?? '-'), h("td", null, new Date(item.attributes.modified * 1000).toLocaleString()), h("td", { class: "action-col" }, item.kind === 'File' &&
|
|
933
|
-
h("div", { class: "file-actions" }, h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { points: "7 10 12 15 17 10" }), h("line", { x1: "12", x2: "12", y1: "15", y2: "3" }))), h("button", { type: "button", class: "file-action delete", onClick: (event) => this.on_file_delete_action(item, event), title: "Delete", "aria-label": "Delete" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { points: "3 6 5 6 21 6" }), h("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), h("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), h("line", { x1: "14", x2: "14", y1: "11", y2: "17" }))))))))))), this.show_loader && h("div", { key: '
|
|
934
|
-
h("section", { key: '
|
|
934
|
+
h("div", { class: "file-actions" }, h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { points: "7 10 12 15 17 10" }), h("line", { x1: "12", x2: "12", y1: "15", y2: "3" }))), h("button", { type: "button", class: "file-action delete", onClick: (event) => this.on_file_delete_action(item, event), title: "Delete", "aria-label": "Delete" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { points: "3 6 5 6 21 6" }), h("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), h("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), h("line", { x1: "14", x2: "14", y1: "11", y2: "17" }))))))))))), this.show_loader && h("div", { key: '30777c73738f9c6a5199033428d9033d0cd05b99', class: "loader" }, "Loading..."), this.show_error && h("div", { key: '0a5bc583f268e00c1bf17661ea1f49bccaba6ab9', class: "error" }, this.error_message)), h("footer", { key: '94aff725f14e25d8c34719cbf2decdd5e17b8e22' }, h("section", { key: '6342e9ce4b7fe08e12d62406f203127a0c872055', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
|
|
935
|
+
h("section", { key: '039eeae64731e54a5bf0982777815c8ad0df6b49', class: {
|
|
935
936
|
'creds': true,
|
|
936
937
|
'blurred': this.show_login_screen,
|
|
937
|
-
} }, h("form", { key: '
|
|
938
|
+
} }, h("form", { key: 'b1881dd755b66c392155bb8f670a924f711bd717', class: "auth", onSubmit: (event) => {
|
|
938
939
|
const formData = new FormData(event.target);
|
|
939
940
|
let username = undefined;
|
|
940
941
|
if (this.show_login_screen_username) {
|
|
@@ -944,35 +945,35 @@ const PhirepassSftpClient = class {
|
|
|
944
945
|
if (this.show_login_screen_password) {
|
|
945
946
|
password = formData.get('password');
|
|
946
947
|
}
|
|
947
|
-
this.channel.open_sftp_tunnel(this.nodeId, username, password);
|
|
948
|
+
this.channel.open_sftp_tunnel(this.nodeId, this.serverId, username, password);
|
|
948
949
|
this.show_login_screen_username = false;
|
|
949
950
|
this.show_login_screen_password = false;
|
|
950
951
|
this.show_login_screen = false;
|
|
951
952
|
this.show_loader = true;
|
|
952
953
|
event.stopPropagation();
|
|
953
954
|
event.preventDefault();
|
|
954
|
-
} }, h("div", { key: '
|
|
955
|
-
h("div", { key: '
|
|
956
|
-
h("div", { key: '
|
|
957
|
-
h("section", { key: '
|
|
955
|
+
} }, h("div", { key: '250b78b4d4f20f0491034d6c261ee55581d93483', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
|
|
956
|
+
h("div", { key: '68130dd636c5ae29d4bb344b45ba6b6747b2fdaf' }, h("label", { key: '0d3bc72b4ce0581a910f3b702e299e257498d088', htmlFor: "username" }, "Username"), h("input", { key: 'fef6876079e4097339549547138bcafc93901a3a', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
|
|
957
|
+
h("div", { key: 'ae8d6f4f1d3bee55038dcc6b60899d4ab0ebd5ce' }, h("label", { key: '54dc4ff7a8faf76644d9885ea77d75357ac92ff8', htmlFor: "password" }, "Password"), h("input", { key: '8a4b35f9daa410d96c424ffae53ba92a793081cb', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), h("div", { key: '0c41f3a81ffbd29bba566f6c7ee35234de77e051' }, h("button", { key: '5bf5676382c66f032d72e77bc889596c0f851dbe', type: "submit" }, "Connect")))), this.show_upload_modal &&
|
|
958
|
+
h("section", { key: 'f37ec9066ef29eba7b79f3db98ee080c48c9ec4e', class: {
|
|
958
959
|
'upload-modal': true,
|
|
959
960
|
'visible': this.show_upload_modal,
|
|
960
|
-
} }, h("div", { key: '
|
|
961
|
+
} }, h("div", { key: '77b7a1debd316d191ea9bc7e7fa0e914943e7951', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, h("div", { key: '614f3abe44943fb8d7d7e1976f82fa3161b66112', class: "title" }, "Uploading File"), h("div", { key: 'f2d3b094309ce4cfb4fafb0a289be1f8f116a246', class: "file-name", title: this.upload_file_name }, this.upload_file_name), h("div", { key: '7f6e1892490759e62c3dd5acf46dd53017619a6a', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, h("div", { key: '605c95beaf914644b5500bcc61b5b44aa71f4af9', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), h("div", { key: '2389e2b5d9f719e39d24b40e8083d662864a87db', class: "progress-meta" }, h("div", { key: '2464c8db01adee774d35a65bbdb22d175476e19e', class: "progress-speed" }, this.upload_speed), h("div", { key: 'c47334ec3967a4269cbdea7c7e4e55726461e797', class: "progress-value" }, this.format_percent(this.upload_progress))), h("button", { key: '25d0755fef743af337f7178da1bdd92628f908e2', type: "button", class: {
|
|
961
962
|
'cancel': true,
|
|
962
963
|
'finished': this.upload_finished,
|
|
963
964
|
}, onClick: () => this.cancel_upload() }, this.upload_finished ? 'Close' : 'Cancel'))), this.show_download_modal &&
|
|
964
|
-
h("section", { key: '
|
|
965
|
+
h("section", { key: '0e9db491e0475a85eb811ee83ee5f1102b6e6091', class: {
|
|
965
966
|
'download-modal': true,
|
|
966
967
|
'visible': this.show_download_modal,
|
|
967
|
-
} }, h("div", { key: '
|
|
968
|
+
} }, h("div", { key: 'c177ed66cd9fea215cc3551455243c7cb8ddfe2a', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, h("div", { key: '1d4ea586f1598ce83db53c8eab628db8092ceb2c', class: "title" }, "Downloading File"), h("div", { key: '64bfbe33ddb139ffb7f6035dc4bdd3fb666e054e', class: "file-name", title: this.download_file_name }, this.download_file_name), h("div", { key: '568ca83a87c7f098453fa9d810d894cf32eac728', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, h("div", { key: '3a608f280ee43ffb7933f2755021ae655bd2029e', class: "progress-fill", style: { width: `${this.download_progress}%` } })), h("div", { key: '4c703f990756d4b3b8c4750d711ff4b9817fe2f1', class: "progress-meta" }, h("div", { key: 'd5fe7bc49d1f8f7fcb14c4462244c41140092b87', class: "progress-speed" }, this.download_speed), h("div", { key: 'd99c13a9638b7018fead0c6e2ea8df3c1ed7fca0', class: "progress-value" }, this.format_percent(this.download_progress))), h("button", { key: '32aa10e73df04f3b6b3f2263608c55e069bc29eb', type: "button", class: {
|
|
968
969
|
'cancel': true,
|
|
969
970
|
'finished': this.download_finished,
|
|
970
971
|
}, onClick: () => this.cancel_download() }, this.download_finished ? 'Close' : 'Cancel'))), this.show_delete_modal &&
|
|
971
|
-
h("section", { key: '
|
|
972
|
+
h("section", { key: '0f142b91f29d4b2474ae0a9d479cec3457414f43', class: {
|
|
972
973
|
'delete-modal': true,
|
|
973
974
|
'visible': this.show_delete_modal,
|
|
974
|
-
} }, h("div", { key: '
|
|
975
|
-
h("div", { key: '
|
|
975
|
+
} }, h("div", { key: '2fa13dec3240b69016e33c2f751af97c5903f693', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, h("div", { key: '22742d0f1384acba3f08132d7efad4a78a2357ae', class: "title" }, "Delete File"), h("div", { key: '7eaf020753953b82d843d5b4dd8414131906151b', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), h("div", { key: 'f4fc23b43a78541d7ab84659d287f5d33dc4be1d', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading &&
|
|
976
|
+
h("div", { key: 'ad9fd03a6b983eb87ec37a63bf35d440ce7f908c', class: "delete-loader", "aria-hidden": "true" }, h("span", { key: 'e22bfb5dd729a865454cafb23f4d6eee9a2e3838', class: "spinner" })), h("div", { key: '730b9aa6e1bd773e8e8e9be5ee75c63ba5f69ad3', class: "modal-actions" }, h("button", { key: 'dd7b1ae63736e3c36b9b4894b969433a390e9ee4', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), h("button", { key: '113304b503ba82498a26c34b68ec9f217e6372a2', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
|
|
976
977
|
}
|
|
977
978
|
static get watchers() { return {
|
|
978
979
|
"nodeId": [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, g as getElement, h as h$1, H as Host } from './index-DovZQ7sb.js';
|
|
2
|
-
import { I as InputMode, _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType, E as ErrorType } from './protocol-
|
|
2
|
+
import { I as InputMode, _ as __wbg_init, C as Channel, a as ConnectionState, P as ProtocolMessageType, E as ErrorType } from './protocol-DuwTRFG1.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
@@ -296,6 +296,7 @@ const PhirepassTerminal = class {
|
|
|
296
296
|
allowInsecure = false;
|
|
297
297
|
heartbeatInterval = 30_000;
|
|
298
298
|
nodeId;
|
|
299
|
+
serviceId;
|
|
299
300
|
token;
|
|
300
301
|
onNodeIdChange(newValue, _oldValue) {
|
|
301
302
|
// Handle the change in node_id here
|
|
@@ -552,7 +553,7 @@ const PhirepassTerminal = class {
|
|
|
552
553
|
handle_auth_success(_auth_) {
|
|
553
554
|
this.clear_creds_buffer();
|
|
554
555
|
this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
|
|
555
|
-
this.channel.open_ssh_tunnel(this.nodeId);
|
|
556
|
+
this.channel.open_ssh_tunnel(this.nodeId, this.serviceId);
|
|
556
557
|
}
|
|
557
558
|
handle_tunnel_opened(web) {
|
|
558
559
|
this.session_id = web.sid;
|
|
@@ -647,7 +648,7 @@ const PhirepassTerminal = class {
|
|
|
647
648
|
return;
|
|
648
649
|
}
|
|
649
650
|
this.inputMode = InputMode.Default;
|
|
650
|
-
this.channel.open_ssh_tunnel(this.nodeId, username);
|
|
651
|
+
this.channel.open_ssh_tunnel(this.nodeId, this.serviceId, username);
|
|
651
652
|
}
|
|
652
653
|
handle_password_input(data) {
|
|
653
654
|
if (data === "\r" || data === "\n") {
|
|
@@ -686,13 +687,13 @@ const PhirepassTerminal = class {
|
|
|
686
687
|
this.inputMode = InputMode.Default;
|
|
687
688
|
// Assuming there's a method to submit password to the channel
|
|
688
689
|
// You may need to adjust this based on your actual API
|
|
689
|
-
this.channel.open_ssh_tunnel(this.nodeId, this.usernameBuffer.trim(), password);
|
|
690
|
+
this.channel.open_ssh_tunnel(this.nodeId, this.serviceId, this.usernameBuffer.trim(), password);
|
|
690
691
|
// Clear sensitive data
|
|
691
692
|
this.passwordBuffer = "";
|
|
692
693
|
this.usernameBuffer = "";
|
|
693
694
|
}
|
|
694
695
|
render() {
|
|
695
|
-
return (h$1(Host, { key: '
|
|
696
|
+
return (h$1(Host, { key: '8bc2181d5ca26f6e6552591b7d399f81bece3efa' }, h$1("div", { key: '4c7085ba44cebb23f7712fbfe4ea52a9e8bde6d7', id: "ccc", ref: el => (this.containerEl = el) })));
|
|
696
697
|
}
|
|
697
698
|
static get watchers() { return {
|
|
698
699
|
"nodeId": [{
|
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["phirepass-sftp-client",[[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],"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],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal",[[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);
|
|
20
|
+
return bootstrapLazy([["phirepass-sftp-client",[[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"],"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],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal",[[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],"serverId":[1,"server-id"]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]]], options);
|
|
21
21
|
});
|
|
@@ -144,33 +144,39 @@ class Channel {
|
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
146
|
* @param {string} node_id
|
|
147
|
+
* @param {string} service_id
|
|
147
148
|
* @param {string | null} [username]
|
|
148
149
|
* @param {string | null} [password]
|
|
149
150
|
* @param {number | null} [msg_id]
|
|
150
151
|
*/
|
|
151
|
-
open_sftp_tunnel(node_id, username, password, msg_id) {
|
|
152
|
+
open_sftp_tunnel(node_id, service_id, username, password, msg_id) {
|
|
152
153
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
153
154
|
const len0 = WASM_VECTOR_LEN;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
var ptr2 = isLikeNone(
|
|
155
|
+
const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
156
|
+
const len1 = WASM_VECTOR_LEN;
|
|
157
|
+
var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
157
158
|
var len2 = WASM_VECTOR_LEN;
|
|
158
|
-
|
|
159
|
+
var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
160
|
+
var len3 = WASM_VECTOR_LEN;
|
|
161
|
+
wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
159
162
|
}
|
|
160
163
|
/**
|
|
161
164
|
* @param {string} node_id
|
|
165
|
+
* @param {string} service_id
|
|
162
166
|
* @param {string | null} [username]
|
|
163
167
|
* @param {string | null} [password]
|
|
164
168
|
* @param {number | null} [msg_id]
|
|
165
169
|
*/
|
|
166
|
-
open_ssh_tunnel(node_id, username, password, msg_id) {
|
|
170
|
+
open_ssh_tunnel(node_id, service_id, username, password, msg_id) {
|
|
167
171
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
168
172
|
const len0 = WASM_VECTOR_LEN;
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
var ptr2 = isLikeNone(
|
|
173
|
+
const ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
174
|
+
const len1 = WASM_VECTOR_LEN;
|
|
175
|
+
var ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
172
176
|
var len2 = WASM_VECTOR_LEN;
|
|
173
|
-
|
|
177
|
+
var ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
178
|
+
var len3 = WASM_VECTOR_LEN;
|
|
179
|
+
wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
174
180
|
}
|
|
175
181
|
/**
|
|
176
182
|
* @param {string} node_id
|
|
@@ -420,14 +426,11 @@ function __wbg_get_imports() {
|
|
|
420
426
|
const ret = Array.from(getObject(arg0));
|
|
421
427
|
return addHeapObject(ret);
|
|
422
428
|
},
|
|
423
|
-
__wbg_getRandomValues_a697888e9ba1eee3: function() { return handleError(function (arg0, arg1) {
|
|
424
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
425
|
-
}, arguments); },
|
|
426
429
|
__wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) {
|
|
427
430
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
428
431
|
return addHeapObject(ret);
|
|
429
432
|
}, arguments); },
|
|
430
|
-
|
|
433
|
+
__wbg_info_a035e9398ce057dc: function(arg0, arg1) {
|
|
431
434
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
432
435
|
},
|
|
433
436
|
__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
|
|
@@ -499,27 +502,27 @@ function __wbg_get_imports() {
|
|
|
499
502
|
__wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
|
|
500
503
|
getObject(arg0).onopen = getObject(arg1);
|
|
501
504
|
},
|
|
502
|
-
|
|
505
|
+
__wbg_warn_1087e5a6742be100: function(arg0, arg1) {
|
|
503
506
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
504
507
|
},
|
|
505
508
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
506
509
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
507
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
510
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42);
|
|
508
511
|
return addHeapObject(ret);
|
|
509
512
|
},
|
|
510
513
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
511
514
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
512
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
515
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42_1);
|
|
513
516
|
return addHeapObject(ret);
|
|
514
517
|
},
|
|
515
518
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
516
519
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
517
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
520
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42_2);
|
|
518
521
|
return addHeapObject(ret);
|
|
519
522
|
},
|
|
520
523
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
521
524
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
522
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
525
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_44);
|
|
523
526
|
return addHeapObject(ret);
|
|
524
527
|
},
|
|
525
528
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -556,20 +559,20 @@ function __wbg_get_imports() {
|
|
|
556
559
|
};
|
|
557
560
|
}
|
|
558
561
|
|
|
559
|
-
function
|
|
560
|
-
wasm.
|
|
562
|
+
function __wasm_bindgen_func_elem_44(arg0, arg1) {
|
|
563
|
+
wasm.__wasm_bindgen_func_elem_44(arg0, arg1);
|
|
561
564
|
}
|
|
562
565
|
|
|
563
|
-
function
|
|
564
|
-
wasm.
|
|
566
|
+
function __wasm_bindgen_func_elem_42(arg0, arg1, arg2) {
|
|
567
|
+
wasm.__wasm_bindgen_func_elem_42(arg0, arg1, addHeapObject(arg2));
|
|
565
568
|
}
|
|
566
569
|
|
|
567
|
-
function
|
|
568
|
-
wasm.
|
|
570
|
+
function __wasm_bindgen_func_elem_42_1(arg0, arg1, arg2) {
|
|
571
|
+
wasm.__wasm_bindgen_func_elem_42_1(arg0, arg1, addHeapObject(arg2));
|
|
569
572
|
}
|
|
570
573
|
|
|
571
|
-
function
|
|
572
|
-
wasm.
|
|
574
|
+
function __wasm_bindgen_func_elem_42_2(arg0, arg1, arg2) {
|
|
575
|
+
wasm.__wasm_bindgen_func_elem_42_2(arg0, arg1, addHeapObject(arg2));
|
|
573
576
|
}
|
|
574
577
|
|
|
575
578
|
|