phirepass-widgets 0.0.50 → 0.0.52
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/phirepass-sftp-client.cjs.entry.js +94 -18
- package/dist/cjs/phirepass-terminal.cjs.entry.js +1 -1
- package/dist/cjs/{protocol-BDROfN76.js → protocol-ez6IHkjn.js} +19 -19
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +86 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +92 -16
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/{phirepass-widgets/p-BcIhGXR0.js → components/p-1UO2RO2i.js} +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +4 -4
- package/dist/esm/phirepass-sftp-client.entry.js +94 -18
- package/dist/esm/phirepass-terminal.entry.js +1 -1
- package/dist/esm/{protocol-BcIhGXR0.js → protocol-1UO2RO2i.js} +18 -18
- package/dist/{components/p-BcIhGXR0.js → phirepass-widgets/p-1UO2RO2i.js} +1 -1
- package/dist/phirepass-widgets/{p-282d5896.entry.js → p-62096d36.entry.js} +5 -5
- package/dist/phirepass-widgets/p-97f267af.entry.js +1 -0
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/protocol.d.ts +1 -1
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +3 -0
- package/package.json +2 -2
- package/dist/phirepass-widgets/p-5ac2d2bb.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DqslB2R4.js');
|
|
4
|
-
var protocol = require('./protocol-
|
|
4
|
+
var protocol = require('./protocol-ez6IHkjn.js');
|
|
5
5
|
|
|
6
6
|
const phirepassSftpClientLogoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIgogICAgc3Ryb2tlPSJyZ2IoNDYsIDE4NCwgMTM4KSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiCiAgICBjbGFzcz0ibHVjaWRlIGx1Y2lkZS10ZXJtaW5hbCB3LTMuNSBoLTMuNSB0ZXh0LXByaW1hcnkiPgogICAgPHBvbHlsaW5lIHBvaW50cz0iNCAxNyAxMCAxMSA0IDUiPjwvcG9seWxpbmU+CiAgICA8bGluZSB4MT0iMTIiIHgyPSIyMCIgeTE9IjE5IiB5Mj0iMTkiPjwvbGluZT4KPC9zdmc+Cg==';
|
|
7
7
|
|
|
@@ -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{height:100%;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}`;
|
|
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;container-type:inline-size;.listing{height:100%;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;table-layout:auto;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}&:first-child{width:30%;min-width:180px;max-width:195px}&:nth-child(2),&:nth-child(3),&:nth-child(4),&:nth-child(5){white-space:nowrap;width:1%}}}tbody{padding:10px 10px;tr{border-bottom:1px solid hsl(var(--border) / 0.4);td{padding:10px 10px 9px;color:hsl(var(--muted-foreground));&:first-child{min-width:180px;max-width:195px;white-space:nowrap;.name{display:inline-block;max-width:calc(100% - 26px);overflow:hidden;text-overflow:ellipsis;vertical-align:middle}}&:nth-child(2),&:nth-child(3),&:nth-child(4),&:nth-child(5){white-space:nowrap}&.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}@container (max-width: 699px){:host .listing main .content table thead th:nth-child(4),:host .listing main .content table tbody td:nth-child(4){display:none}}@container (max-width: 635px){:host .listing main .content table thead th:nth-child(3),:host .listing main .content table tbody td:nth-child(3){display:none}}@container (max-width: 530px){:host .listing main .content table thead th:nth-child(5),:host .listing main .content table tbody td:nth-child(5){display:none}:host .listing footer .status{display:none}}@container (max-width: 370px){:host .listing main .content table thead th:nth-child(2),:host .listing main .content table tbody td:nth-child(2){display:none}:host .listing main .content table thead th:first-child,:host .listing main .content table tbody td:first-child{width:100%;min-width:0;max-width:none}:host .listing main .content table tbody td:first-child .name{max-width:100%}}@container (max-width: 295px){:host .listing main .content table tbody td:first-child .name{max-width:120px}}`;
|
|
23
23
|
|
|
24
24
|
const PhirepassSftpClient = class {
|
|
25
25
|
constructor(hostRef) {
|
|
@@ -248,6 +248,7 @@ const PhirepassSftpClient = class {
|
|
|
248
248
|
});
|
|
249
249
|
this.show_content = true;
|
|
250
250
|
this.show_navigation = true;
|
|
251
|
+
console.log('Received SFTP list items:', web);
|
|
251
252
|
}
|
|
252
253
|
handle_tunnel_data(web) {
|
|
253
254
|
console.log('received tunnel data:', web);
|
|
@@ -478,19 +479,94 @@ const PhirepassSftpClient = class {
|
|
|
478
479
|
get_full_path(item) {
|
|
479
480
|
return [item.path, item.name].join('/');
|
|
480
481
|
}
|
|
482
|
+
format_size(size) {
|
|
483
|
+
if (size === undefined || Number.isNaN(size)) {
|
|
484
|
+
return '-';
|
|
485
|
+
}
|
|
486
|
+
if (size < 1024) {
|
|
487
|
+
return `${size} B`;
|
|
488
|
+
}
|
|
489
|
+
const units = ['KB', 'MB', 'GB', 'TB', 'PB'];
|
|
490
|
+
let value = size;
|
|
491
|
+
let unitIndex = -1;
|
|
492
|
+
while (value >= 1024 && unitIndex < units.length - 1) {
|
|
493
|
+
value /= 1024;
|
|
494
|
+
unitIndex += 1;
|
|
495
|
+
}
|
|
496
|
+
const rounded = value >= 10 ? value.toFixed(1) : value.toFixed(2);
|
|
497
|
+
return `${rounded} ${units[unitIndex]}`;
|
|
498
|
+
}
|
|
499
|
+
mode_type_to_char(mode, kind) {
|
|
500
|
+
const S_IFMT = 0o170000;
|
|
501
|
+
const type = mode & S_IFMT;
|
|
502
|
+
switch (type) {
|
|
503
|
+
case 0o140000: return 's';
|
|
504
|
+
case 0o120000: return 'l';
|
|
505
|
+
case 0o100000: return '-';
|
|
506
|
+
case 0o060000: return 'b';
|
|
507
|
+
case 0o040000: return 'd';
|
|
508
|
+
case 0o020000: return 'c';
|
|
509
|
+
case 0o010000: return 'p';
|
|
510
|
+
default:
|
|
511
|
+
return kind === 'Folder' ? 'd' : '-';
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
format_permissions(permissions, kind) {
|
|
515
|
+
if (permissions === undefined || permissions === null) {
|
|
516
|
+
return '-';
|
|
517
|
+
}
|
|
518
|
+
if (typeof permissions === 'string') {
|
|
519
|
+
const value = permissions.trim();
|
|
520
|
+
if (/^[bcdlps-][rwxStTs-]{9}$/.test(value)) {
|
|
521
|
+
return value;
|
|
522
|
+
}
|
|
523
|
+
if (/^[0-7]{3,4}$/.test(value)) {
|
|
524
|
+
const mode = parseInt(value, 8);
|
|
525
|
+
return this.format_permissions(mode, kind);
|
|
526
|
+
}
|
|
527
|
+
if (/^\d+$/.test(value)) {
|
|
528
|
+
const mode = parseInt(value, 10);
|
|
529
|
+
return this.format_permissions(mode, kind);
|
|
530
|
+
}
|
|
531
|
+
return value || '-';
|
|
532
|
+
}
|
|
533
|
+
const mode = permissions;
|
|
534
|
+
const typeChar = this.mode_type_to_char(mode, kind);
|
|
535
|
+
const chars = [
|
|
536
|
+
mode & 0o400 ? 'r' : '-',
|
|
537
|
+
mode & 0o200 ? 'w' : '-',
|
|
538
|
+
mode & 0o100 ? 'x' : '-',
|
|
539
|
+
mode & 0o040 ? 'r' : '-',
|
|
540
|
+
mode & 0o020 ? 'w' : '-',
|
|
541
|
+
mode & 0o010 ? 'x' : '-',
|
|
542
|
+
mode & 0o004 ? 'r' : '-',
|
|
543
|
+
mode & 0o002 ? 'w' : '-',
|
|
544
|
+
mode & 0o001 ? 'x' : '-',
|
|
545
|
+
];
|
|
546
|
+
if (mode & 0o4000) {
|
|
547
|
+
chars[2] = chars[2] === 'x' ? 's' : 'S';
|
|
548
|
+
}
|
|
549
|
+
if (mode & 0o2000) {
|
|
550
|
+
chars[5] = chars[5] === 'x' ? 's' : 'S';
|
|
551
|
+
}
|
|
552
|
+
if (mode & 0o1000) {
|
|
553
|
+
chars[8] = chars[8] === 'x' ? 't' : 'T';
|
|
554
|
+
}
|
|
555
|
+
return `${typeChar}${chars.join('')}`;
|
|
556
|
+
}
|
|
481
557
|
render() {
|
|
482
|
-
return (index.h(index.Host, { key: '
|
|
558
|
+
return (index.h(index.Host, { key: 'd6835d8f10772d163d135f7c03a8bfd6ea9dc9e5', class: {
|
|
483
559
|
'default': !this.max,
|
|
484
560
|
'max': this.max,
|
|
485
|
-
} }, index.h("section", { key: '
|
|
486
|
-
index.h("header", { key: '
|
|
561
|
+
} }, index.h("section", { key: '1b8c7c297fe0c13fb6374179960d220bfa264ce1', class: "listing" }, !this.hideHeader &&
|
|
562
|
+
index.h("header", { key: '2aca7b108ed314344a9adab45c41b155ad243006' }, index.h("section", { key: 'e74cf72a21a03f706b40badcc453a6f00f00b54f', class: "title" }, index.h("img", { key: 'f3f9799352fd0f24a30c32fbf776fac55297d115', src: phirepassSftpClientLogoSvg, alt: "SFTP Client" }), index.h("div", { key: '6094df7cf6cd9e00d02f88aec504f1f1f8aa0117', class: "text" }, index.h("div", { key: '661f83eedde6b10eb779cf5ba51eda8de86a6235', class: "name" }, this.name), index.h("div", { key: '43f1e5268dcef0ce029e0037865444337da720db', class: "description" }, this.description))), index.h("section", { key: '1f39c200d7e429c1fe2ba00f271524cbf4694c1b', class: "actions" }, index.h("div", { key: 'c09d3bafff294a24c84cb98041ccc0914024aebf', class: "action", onClick: () => this.toggle_max() }, index.h("img", { key: '15700c04d1aac6c5552f2cbbd13909bdac28ebc4', src: phirepassSftpClientMaxSvg, alt: "Maximize" })))), index.h("main", { key: '43d58b425080731024cb0987f99750b4d106d929' }, this.show_navigation && index.h("nav", { key: 'fe3020afb24408ae00d8feb03f71911736a4e8fd', class: "navigation" }, index.h("div", { key: '92f394c1b1f867e365c713e587ee3bf03677ebdd', 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: '0a33173ce03dbef85a09c0e6bddea20e8defd4cc', class: "actions", "aria-label": "SFTP actions" }, index.h("button", { key: '08f27eacad2be8c3b26ab911ab7c8a467d050783', 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: '20f41d4e2d4ed6bfa0c7cd45140eeebc7d151b29', src: phirepassSftpClientGoUpSvg, alt: "Go up" })), index.h("button", { key: 'cdc64bf9c863337f1d88923a791aa734e2c6ecfb', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, index.h("img", { key: 'c7b8503b466a3f319bc63ddbfc1893addb52d731', src: phirepassSftpClientRefreshSvg, alt: "Refresh" })), index.h("button", { key: 'a27273c0860ebea231217f49639345185414cd6a', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, index.h("img", { key: '56c4feb6be73b663df107c342c974689a1922427', src: phirepassSftpClientUploadSvg, alt: "Upload" })), index.h("button", { key: 'e052aea68588e6711b6fe9ac39b057e8a1ca8f59', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), index.h("input", { key: 'bac3a9f443a3175dcf9e436ea2754aa46c237e38', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && index.h("div", { key: 'f8b5a1b307b290bc4ac1c5dbfafea13d942981ea', class: "content" }, index.h("table", { key: 'acd4c91ff1fad061b847c6c10a6bd5228540bbdd' }, index.h("thead", { key: 'a416b35d7ac3e1809514f90b20cd52180a98fd78' }, index.h("tr", { key: '1e42ebd055d9821455205981cd6b86c176d818c6' }, index.h("th", { key: '785f06a6ff02eca8de9fef36cbb085c2a03b16e9' }, "Name"), index.h("th", { key: 'f860e66146bd0a5a85516a7c98d901ae4ccf672e' }, "Size"), index.h("th", { key: '21e2d9c1b923af76afc9aff707219d8fb570c661' }, "Permissions"), index.h("th", { key: '4d8f3d7909fa2ad3cb52e0c62426d86c399015d8' }, "Owner"), index.h("th", { key: '5a628872d532a62c49923139d762bb1500163d2f' }, "Modified"), index.h("th", { key: 'bd635bbd123d003a87460b8958dafdeed887d6f2', class: "action-col", "aria-label": "Actions" }))), index.h("tbody", { key: '762ab21361490e0455942ea42e5b9feccb9ea6d7' }, this.listing.map((item, index$1) => (index.h("tr", { key: index$1, class: {
|
|
487
563
|
'selected': this.is_selected(item),
|
|
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
|
|
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: '
|
|
490
|
-
index.h("section", { key: '
|
|
564
|
+
}, 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, this.format_size(item.attributes.size)), index.h("td", null, this.format_permissions(item.attributes.permissions, item.kind)), index.h("td", null, item.attributes.user ?? '-'), index.h("td", null, new Date(item.attributes.modified * 1000).toLocaleString()), index.h("td", { class: "action-col" }, item.kind === 'File' &&
|
|
565
|
+
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: '8889681c30251969a4b0c7bdf9dee9716bae3a7e', class: "loader" }, "Loading..."), this.show_error && index.h("div", { key: 'e64a52b759c799db6e3b1fe50a6bf37a5c98054c', class: "error" }, this.error_message)), index.h("footer", { key: '5a839546c86673fefb234bdaef9bd365779411df' }, index.h("section", { key: 'cbff2897ce0c934cd65afee0ca26214792b8e2dd', class: "status" }, index.h("span", { key: 'd948c7ffd13a54551f3ef2b4994b6d4c332d7621' }, this.status), this.selected_item && index.h("span", { key: '9f42bdd345c3fbf7e81fb74e8ddf1950d5d29a46', class: "selected-item" }, this.get_full_path(this.selected_item))), index.h("section", { key: 'c4dc849a8fd5c3a81977e4bdca9bf2b4f525f8d9', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
|
|
566
|
+
index.h("section", { key: '98180dd1473469824fcc7b2e88cbf62012c026d3', class: {
|
|
491
567
|
'creds': true,
|
|
492
568
|
'blurred': this.show_login_screen,
|
|
493
|
-
} }, index.h("form", { key: '
|
|
569
|
+
} }, index.h("form", { key: '8ee6af5523225fd1f1ab93bc3fb268e73ec8d7e6', class: "auth", onSubmit: (event) => {
|
|
494
570
|
const formData = new FormData(event.target);
|
|
495
571
|
let username = undefined;
|
|
496
572
|
if (this.show_login_screen_username) {
|
|
@@ -507,27 +583,27 @@ const PhirepassSftpClient = class {
|
|
|
507
583
|
this.show_loader = true;
|
|
508
584
|
event.stopPropagation();
|
|
509
585
|
event.preventDefault();
|
|
510
|
-
} }, index.h("div", { key: '
|
|
511
|
-
index.h("div", { key: '
|
|
512
|
-
index.h("div", { key: '
|
|
513
|
-
index.h("section", { key: '
|
|
586
|
+
} }, index.h("div", { key: '50fd8c259b5df82b304f2ed08b16050d3cb9bba0', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
|
|
587
|
+
index.h("div", { key: '9bcbc10707682d879c14419a0bd02f982af985e8' }, index.h("label", { key: 'c60920335472e50331db739e63cd3615c5cb24b4', htmlFor: "username" }, "Username"), index.h("input", { key: '9a56e8f648049f2f9216f5886da962cdda273781', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
|
|
588
|
+
index.h("div", { key: '1118e66371c80e7da7100469bc7820e315ffdc7e' }, index.h("label", { key: 'ff1a7e258f720f380ebe90f8d878713552be1eb8', htmlFor: "password" }, "Password"), index.h("input", { key: '14265511ce70214639d6c86d2dbec827cf35e3d0', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), index.h("div", { key: 'b850f2be07d80f4d151878c73545e644f05ecd34' }, index.h("button", { key: '9291d47362ed567b910276636176aa52d106c388', type: "submit" }, "Connect")))), this.show_upload_modal &&
|
|
589
|
+
index.h("section", { key: 'b7f9bd6374bfb8bcf04d8563e4ef48f8a077d582', class: {
|
|
514
590
|
'upload-modal': true,
|
|
515
591
|
'visible': this.show_upload_modal,
|
|
516
|
-
} }, index.h("div", { key: '
|
|
592
|
+
} }, index.h("div", { key: '44f4f5f989376be19de17ef9ceee57d421f74a87', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, index.h("div", { key: '04337b2bdb2248c357d75479c16a9b7dee480150', class: "title" }, "Uploading File"), index.h("div", { key: '2bada0f7123a8111ace072757857fc5e9d1e45df', class: "file-name", title: this.upload_file_name }, this.upload_file_name), index.h("div", { key: '7e5c8115e49d339421af4c481bc1381b45b14906', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, index.h("div", { key: 'fe2d2659b4e09cfc07604761800f0155f6f4da7c', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), index.h("div", { key: 'a50903b50a4d57fc7aa9c62f2b08eee94e90c6c6', class: "progress-value" }, this.upload_progress, "%"), index.h("button", { key: 'a3a0f3b6bee2348d77affcef6a35faba7bdf7b0a', type: "button", class: {
|
|
517
593
|
'cancel': true,
|
|
518
594
|
'finished': this.upload_finished,
|
|
519
595
|
}, onClick: () => this.cancel_upload() }, this.upload_finished ? 'Close' : 'Cancel'))), this.show_download_modal &&
|
|
520
|
-
index.h("section", { key: '
|
|
596
|
+
index.h("section", { key: '268e3fc9a4bd26e0b167ac2f7ec98d85755e06d1', class: {
|
|
521
597
|
'download-modal': true,
|
|
522
598
|
'visible': this.show_download_modal,
|
|
523
|
-
} }, index.h("div", { key: '
|
|
599
|
+
} }, index.h("div", { key: '94c7cee66d0d49f1efe1489e93a84b2f66d2566f', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, index.h("div", { key: '392c81df57b514dd146c24aaf47fc7232949e8e1', class: "title" }, "Downloading File"), index.h("div", { key: 'ebfe8992e27741c18e3d2539fd621db660fb1552', class: "file-name", title: this.download_file_name }, this.download_file_name), index.h("div", { key: '1424a4bde99d5ee57946210e5089123efbaa5812', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, index.h("div", { key: '6011f979cf8a865a3e8116f16c8e04b3c12b2ebc', class: "progress-fill", style: { width: `${this.download_progress}%` } })), index.h("div", { key: '8f38212d4d5b55ec24868e14db0d3fa76e3c0a4d', class: "progress-value" }, this.download_progress, "%"), index.h("button", { key: '2d6090c87206ca4dbbc0d6f0e88f772153f19260', type: "button", class: {
|
|
524
600
|
'cancel': true,
|
|
525
601
|
'finished': this.download_finished,
|
|
526
602
|
}, onClick: () => this.cancel_download() }, this.download_finished ? 'Close' : 'Cancel'))), this.show_delete_modal &&
|
|
527
|
-
index.h("section", { key: '
|
|
603
|
+
index.h("section", { key: '8bfc94b6a829c3997aebcec8368d4e99a3321375', class: {
|
|
528
604
|
'delete-modal': true,
|
|
529
605
|
'visible': this.show_delete_modal,
|
|
530
|
-
} }, index.h("div", { key: '
|
|
606
|
+
} }, index.h("div", { key: '9fb7a902510330c9366370fd66b48de54339b154', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation" }, index.h("div", { key: '0835d56456b5a5de31f44528d4e4ece436361280', class: "title" }, "Delete File"), index.h("div", { key: '8fa20e7ec0ece30993cf07415d6288d855fa9afe', class: "message" }, this.delete_loading ? 'Deleting file...' : 'Are you sure you want to delete this file?'), index.h("div", { key: '47e29802f717c5c1613cbbd86de7c493c3f4267f', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_loading && index.h("div", { key: 'd63f8e662d7a44ab2ab3dba7988996ac8b80bb9e', class: "delete-loading-bar", "aria-hidden": "true" }), index.h("div", { key: '1b498931d6fed515130589a837a9a0a017718c9a', class: "modal-actions" }, index.h("button", { key: '641f8ce95c205b170da0a498213c263bc7c9a410', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), index.h("button", { key: '54685d2b101a8af75912edb72109e3c4c23b0789', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete'))))));
|
|
531
607
|
}
|
|
532
608
|
static get watchers() { return {
|
|
533
609
|
"nodeId": [{
|
|
@@ -319,7 +319,7 @@ function __wbg_get_imports() {
|
|
|
319
319
|
const ret = Array.from(getObject(arg0));
|
|
320
320
|
return addHeapObject(ret);
|
|
321
321
|
},
|
|
322
|
-
|
|
322
|
+
__wbg_info_6806dea58e7a86f5: function(arg0, arg1) {
|
|
323
323
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
324
324
|
},
|
|
325
325
|
__wbg_instanceof_ArrayBuffer_7c8433c6ed14ffe3: function(arg0) {
|
|
@@ -391,27 +391,27 @@ function __wbg_get_imports() {
|
|
|
391
391
|
__wbg_set_onopen_cd47b8fb1d92dee9: function(arg0, arg1) {
|
|
392
392
|
getObject(arg0).onopen = getObject(arg1);
|
|
393
393
|
},
|
|
394
|
-
|
|
394
|
+
__wbg_warn_78650a5595aeb96b: function(arg0, arg1) {
|
|
395
395
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
396
396
|
},
|
|
397
397
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
398
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
399
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
398
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
399
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_40);
|
|
400
400
|
return addHeapObject(ret);
|
|
401
401
|
},
|
|
402
402
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
403
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx:
|
|
404
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
403
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
404
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_40_1);
|
|
405
405
|
return addHeapObject(ret);
|
|
406
406
|
},
|
|
407
407
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
408
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
409
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
408
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
409
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_40_2);
|
|
410
410
|
return addHeapObject(ret);
|
|
411
411
|
},
|
|
412
412
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
413
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
414
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
413
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
414
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43);
|
|
415
415
|
return addHeapObject(ret);
|
|
416
416
|
},
|
|
417
417
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -448,20 +448,20 @@ function __wbg_get_imports() {
|
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
function
|
|
452
|
-
wasm.
|
|
451
|
+
function __wasm_bindgen_func_elem_43(arg0, arg1) {
|
|
452
|
+
wasm.__wasm_bindgen_func_elem_43(arg0, arg1);
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
function
|
|
456
|
-
wasm.
|
|
455
|
+
function __wasm_bindgen_func_elem_40(arg0, arg1, arg2) {
|
|
456
|
+
wasm.__wasm_bindgen_func_elem_40(arg0, arg1, addHeapObject(arg2));
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
function
|
|
460
|
-
wasm.
|
|
459
|
+
function __wasm_bindgen_func_elem_40_1(arg0, arg1, arg2) {
|
|
460
|
+
wasm.__wasm_bindgen_func_elem_40_1(arg0, arg1, addHeapObject(arg2));
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
function
|
|
464
|
-
wasm.
|
|
463
|
+
function __wasm_bindgen_func_elem_40_2(arg0, arg1, arg2) {
|
|
464
|
+
wasm.__wasm_bindgen_func_elem_40_2(arg0, arg1, addHeapObject(arg2));
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
|
|
@@ -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-ez6IHkjn.js', document.baseURI).href)));
|
|
766
766
|
}
|
|
767
767
|
const imports = __wbg_get_imports();
|
|
768
768
|
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
display: flex;
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
position: relative;
|
|
35
|
+
container-type: inline-size;
|
|
35
36
|
|
|
36
37
|
.listing {
|
|
37
38
|
height: 100%;
|
|
@@ -257,6 +258,7 @@
|
|
|
257
258
|
width: 100%;
|
|
258
259
|
border-collapse: separate;
|
|
259
260
|
border-spacing: 0;
|
|
261
|
+
table-layout: auto;
|
|
260
262
|
|
|
261
263
|
thead {
|
|
262
264
|
background-color: hsl(var(--muted));
|
|
@@ -278,6 +280,20 @@
|
|
|
278
280
|
min-width: 58px;
|
|
279
281
|
padding: 0 10px;
|
|
280
282
|
}
|
|
283
|
+
|
|
284
|
+
&:first-child {
|
|
285
|
+
width: 30%;
|
|
286
|
+
min-width: 180px;
|
|
287
|
+
max-width: 195px;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&:nth-child(2),
|
|
291
|
+
&:nth-child(3),
|
|
292
|
+
&:nth-child(4),
|
|
293
|
+
&:nth-child(5) {
|
|
294
|
+
white-space: nowrap;
|
|
295
|
+
width: 1%;
|
|
296
|
+
}
|
|
281
297
|
}
|
|
282
298
|
}
|
|
283
299
|
|
|
@@ -290,6 +306,27 @@
|
|
|
290
306
|
padding: 10px 10px 9px;
|
|
291
307
|
color: hsl(var(--muted-foreground));
|
|
292
308
|
|
|
309
|
+
&:first-child {
|
|
310
|
+
min-width: 180px;
|
|
311
|
+
max-width: 195px;
|
|
312
|
+
white-space: nowrap;
|
|
313
|
+
|
|
314
|
+
.name {
|
|
315
|
+
display: inline-block;
|
|
316
|
+
max-width: calc(100% - 26px);
|
|
317
|
+
overflow: hidden;
|
|
318
|
+
text-overflow: ellipsis;
|
|
319
|
+
vertical-align: middle;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
&:nth-child(2),
|
|
324
|
+
&:nth-child(3),
|
|
325
|
+
&:nth-child(4),
|
|
326
|
+
&:nth-child(5) {
|
|
327
|
+
white-space: nowrap;
|
|
328
|
+
}
|
|
329
|
+
|
|
293
330
|
&.action-col {
|
|
294
331
|
width: 58px;
|
|
295
332
|
min-width: 58px;
|
|
@@ -687,3 +724,52 @@
|
|
|
687
724
|
left: 0;
|
|
688
725
|
z-index: 9999;
|
|
689
726
|
}
|
|
727
|
+
|
|
728
|
+
@container (max-width: 699px) {
|
|
729
|
+
:host .listing main .content table thead th:nth-child(4),
|
|
730
|
+
:host .listing main .content table tbody td:nth-child(4) {
|
|
731
|
+
display: none;
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
@container (max-width: 635px) {
|
|
736
|
+
:host .listing main .content table thead th:nth-child(3),
|
|
737
|
+
:host .listing main .content table tbody td:nth-child(3) {
|
|
738
|
+
display: none;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
@container (max-width: 530px) {
|
|
743
|
+
:host .listing main .content table thead th:nth-child(5),
|
|
744
|
+
:host .listing main .content table tbody td:nth-child(5) {
|
|
745
|
+
display: none;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
:host .listing footer .status {
|
|
749
|
+
display: none;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
@container (max-width: 370px) {
|
|
754
|
+
:host .listing main .content table thead th:nth-child(2),
|
|
755
|
+
:host .listing main .content table tbody td:nth-child(2) {
|
|
756
|
+
display: none;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
:host .listing main .content table thead th:first-child,
|
|
760
|
+
:host .listing main .content table tbody td:first-child {
|
|
761
|
+
width: 100%;
|
|
762
|
+
min-width: 0;
|
|
763
|
+
max-width: none;
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
:host .listing main .content table tbody td:first-child .name {
|
|
767
|
+
max-width: 100%;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
@container (max-width: 295px) {
|
|
772
|
+
:host .listing main .content table tbody td:first-child .name {
|
|
773
|
+
max-width: 120px;
|
|
774
|
+
}
|
|
775
|
+
}
|