phirepass-widgets 0.0.47 → 0.0.49
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-BiurVooY.js → index-DqslB2R4.js} +27 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +157 -19
- package/dist/cjs/phirepass-terminal.cjs.entry.js +2 -2
- package/dist/cjs/phirepass-widgets.cjs.js +2 -2
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +243 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.download.svg +7 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +167 -18
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +1 -1
- package/dist/esm/{index-zZMsduaU.js → index-jdexunMF.js} +27 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-sftp-client.entry.js +157 -19
- package/dist/esm/phirepass-terminal.entry.js +2 -2
- package/dist/esm/phirepass-widgets.js +3 -3
- package/dist/phirepass-widgets/p-11d53a8d.entry.js +1 -0
- package/dist/phirepass-widgets/{p-5b21bc31.entry.js → p-282d5896.entry.js} +5 -5
- package/dist/phirepass-widgets/p-jdexunMF.js +2 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +23 -0
- package/package.json +1 -1
- package/dist/phirepass-widgets/p-32ca8ca5.entry.js +0 -1
- package/dist/phirepass-widgets/p-zZMsduaU.js +0 -2
|
@@ -8,6 +8,10 @@ const BUILD = /* phirepass-widgets */ { hotModuleReplacement: false, hydratedSel
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
// src/utils/constants.ts
|
|
12
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
13
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
14
|
+
|
|
11
15
|
// src/utils/get-prop-descriptor.ts
|
|
12
16
|
function getPropertyDescriptor(obj, memberName, getOnly) {
|
|
13
17
|
const stopAt = typeof HTMLElement !== "undefined" ? HTMLElement.prototype : null;
|
|
@@ -710,12 +714,19 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
710
714
|
if (newVNode2.$text$ != null) {
|
|
711
715
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
712
716
|
} else {
|
|
717
|
+
if (!isSvgMode) {
|
|
718
|
+
isSvgMode = newVNode2.$tag$ === "svg";
|
|
719
|
+
}
|
|
713
720
|
if (!win.document) {
|
|
714
721
|
throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");
|
|
715
722
|
}
|
|
716
|
-
elm = newVNode2.$elm$ = win.document.
|
|
723
|
+
elm = newVNode2.$elm$ = win.document.createElementNS(
|
|
724
|
+
isSvgMode ? SVG_NS : HTML_NS,
|
|
717
725
|
newVNode2.$tag$
|
|
718
|
-
);
|
|
726
|
+
) ;
|
|
727
|
+
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
728
|
+
isSvgMode = false;
|
|
729
|
+
}
|
|
719
730
|
{
|
|
720
731
|
updateElement(null, newVNode2, isSvgMode);
|
|
721
732
|
}
|
|
@@ -728,6 +739,13 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
728
739
|
}
|
|
729
740
|
}
|
|
730
741
|
}
|
|
742
|
+
{
|
|
743
|
+
if (newVNode2.$tag$ === "svg") {
|
|
744
|
+
isSvgMode = false;
|
|
745
|
+
} else if (elm.tagName === "foreignObject") {
|
|
746
|
+
isSvgMode = true;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
731
749
|
}
|
|
732
750
|
elm["s-hn"] = hostTagName;
|
|
733
751
|
return elm;
|
|
@@ -864,8 +882,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
864
882
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
865
883
|
const oldChildren = oldVNode.$children$;
|
|
866
884
|
const newChildren = newVNode2.$children$;
|
|
885
|
+
const tag = newVNode2.$tag$;
|
|
867
886
|
const text = newVNode2.$text$;
|
|
868
887
|
if (text == null) {
|
|
888
|
+
{
|
|
889
|
+
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
890
|
+
}
|
|
869
891
|
{
|
|
870
892
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
871
893
|
}
|
|
@@ -882,6 +904,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
882
904
|
) {
|
|
883
905
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
884
906
|
} else ;
|
|
907
|
+
if (isSvgMode && tag === "svg") {
|
|
908
|
+
isSvgMode = false;
|
|
909
|
+
}
|
|
885
910
|
} else if (oldVNode.$text$ !== text) {
|
|
886
911
|
elm.data = text;
|
|
887
912
|
}
|
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-DqslB2R4.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_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);
|
|
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],"show_upload_modal":[32],"upload_progress":[32],"upload_file_name":[32],"upload_finished":[32],"show_download_modal":[32],"download_progress":[32],"download_file_name":[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.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,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DqslB2R4.js');
|
|
4
4
|
var protocol = require('./protocol-BDROfN76.js');
|
|
5
5
|
|
|
6
6
|
const phirepassSftpClientLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==';
|
|
@@ -19,7 +19,7 @@ const phirepassSftpClientRefreshSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0
|
|
|
19
19
|
|
|
20
20
|
const phirepassSftpClientUploadSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoMTg5LCAyMTksIDIwOSkiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIgogICAgY2xhc3M9Imx1Y2lkZSBsdWNpZGUtdXBsb2FkIHctMy41IGgtMy41Ij4KICAgIDxwYXRoIGQ9Ik0yMSAxNXY0YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0ydi00Ij48L3BhdGg+CiAgICA8cG9seWxpbmUgcG9pbnRzPSIxNyA4IDEyIDMgNyA4Ij48L3BvbHlsaW5lPgogICAgPGxpbmUgeDE9IjEyIiB4Mj0iMTIiIHkxPSIzIiB5Mj0iMTUiPjwvbGluZT4KPC9zdmc+Cg==';
|
|
21
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)
|
|
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;&.action-col{width:58px;min-width:58px;padding:0 10px}}}tbody{padding:10px 10px;tr{border-bottom:1px solid hsl(var(--border) / 0.4);td{padding:10px 10px 9px;color:hsl(var(--muted-foreground));&.action-col{width:58px;min-width:58px;text-align:center;padding-left:1px;padding-right:1px;.file-actions{display:flex;align-items:center;justify-content:center;gap:8px}.file-action{border:none;background:transparent;color:hsl(var(--muted-foreground));width:16px;height:16px;border-radius:3px;cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;transition:opacity 120ms ease;padding:0;svg{width:12px;height:12px;display:block;margin:0 auto}&:hover{color:hsl(var(--primary))}&.delete:hover{color:hsl(var(--destructive))}}}.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);td.action-col .file-action{opacity:1;visibility:visible;pointer-events:auto;color:hsl(var(--primary))}}&.selected{background-color:hsl(var(--primary) / 0.3);td.action-col .file-action{opacity:1;visibility:visible;pointer-events:auto}&: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)}}}}.upload-modal,.download-modal,.delete-modal{position:absolute;inset:0;display:none;align-items:center;justify-content:center;background:rgba(28, 31, 38, 0);backdrop-filter:blur(4px);z-index:6;&.visible{display:flex}.upload-dialog,.download-dialog,.delete-dialog{width:min(360px, calc(100% - 24px));background-color:rgba(21, 24, 30, 0.96);border:1px solid hsl(var(--border));border-radius:var(--radius);padding:16px;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;.title{color:hsl(var(--primary));font-size:0.8rem;margin-bottom:8px}.file-name{color:rgb(189, 219, 209);font-size:0.72rem;line-height:1rem;margin-bottom:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.progress-track{width:100%;height:10px;border-radius:999px;background-color:hsl(var(--muted));overflow:hidden;border:1px solid hsl(var(--border));.progress-fill{height:100%;width:0;background:linear-gradient(90deg, hsl(var(--primary) / 0.7), hsl(var(--primary)));transition:width 140ms ease}}.progress-value{margin-top:8px;color:hsl(var(--muted-foreground));font-size:0.7rem;text-align:right}.cancel{margin-top:14px;width:100%;height:2rem;border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);background:hsl(var(--muted));color:rgb(189, 219, 209);font-size:0.75rem;letter-spacing:0.03em;cursor:pointer;&:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}&.finished{background-color:hsl(var(--primary));border-color:hsl(var(--primary));color:hsl(var(--primary-foreground));&:hover{background-color:hsl(var(--primary) / 0.9);border-color:hsl(var(--primary) / 0.9);color:hsl(var(--primary-foreground))}}}.message{color:rgb(189, 219, 209);font-size:0.74rem;line-height:1rem;margin-bottom:8px}.modal-actions{margin-top:14px;display:grid;grid-template-columns:1fr 1fr;gap:8px;.btn{height:2rem;border:1px solid hsl(var(--border));border-radius:calc(var(--radius) - 2px);font-size:0.75rem;letter-spacing:0.03em;cursor:pointer;&:disabled{opacity:0.65;cursor:not-allowed}}.btn.secondary{background:hsl(var(--muted));color:rgb(189, 219, 209);&:hover{border-color:hsl(var(--primary));color:hsl(var(--primary))}}.btn.destructive{background:hsl(var(--destructive));border-color:hsl(var(--destructive));color:white;&:hover{background:hsl(var(--destructive) / 0.9);border-color:hsl(var(--destructive) / 0.9)}}}.delete-loading-bar{margin-top:2px;width:100%;height:8px;border-radius:999px;border:1px solid hsl(var(--border));background:linear-gradient(90deg, hsl(var(--muted)) 0%, hsl(var(--muted)) 100%), linear-gradient(90deg, hsl(var(--primary) / 0.3), hsl(var(--primary)), hsl(var(--primary) / 0.3));background-repeat:no-repeat;background-size:100% 100%, 40% 100%;animation:delete-loading 1s linear infinite}}}}@keyframes delete-loading{from{background-position:0 0, -45% 0}to{background-position:0 0, 145% 0}}:host(.max){height:100vh;width:100vw;position:fixed;top:0;left:0;z-index:9999}`;
|
|
23
23
|
|
|
24
24
|
const PhirepassSftpClient = class {
|
|
25
25
|
constructor(hostRef) {
|
|
@@ -32,6 +32,9 @@ const PhirepassSftpClient = class {
|
|
|
32
32
|
runtimeReady = false;
|
|
33
33
|
connected = false;
|
|
34
34
|
uploadInputEl;
|
|
35
|
+
uploadProgressHandle;
|
|
36
|
+
downloadProgressHandle;
|
|
37
|
+
deleteLoadingTimeout;
|
|
35
38
|
// private inputMode: InputMode = InputMode.Default;
|
|
36
39
|
session_id;
|
|
37
40
|
// private usernameBuffer = "";
|
|
@@ -89,6 +92,17 @@ const PhirepassSftpClient = class {
|
|
|
89
92
|
version = '';
|
|
90
93
|
status = 'Disconnected';
|
|
91
94
|
selected_item = null;
|
|
95
|
+
show_upload_modal = false;
|
|
96
|
+
upload_progress = 0;
|
|
97
|
+
upload_file_name = '';
|
|
98
|
+
upload_finished = false;
|
|
99
|
+
show_download_modal = false;
|
|
100
|
+
download_progress = 0;
|
|
101
|
+
download_file_name = '';
|
|
102
|
+
download_finished = false;
|
|
103
|
+
show_delete_modal = false;
|
|
104
|
+
delete_file_name = '';
|
|
105
|
+
delete_loading = false;
|
|
92
106
|
toggle_max() {
|
|
93
107
|
this.maximizeEvent?.emit(!this.max);
|
|
94
108
|
}
|
|
@@ -119,9 +133,30 @@ const PhirepassSftpClient = class {
|
|
|
119
133
|
this.connected = false;
|
|
120
134
|
this.domReady = false;
|
|
121
135
|
this.runtimeReady = false;
|
|
136
|
+
this.clear_upload_progress();
|
|
137
|
+
this.clear_download_progress();
|
|
138
|
+
this.clear_delete_loading_timeout();
|
|
122
139
|
this.close_comms();
|
|
123
140
|
// this.destroy_terminal();
|
|
124
141
|
}
|
|
142
|
+
clear_upload_progress() {
|
|
143
|
+
if (this.uploadProgressHandle !== undefined) {
|
|
144
|
+
window.clearInterval(this.uploadProgressHandle);
|
|
145
|
+
this.uploadProgressHandle = undefined;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
clear_download_progress() {
|
|
149
|
+
if (this.downloadProgressHandle !== undefined) {
|
|
150
|
+
window.clearInterval(this.downloadProgressHandle);
|
|
151
|
+
this.downloadProgressHandle = undefined;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
clear_delete_loading_timeout() {
|
|
155
|
+
if (this.deleteLoadingTimeout !== undefined) {
|
|
156
|
+
window.clearTimeout(this.deleteLoadingTimeout);
|
|
157
|
+
this.deleteLoadingTimeout = undefined;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
125
160
|
connect() {
|
|
126
161
|
this.connected = true;
|
|
127
162
|
this.channel.connect();
|
|
@@ -311,25 +346,109 @@ const PhirepassSftpClient = class {
|
|
|
311
346
|
disconnect_session() {
|
|
312
347
|
this.close_comms();
|
|
313
348
|
this.session_id = undefined;
|
|
314
|
-
this.status = 'Disconnected';
|
|
315
349
|
this.show_loader = false;
|
|
350
|
+
this.show_content = false;
|
|
351
|
+
this.breadcrumbs = [];
|
|
352
|
+
this.current_dir = '.';
|
|
353
|
+
this.listing = [];
|
|
354
|
+
this.show_navigation = false;
|
|
355
|
+
this.show_login_screen_username = false;
|
|
356
|
+
this.show_login_screen_password = false;
|
|
357
|
+
this.show_login_screen = false;
|
|
358
|
+
this.version = '';
|
|
359
|
+
this.status = 'Disconnected';
|
|
360
|
+
}
|
|
361
|
+
on_file_row_action(item, event) {
|
|
362
|
+
event.preventDefault();
|
|
363
|
+
event.stopPropagation();
|
|
364
|
+
this.selected_item = item;
|
|
365
|
+
this.download_file_name = item.name;
|
|
366
|
+
this.download_progress = 0;
|
|
367
|
+
this.download_finished = false;
|
|
368
|
+
this.show_download_modal = true;
|
|
369
|
+
this.clear_download_progress();
|
|
370
|
+
this.downloadProgressHandle = window.setInterval(() => {
|
|
371
|
+
if (this.download_progress >= 100) {
|
|
372
|
+
this.clear_download_progress();
|
|
373
|
+
this.download_finished = true;
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
this.download_progress = Math.min(100, this.download_progress + 5);
|
|
377
|
+
}, 180);
|
|
378
|
+
}
|
|
379
|
+
on_file_delete_action(item, event) {
|
|
380
|
+
event.preventDefault();
|
|
381
|
+
event.stopPropagation();
|
|
382
|
+
this.selected_item = item;
|
|
383
|
+
this.delete_file_name = item.name;
|
|
384
|
+
this.delete_loading = false;
|
|
385
|
+
this.show_delete_modal = true;
|
|
386
|
+
}
|
|
387
|
+
cancel_delete() {
|
|
388
|
+
if (this.delete_loading) {
|
|
389
|
+
return;
|
|
390
|
+
}
|
|
391
|
+
this.show_delete_modal = false;
|
|
392
|
+
this.delete_file_name = '';
|
|
393
|
+
this.delete_loading = false;
|
|
394
|
+
}
|
|
395
|
+
confirm_delete() {
|
|
396
|
+
if (this.delete_loading) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
this.delete_loading = true;
|
|
400
|
+
const deletingFileName = this.delete_file_name;
|
|
401
|
+
this.clear_delete_loading_timeout();
|
|
402
|
+
this.deleteLoadingTimeout = window.setTimeout(() => {
|
|
403
|
+
this.show_delete_modal = false;
|
|
404
|
+
this.delete_loading = false;
|
|
405
|
+
this.show_error = true;
|
|
406
|
+
this.error_message = `Delete for "${deletingFileName}" is not available yet.`;
|
|
407
|
+
window.setTimeout(() => {
|
|
408
|
+
this.show_error = false;
|
|
409
|
+
}, 2_000);
|
|
410
|
+
this.delete_file_name = '';
|
|
411
|
+
this.deleteLoadingTimeout = undefined;
|
|
412
|
+
}, 1_100);
|
|
316
413
|
}
|
|
317
414
|
open_upload_picker() {
|
|
318
415
|
this.uploadInputEl?.click();
|
|
319
416
|
}
|
|
320
417
|
on_upload_selected(event) {
|
|
321
418
|
const input = event.target;
|
|
322
|
-
const
|
|
323
|
-
if (!
|
|
419
|
+
const selectedFile = input.files?.[0];
|
|
420
|
+
if (!selectedFile) {
|
|
324
421
|
return;
|
|
325
422
|
}
|
|
326
|
-
this.
|
|
327
|
-
this.
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
423
|
+
this.upload_file_name = selectedFile.name;
|
|
424
|
+
this.upload_progress = 0;
|
|
425
|
+
this.upload_finished = false;
|
|
426
|
+
this.show_upload_modal = true;
|
|
427
|
+
this.clear_upload_progress();
|
|
428
|
+
this.uploadProgressHandle = window.setInterval(() => {
|
|
429
|
+
if (this.upload_progress >= 100) {
|
|
430
|
+
this.clear_upload_progress();
|
|
431
|
+
this.upload_finished = true;
|
|
432
|
+
return;
|
|
433
|
+
}
|
|
434
|
+
this.upload_progress = Math.min(100, this.upload_progress + 5);
|
|
435
|
+
}, 180);
|
|
331
436
|
input.value = '';
|
|
332
437
|
}
|
|
438
|
+
cancel_upload() {
|
|
439
|
+
this.clear_upload_progress();
|
|
440
|
+
this.show_upload_modal = false;
|
|
441
|
+
this.upload_progress = 0;
|
|
442
|
+
this.upload_file_name = '';
|
|
443
|
+
this.upload_finished = false;
|
|
444
|
+
}
|
|
445
|
+
cancel_download() {
|
|
446
|
+
this.clear_download_progress();
|
|
447
|
+
this.show_download_modal = false;
|
|
448
|
+
this.download_progress = 0;
|
|
449
|
+
this.download_file_name = '';
|
|
450
|
+
this.download_finished = false;
|
|
451
|
+
}
|
|
333
452
|
is_selected(item) {
|
|
334
453
|
if (!this.selected_item) {
|
|
335
454
|
return false;
|
|
@@ -360,17 +479,18 @@ const PhirepassSftpClient = class {
|
|
|
360
479
|
return [item.path, item.name].join('/');
|
|
361
480
|
}
|
|
362
481
|
render() {
|
|
363
|
-
return (index.h(index.Host, { key: '
|
|
482
|
+
return (index.h(index.Host, { key: '31a797ab81c687e6aaea760d882e8078d4ab226f', class: {
|
|
364
483
|
'default': !this.max,
|
|
365
484
|
'max': this.max,
|
|
366
|
-
} }, index.h("section", { key: '
|
|
367
|
-
index.h("header", { key: '
|
|
485
|
+
} }, index.h("section", { key: '0dd1df187509d0f2c3dc172119f97224a1fb8234', class: "listing" }, !this.hideHeader &&
|
|
486
|
+
index.h("header", { key: 'af24358a2d1d6ec9dc282683b1feff0a29287dd0' }, index.h("section", { key: 'f0195c9b0f99fe3c7ca64c7db04a3b08255bb58e', class: "title" }, index.h("img", { key: 'e04889ab957ccddb181850a5a787b6e40191842e', src: phirepassSftpClientLogoSvg, alt: "SFTP Client" }), index.h("div", { key: 'dc364ca7481d3b78e99319c66a6a40dc29100ea4', class: "text" }, index.h("div", { key: '7b226fe3a81631656e8fce0b5a69854c3aaeb9c5', class: "name" }, this.name), index.h("div", { key: '8a843a5134ed28a985d2d1787b17ea3c7436bd45', class: "description" }, this.description))), index.h("section", { key: '73aec9dd75115faf4dfbcdfde1a076c960954923', class: "actions" }, index.h("div", { key: 'ce75ef7f9c3433e9d6dfadb41e0716a165666ee8', class: "action", onClick: () => this.toggle_max() }, index.h("img", { key: 'abbba7e239c57a52dfd46ed23aeeac81874f097c', src: phirepassSftpClientMaxSvg, alt: "Maximize" })))), index.h("main", { key: 'fbdd529cfb3090f41dba72f7333efe3a1af29aa4' }, this.show_navigation && index.h("nav", { key: '17601f7bf03f76169a14803ad0cc11b21f72df8d', class: "navigation" }, index.h("div", { key: '55fffc7a4686e4978002b9edf6334b07fc57322b', 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: '163eb105d575eddebad721f4e114ea8f5a8e44a1', class: "actions", "aria-label": "SFTP actions" }, index.h("button", { key: 'ad9cbebffdc46ba08b3d05adc33a18ad027f1b3d', 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: '4f1bfd8154df3df70f8892b1f17391f06ac5ea3e', src: phirepassSftpClientGoUpSvg, alt: "Go up" })), index.h("button", { key: '5bcb098f9fcfb61e6af07e9224617e82ce9e8e8b', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, index.h("img", { key: '863997b8a0ad3f465b68c10747739aa6bc123934', src: phirepassSftpClientRefreshSvg, alt: "Refresh" })), index.h("button", { key: 'dcae91b637f58f7567709367b4607148ba6c84ce', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, index.h("img", { key: '75baffc951eb5bef65be10e1b77d782048fe19bc', src: phirepassSftpClientUploadSvg, alt: "Upload" })), index.h("button", { key: '7ce741e5e4538bfa50b330128153584cae966865', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), index.h("input", { key: '86686c4eb1f5e56e2828687c8843ac0a0f79028b', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && index.h("div", { key: 'd5be43d27ae7933ad1eea5d9c7d53b3a4fa4d292', class: "content" }, index.h("table", { key: 'e6f57d64703faef89347da8c412eb4b224878a68' }, index.h("thead", { key: '89979dd9702878b6d0bccddb971c1e42353c4515' }, index.h("tr", { key: '9c744d7e8e12bd189ba17f6b2b7a4f371b4932eb' }, index.h("th", { key: '6f29cf58e3000d3d02881d38ca8065ab4174300d' }, "Name"), index.h("th", { key: '79ec3f7d0ac3a12a450f275845360576bd1430c6' }, "Size"), index.h("th", { key: 'ea1718d678f7016472688d7d08d311aad727dcc9' }, "Permissions"), index.h("th", { key: '6272cb391bd19801f9967b704185520799dc8a11' }, "Owner"), index.h("th", { key: '91fec7f7e28354e88a12fc7f92c543172800f0b3' }, "Modified"), index.h("th", { key: '6256a9926941f12ce4807c926e09c3a39c776d2d', class: "action-col", "aria-label": "Actions" }))), index.h("tbody", { key: 'f1e57f678a8381e4dad5c8daab6624849378b012' }, this.listing.map((item, index$1) => (index.h("tr", { key: index$1, class: {
|
|
368
487
|
'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())
|
|
370
|
-
index.h("section", { key: '
|
|
488
|
+
}, 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()), index.h("td", { class: "action-col" }, item.kind === 'File' &&
|
|
489
|
+
index.h("div", { class: "file-actions" }, index.h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": "Download" }, index.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" }, index.h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), index.h("polyline", { points: "7 10 12 15 17 10" }), index.h("line", { x1: "12", x2: "12", y1: "15", y2: "3" }))), index.h("button", { type: "button", class: "file-action delete", onClick: (event) => this.on_file_delete_action(item, event), title: "Delete", "aria-label": "Delete" }, index.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" }, index.h("polyline", { points: "3 6 5 6 21 6" }), index.h("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), index.h("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), index.h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), index.h("line", { x1: "14", x2: "14", y1: "11", y2: "17" }))))))))))), this.show_loader && index.h("div", { key: '141c34cb925c0e42fca1e0397b610071b360c0d1', class: "loader" }, "Loading..."), this.show_error && index.h("div", { key: 'ebf97cf4b7307514e724c7778c4a9052ec32c68d', class: "error" }, this.error_message)), index.h("footer", { key: '1f243a6d09afe5380466dec79226bde67679ace8' }, index.h("section", { key: '59f7e3dd679213d76294c347f1af8ca4f3d5b3e6', class: "status" }, index.h("span", { key: '4aaebcfa2fea3e69d02814727c63484fd465dfee' }, this.status), this.selected_item && index.h("span", { key: '5f37d4f9a82a97cd5065651d5f4311104153b8a7', class: "selected-item" }, this.get_full_path(this.selected_item))), index.h("section", { key: '0a75c580bb9ce63e58e4cd3aef76f13f5d8a6c43', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
|
|
490
|
+
index.h("section", { key: 'bf83e07198a7bd7f6b11164261496cee880e8e95', class: {
|
|
371
491
|
'creds': true,
|
|
372
492
|
'blurred': this.show_login_screen,
|
|
373
|
-
} }, index.h("form", { key: '
|
|
493
|
+
} }, index.h("form", { key: 'c0b3f36031b3d0575e0dfc4d4e5c689a3e86093e', class: "auth", onSubmit: (event) => {
|
|
374
494
|
const formData = new FormData(event.target);
|
|
375
495
|
let username = undefined;
|
|
376
496
|
if (this.show_login_screen_username) {
|
|
@@ -387,9 +507,27 @@ const PhirepassSftpClient = class {
|
|
|
387
507
|
this.show_loader = true;
|
|
388
508
|
event.stopPropagation();
|
|
389
509
|
event.preventDefault();
|
|
390
|
-
} }, index.h("div", { key: '
|
|
391
|
-
index.h("div", { key: '
|
|
392
|
-
index.h("div", { key: '
|
|
510
|
+
} }, index.h("div", { key: 'f8f811323c0aaa9d2c6e7c70b39e2bc58073f500', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
|
|
511
|
+
index.h("div", { key: '9d37d47a0c3d7235711964979389e34e7ae909e4' }, index.h("label", { key: '870aefcf5b1052663df6564158f85f0a1a6c14fc', htmlFor: "username" }, "Username"), index.h("input", { key: 'b51ee3b3f4a73c7116ace5d1d111d76e6c2d44a2', id: "username", autoComplete: 'off', name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
|
|
512
|
+
index.h("div", { key: 'f727237549f83c27639f943414665eab507d3e0b' }, index.h("label", { key: 'e0607fbaa128a26ca8a6ce2be5976c2be66cf1a8', htmlFor: "password" }, "Password"), index.h("input", { key: '4458ad7c4927bf21e27c9b979c14d5d3ca377514', id: "password", autoComplete: 'off', name: "password", type: "password", placeholder: "" })), index.h("div", { key: '7e3a5f468cc73a370558d4f447e1e7e91ea9dff2' }, index.h("button", { key: 'c63922f8ffd4377a13c76f51108e8fc9cfa7cdfa', type: "submit" }, "Connect")))), this.show_upload_modal &&
|
|
513
|
+
index.h("section", { key: 'b7935f9ab9e2cbfc8ecb66aff2c212e8f008675f', class: {
|
|
514
|
+
'upload-modal': true,
|
|
515
|
+
'visible': this.show_upload_modal,
|
|
516
|
+
} }, index.h("div", { key: 'e7c84c44c5ccec4d7211dd647abee21ba9e4dded', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, index.h("div", { key: '42411ccf81daad3d6f94455ec5f39a2ec8bd32ce', class: "title" }, "Uploading File"), index.h("div", { key: 'd7e6db3d7af27e69533bf2bcc532ab36de241a84', class: "file-name", title: this.upload_file_name }, this.upload_file_name), index.h("div", { key: '3b1e1eb29e1d9b737bf52c3e9d59c33871d661fc', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, index.h("div", { key: '36d23d0a85747aa12f36b05caa4fa047095245b9', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), index.h("div", { key: 'd981d282d1ad7216eee6a6ea8eaf0b48655d6b00', class: "progress-value" }, this.upload_progress, "%"), index.h("button", { key: '1e5eb505505098bc88fadad649da78e4f291e8c3', type: "button", class: {
|
|
517
|
+
'cancel': true,
|
|
518
|
+
'finished': this.upload_finished,
|
|
519
|
+
}, onClick: () => this.cancel_upload() }, this.upload_finished ? 'Close' : 'Cancel'))), this.show_download_modal &&
|
|
520
|
+
index.h("section", { key: 'f2d75e7719e5a5ecad1dc37145da05cedefc53eb', class: {
|
|
521
|
+
'download-modal': true,
|
|
522
|
+
'visible': this.show_download_modal,
|
|
523
|
+
} }, index.h("div", { key: '248a10deae9f5869290a362d2ec0dc49480c2f6a', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, index.h("div", { key: '05f2f39b31a59ecb402c8b803b9ba8819d9b41d3', class: "title" }, "Downloading File"), index.h("div", { key: '9979cfdbd9f0ac1888fbce3050ea51f1ac7fbc13', class: "file-name", title: this.download_file_name }, this.download_file_name), index.h("div", { key: '5a0edbdb962e730fb8b4ff6ed06d1826e84d6ee4', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, index.h("div", { key: 'fdb25a6a1a42cb82050b4d6e4da4cae52c09ecc1', class: "progress-fill", style: { width: `${this.download_progress}%` } })), index.h("div", { key: '2b9d47914221aa0537c0317b87cebedeb5c99b57', class: "progress-value" }, this.download_progress, "%"), index.h("button", { key: '15dee8510d3468eb00131248d7c2e6d31349b650', type: "button", class: {
|
|
524
|
+
'cancel': true,
|
|
525
|
+
'finished': this.download_finished,
|
|
526
|
+
}, onClick: () => this.cancel_download() }, this.download_finished ? 'Close' : 'Cancel'))), this.show_delete_modal &&
|
|
527
|
+
index.h("section", { key: '5b5fd8c394811a4f5a2c285b331ed0a989729fea', class: {
|
|
528
|
+
'delete-modal': true,
|
|
529
|
+
'visible': this.show_delete_modal,
|
|
530
|
+
} }, index.h("div", { key: 'db2010aa154ececde47f5a5b4c3da485db786b0e', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, index.h("div", { key: '2fdb21392ad194cf7b72bb07391d6fc469b72cea', class: "title" }, "Delete File"), index.h("div", { key: '28ea5040b1111a888d230fd9aa6c34ada0003132', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), index.h("div", { key: '123138ed8bf191e0dd4d1d9ab0409a15caa2aec2', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading && index.h("div", { key: '7a30da76db24c7ecb56877ab055fca6f84ba995b', class: "delete-loading-bar", "aria-hidden": "true" }), index.h("div", { key: 'c6eda63ce75896cc6540f509c81e895b3317e197', class: "modal-actions" }, index.h("button", { key: '54e7f01e6858f1ac0a73091ed7a6a3666bfad968', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), index.h("button", { key: 'f647a2772cb3a14cb42fc6d654c5068bf9e3f7f1', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
|
|
393
531
|
}
|
|
394
532
|
static get watchers() { return {
|
|
395
533
|
"nodeId": [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-DqslB2R4.js');
|
|
4
4
|
var protocol = require('./protocol-BDROfN76.js');
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -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: '0df9307a490dc566e41be1e1d169f8862f8569b9' }, index.h("div", { key: 'c63a16718ef4a559b880c6058bf482db4aeb6af1', 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-DqslB2R4.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_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);
|
|
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],"show_upload_modal":[32],"upload_progress":[32],"upload_file_name":[32],"upload_finished":[32],"show_download_modal":[32],"download_progress":[32],"download_file_name":[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.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;
|