phirepass-widgets 0.0.116 → 0.0.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +10 -20
  2. package/dist/cjs/{index-BCgmMoIq.js → index-C3v5xmUo.js} +3 -75
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/phirepass-rdp.cjs.entry.js +5 -16
  5. package/dist/cjs/phirepass-sftp-client.cjs.entry.js +1470 -0
  6. package/dist/cjs/phirepass-terminal.cjs.entry.js +4 -4
  7. package/dist/cjs/phirepass-widgets.cjs.js +3 -3
  8. package/dist/cjs/{protocol-BjOgJZ9-.js → protocol-DCBMfc2u.js} +21 -277
  9. package/dist/collection/collection-manifest.json +1 -3
  10. package/dist/collection/common/channel.js +1 -21
  11. package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +13 -36
  12. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +0 -122
  13. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +31 -181
  14. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
  15. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  16. package/dist/components/index.js +1 -1
  17. package/dist/components/p-CsYQJXY2.js +1 -0
  18. package/dist/components/phirepass-rdp.js +1 -1
  19. package/dist/components/phirepass-sftp-client.js +1 -1
  20. package/dist/components/phirepass-terminal.js +5 -5
  21. package/dist/esm/{index-Dd9o0CbU.js → index-BVOulYtW.js} +3 -75
  22. package/dist/esm/loader.js +3 -3
  23. package/dist/esm/phirepass-rdp.entry.js +5 -16
  24. package/dist/esm/phirepass-sftp-client.entry.js +1468 -0
  25. package/dist/esm/phirepass-terminal.entry.js +4 -4
  26. package/dist/esm/phirepass-widgets.js +4 -4
  27. package/dist/esm/{protocol-BekUePpu.js → protocol-CsYQJXY2.js} +20 -276
  28. package/dist/phirepass-widgets/{p-c28a9257.entry.js → p-7ea2fdbc.entry.js} +2 -2
  29. package/dist/phirepass-widgets/p-BVOulYtW.js +3 -0
  30. package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
  31. package/dist/phirepass-widgets/p-c1c616ca.entry.js +1 -0
  32. package/dist/phirepass-widgets/p-f1bc04a8.entry.js +1 -0
  33. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  34. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
  35. package/dist/types/common/channel.d.ts +0 -30
  36. package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +0 -10
  37. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +0 -30
  38. package/dist/types/components.d.ts +34 -434
  39. package/package.json +5 -19
  40. package/dist/cjs/phirepass-downloader_3.cjs.entry.js +0 -3812
  41. package/dist/collection/common/fetch.js +0 -44
  42. package/dist/collection/components/phirepass-downloader/form.js +0 -69
  43. package/dist/collection/components/phirepass-downloader/format.js +0 -105
  44. package/dist/collection/components/phirepass-downloader/jobs.js +0 -393
  45. package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +0 -1109
  46. package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +0 -1455
  47. package/dist/collection/components/phirepass-downloader/source.js +0 -120
  48. package/dist/collection/components/phirepass-downloader/views/dialogs.js +0 -34
  49. package/dist/collection/components/phirepass-downloader/views/fetch-form.js +0 -65
  50. package/dist/collection/components/phirepass-downloader/views/icons.js +0 -34
  51. package/dist/collection/components/phirepass-downloader/views/job-row.js +0 -91
  52. package/dist/collection/components/phirepass-downloader/views/notices.js +0 -15
  53. package/dist/collection/components/phirepass-downloader/views/states.js +0 -19
  54. package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +0 -225
  55. package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +0 -549
  56. package/dist/collection/components/phirepass-media-player/player.js +0 -118
  57. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +0 -35
  58. package/dist/collection/testing/fixtures.js +0 -219
  59. package/dist/collection/testing/mock-channel.js +0 -410
  60. package/dist/components/p-5QoAejYG.js +0 -1
  61. package/dist/components/p-BekUePpu.js +0 -1
  62. package/dist/components/p-DIf-Ru26.js +0 -1
  63. package/dist/components/phirepass-downloader.d.ts +0 -11
  64. package/dist/components/phirepass-downloader.js +0 -1
  65. package/dist/components/phirepass-media-player.d.ts +0 -11
  66. package/dist/components/phirepass-media-player.js +0 -1
  67. package/dist/esm/phirepass-downloader_3.entry.js +0 -3808
  68. package/dist/phirepass-widgets/p-70a67e4d.entry.js +0 -1
  69. package/dist/phirepass-widgets/p-BekUePpu.js +0 -1
  70. package/dist/phirepass-widgets/p-Dd9o0CbU.js +0 -3
  71. package/dist/phirepass-widgets/p-ab33f71f.entry.js +0 -1
  72. package/dist/types/common/fetch.d.ts +0 -167
  73. package/dist/types/components/phirepass-downloader/form.d.ts +0 -54
  74. package/dist/types/components/phirepass-downloader/format.d.ts +0 -17
  75. package/dist/types/components/phirepass-downloader/jobs.d.ts +0 -123
  76. package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +0 -231
  77. package/dist/types/components/phirepass-downloader/source.d.ts +0 -61
  78. package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +0 -52
  79. package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +0 -31
  80. package/dist/types/components/phirepass-downloader/views/icons.d.ts +0 -5
  81. package/dist/types/components/phirepass-downloader/views/job-row.d.ts +0 -21
  82. package/dist/types/components/phirepass-downloader/views/notices.d.ts +0 -18
  83. package/dist/types/components/phirepass-downloader/views/states.d.ts +0 -38
  84. package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +0 -82
  85. package/dist/types/components/phirepass-media-player/player.d.ts +0 -53
  86. package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +0 -40
  87. package/dist/types/testing/fixtures.d.ts +0 -25
  88. package/dist/types/testing/mock-channel.d.ts +0 -132
@@ -1258,125 +1258,3 @@
1258
1258
  padding: 7px 0;
1259
1259
  }
1260
1260
  }
1261
-
1262
- /* ---------- Remote Fetch (the hosted <phirepass-downloader>) ---------- */
1263
-
1264
- :host .listing main .navigation .action.fetch {
1265
- position: relative;
1266
- display: inline-grid;
1267
- place-items: center;
1268
- color: hsl(var(--primary));
1269
- }
1270
-
1271
- :host .listing main .navigation .action.fetch .badge {
1272
- position: absolute;
1273
- top: -5px;
1274
- right: -6px;
1275
- min-width: 15px;
1276
- height: 15px;
1277
- padding: 0 4px;
1278
- border-radius: 8px;
1279
- background: hsl(var(--primary));
1280
- color: hsl(var(--primary-foreground));
1281
- font-size: 9px;
1282
- font-weight: 700;
1283
- line-height: 15px;
1284
- text-align: center;
1285
- }
1286
-
1287
- /* A download still arriving: its real name appears only when it finishes. */
1288
- :host .listing main .content table tbody tr.part td {
1289
- color: hsl(var(--muted-foreground));
1290
- font-style: italic;
1291
- }
1292
-
1293
- :host .listing main .content table tbody tr.fresh {
1294
- background-color: hsl(var(--primary) / 0.1);
1295
- }
1296
-
1297
- :host .listing main .content table tbody tr.fresh .name::after {
1298
- content: 'new';
1299
- margin-left: 8px;
1300
- font-size: 10px;
1301
- padding: 1px 6px;
1302
- border-radius: 3px;
1303
- background: hsl(var(--primary));
1304
- color: hsl(var(--primary-foreground));
1305
- font-weight: 600;
1306
- font-style: normal;
1307
- }
1308
-
1309
- :host .delete-dialog .file-name.inline {
1310
- display: inline;
1311
- padding: 0;
1312
- border: 0;
1313
- background: none;
1314
- }
1315
-
1316
- :host .context-backdrop {
1317
- position: absolute;
1318
- inset: 0;
1319
- z-index: 8;
1320
- }
1321
-
1322
- :host .context-menu {
1323
- position: absolute;
1324
- min-width: 220px;
1325
- max-width: calc(100% - 16px);
1326
- padding: 4px;
1327
- background: hsl(var(--card));
1328
- border: 1px solid hsl(var(--border));
1329
- border-radius: 6px;
1330
- box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.7);
1331
- display: flex;
1332
- flex-direction: column;
1333
- font-size: 12px;
1334
-
1335
- button {
1336
- display: flex;
1337
- align-items: center;
1338
- gap: 8px;
1339
- text-align: left;
1340
- padding: 6px 10px;
1341
- border: 0;
1342
- border-radius: 4px;
1343
- background: transparent;
1344
- color: rgb(189, 219, 209);
1345
- font: inherit;
1346
- cursor: pointer;
1347
-
1348
- &:hover,
1349
- &:focus-visible {
1350
- background: hsl(var(--muted));
1351
- outline: none;
1352
- }
1353
-
1354
- &.primary {
1355
- color: hsl(var(--primary));
1356
- }
1357
-
1358
- &.danger {
1359
- color: hsl(var(--destructive));
1360
- }
1361
- }
1362
-
1363
- hr {
1364
- border: 0;
1365
- border-top: 1px solid hsl(var(--border));
1366
- margin: 4px 0;
1367
- }
1368
- }
1369
-
1370
- :host .player-modal {
1371
- position: absolute;
1372
- inset: 0;
1373
- z-index: 7;
1374
- display: grid;
1375
- place-items: center;
1376
- padding: 10px;
1377
- background: rgba(5, 7, 9, 0.6);
1378
-
1379
- phirepass-media-player {
1380
- width: min(100%, 880px);
1381
- }
1382
- }
@@ -1,8 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import init, { Channel as PhirepassChannel } from "phirepass-channel";
3
- import { supportsDownloads } from "../../common/channel";
4
- import { DOWNLOADER_MSG_ID_BASE, isDownloadFrame } from "../../common/fetch";
5
- import { FetchButton, PartDeleteDialog, TorrentContextMenu, folderOfCompleted, isPartFile, isPlayableFile, sameFolder, } from "./phirepass-sftp-client.fetch";
6
3
  import svg from "./phirepass-sftp-client.logo.svg";
7
4
  import max from "./phirepass-sftp-client.max.svg";
8
5
  import chevron from "./phirepass-sftp-client.chevron.svg";
@@ -14,7 +11,6 @@ import upload from "./phirepass-sftp-client.upload.svg";
14
11
  import { ConnectionState, ProtocolMessageError, ProtocolMessageType, } from "../../common/protocol";
15
12
  // https://sweet-sftp-view.lovable.app/
16
13
  export class PhirepassSftpClient {
17
- el_host;
18
14
  channel;
19
15
  domReady = false;
20
16
  runtimeReady = false;
@@ -134,81 +130,6 @@ export class PhirepassSftpClient {
134
130
  filter = '';
135
131
  sort_key = 'name';
136
132
  sort_asc = true;
137
- // ---- Remote Fetch (hosted <phirepass-downloader>) ----
138
- /** True once the channel is authenticated: the downloader shares it from then on. */
139
- channel_ready = false;
140
- /** Running downloads, for the Fetch button's badge. */
141
- fetch_count = 0;
142
- /** Files a download just finished into the open folder, highlighted as new. */
143
- fresh_names = [];
144
- /** K3: a part file whose download a delete would end. */
145
- part_delete = null;
146
- torrent_menu = null;
147
- /** A listing file open in the player (not a download). */
148
- listing_player = null;
149
- downloaderEl;
150
- fetch_enabled() {
151
- return supportsDownloads(this.channel);
152
- }
153
- stream_base() {
154
- const protocol = this.allowInsecure ? 'http' : 'https';
155
- const standard = (!this.allowInsecure && this.serverPort === 443) || (this.allowInsecure && this.serverPort === 80);
156
- return `${protocol}://${this.serverHost}${standard ? '' : `:${this.serverPort}`}`;
157
- }
158
- on_fetch_completed(detail) {
159
- if (!sameFolder(folderOfCompleted(detail), this.current_dir)) {
160
- return;
161
- }
162
- this.fresh_names = [...this.fresh_names.filter((n) => n !== detail.name), detail.name];
163
- this.refresh_directory();
164
- }
165
- on_show_in_folder(detail) {
166
- this.fresh_names = [detail.name];
167
- if (!sameFolder(detail.path, this.current_dir)) {
168
- this.list_breadcrumb(detail.path);
169
- }
170
- }
171
- async on_row_context_menu(item, event) {
172
- if (item.kind !== 'File' || !/\.torrent$/i.test(item.name) || !this.downloaderEl) {
173
- return;
174
- }
175
- const path = this.item_path(item);
176
- event.preventDefault();
177
- const rel = await this.downloaderEl.torrentPathFor(path);
178
- if (rel === null) {
179
- return;
180
- }
181
- const box = this.el_host.getBoundingClientRect();
182
- this.selected_item = item;
183
- this.torrent_menu = { x: event.clientX - box.left, y: event.clientY - box.top, path, name: item.name };
184
- }
185
- async play_listing_file(item, event) {
186
- event.preventDefault();
187
- event.stopPropagation();
188
- const channel = this.channel;
189
- if (typeof channel.send_sftp_open_stream !== 'function') {
190
- return;
191
- }
192
- const path = this.item_path(item);
193
- try {
194
- const answer = (await this.run_op('play', (msgId) => channel.send_sftp_open_stream(this.nodeId, this.session_id, path, msgId)));
195
- if (answer.result !== 'Stream' || !answer.token) {
196
- throw new Error('The node did not open a stream.');
197
- }
198
- this.listing_player = {
199
- src: `${this.stream_base()}/api/web/stream/${encodeURIComponent(this.nodeId)}/t/${encodeURIComponent(answer.token)}`,
200
- name: item.name,
201
- key: `node:${this.nodeId}:${path}`,
202
- };
203
- }
204
- catch (err) {
205
- this.error_message = this.error_text(err);
206
- this.show_error = true;
207
- }
208
- }
209
- listing_can_play() {
210
- return typeof this.channel?.send_sftp_open_stream === 'function';
211
- }
212
133
  toggle_max() {
213
134
  this.maximizeEvent?.emit(!this.max);
214
135
  }
@@ -448,7 +369,6 @@ export class PhirepassSftpClient {
448
369
  this.channel.start_heartbeat(this.heartbeatInterval <= 15_000 ? 30_000 : this.heartbeatInterval);
449
370
  this.channel.open_sftp_tunnel(this.nodeId, this.serviceId);
450
371
  this.status = 'Connected';
451
- this.channel_ready = true;
452
372
  }
453
373
  handle_tunnel_opened(web) {
454
374
  this.session_id = web.sid;
@@ -466,9 +386,6 @@ export class PhirepassSftpClient {
466
386
  if (web.path !== this.current_dir) {
467
387
  this.filter = '';
468
388
  }
469
- if (web.path !== this.current_dir) {
470
- this.fresh_names = [];
471
- }
472
389
  this.listing = web.dir.items;
473
390
  this.current_dir = web.path;
474
391
  this.breadcrumbs = web.path.split('/').map((path, index, arr) => {
@@ -792,7 +709,6 @@ export class PhirepassSftpClient {
792
709
  this.channel.on_connection_close(() => {
793
710
  this.connectionStateChanged.emit([ConnectionState.Disconnected]);
794
711
  this.status = 'Disconnected';
795
- this.channel_ready = false;
796
712
  });
797
713
  this.channel.on_connection_error((err) => {
798
714
  this.connectionStateChanged.emit([ConnectionState.Error, err]);
@@ -803,11 +719,6 @@ export class PhirepassSftpClient {
803
719
  });
804
720
  this.channel.on_protocol_message((msg) => {
805
721
  const { web } = msg.data;
806
- // The downloader shares this channel: hand it what it asked for.
807
- if (isDownloadFrame(web) || (web.type === ProtocolMessageType.Error && (web.msg_id ?? 0) >= DOWNLOADER_MSG_ID_BASE)) {
808
- void this.downloaderEl?.receive(msg);
809
- return;
810
- }
811
722
  switch (web.type) {
812
723
  case ProtocolMessageType.Error:
813
724
  this.handle_error(web);
@@ -926,10 +837,6 @@ export class PhirepassSftpClient {
926
837
  this.filter = '';
927
838
  this.version = '';
928
839
  this.status = 'Disconnected';
929
- this.channel_ready = false;
930
- this.part_delete = null;
931
- this.torrent_menu = null;
932
- this.listing_player = null;
933
840
  }
934
841
  on_file_row_action(item, event) {
935
842
  event.preventDefault();
@@ -943,23 +850,6 @@ export class PhirepassSftpClient {
943
850
  event.preventDefault();
944
851
  event.stopPropagation();
945
852
  this.selected_item = item;
946
- // A plain SFTP delete of a running download's part file would only
947
- // make the job retry: ask the downloader to delete the download.
948
- if (item.kind === 'File' && isPartFile(item.name) && this.downloaderEl) {
949
- const downloader = this.downloaderEl;
950
- void downloader.jobForPath(this.item_path(item)).then((job) => {
951
- if (job) {
952
- this.part_delete = { download_id: job.download_id, name: item.name, busy: false };
953
- }
954
- else {
955
- this.open_delete_prompt(item);
956
- }
957
- });
958
- return;
959
- }
960
- this.open_delete_prompt(item);
961
- }
962
- open_delete_prompt(item) {
963
853
  this.delete_file_name = item.name;
964
854
  this.delete_is_dir = item.kind === 'Folder';
965
855
  this.delete_recursive = false;
@@ -1467,24 +1357,20 @@ export class PhirepassSftpClient {
1467
1357
  return `${typeChar}${chars.join('')}`;
1468
1358
  }
1469
1359
  render() {
1470
- return (h(Host, { key: 'c8a576625404b5653c066c2844160c40cff71603', class: {
1360
+ return (h(Host, { key: '9e2edc1a72c3a74b26feea2faa08b9f0a2e37a0c', class: {
1471
1361
  'default': !this.max,
1472
1362
  'max': this.max,
1473
- } }, h("section", { key: '87cc1357c8cba09dc857ac0035d701ee46f72ad3', class: "listing" }, !this.hideHeader &&
1474
- h("header", { key: 'f034a4a4d6498c8f813174566ce7ff258f6d98fb' }, h("section", { key: 'ce24941dbd0beffe42d5fa6bad89542d25e57ff8', class: "title" }, h("img", { key: '808e0b3f448e15ceb5a7daccce98f9314eb5b758', src: svg, alt: "SFTP Client" }), h("div", { key: '4b4e8244a97167010abc5ba2a518f9c7fd465b39', class: "text" }, h("div", { key: 'dc32511596fb480ef7fb280941b9de8099b5ff05', class: "name" }, this.name), h("div", { key: 'fc477ea5670b74c40f4af20022dac4f02bc8b96c', class: "description" }, this.description))), h("section", { key: '35beb6cd84dea257e428cca3338db239eed37cdb', class: "actions" }, h("div", { key: '7adecc9ecb0a24721fcf6e82f73b58d38946801e', class: "action", onClick: () => this.toggle_max() }, h("img", { key: 'e63674064553d3809a1d563bbe6fc83ad0aceb80', src: max, alt: "Maximize" })))), h("main", { key: '4bef9055a683d18e391c2620ba2351282a1165ca' }, this.show_navigation && h("nav", { key: 'e08ac22ec258e081195785661907d170b86bd83d', class: "navigation" }, h("div", { key: '026e32148d4062a7e6be2b58192676dc0102e2dd', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index, breadcrumbs) => (h("span", { key: index, class: "breadcrumb-container" }, h("span", { key: index, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index < breadcrumbs.length - 1 && h("img", { class: "arrow", src: chevron }))))), h("section", { key: '04f0111d530f2cb9a64bb0557b72820bd13832bf', class: "actions", "aria-label": "SFTP actions" }, h("input", { key: 'fb28f1861a4dd9c83aaa4a20a5d25dde3e6337c7', class: "filter", type: "search", autocorrect: "off", autocapitalize: "none", autoComplete: "off", placeholder: "Filter", "aria-label": "Filter this directory", value: this.filter, onInput: (event) => this.filter = event.target.value }), h("button", { key: '5e173f8426eee17b08b05547e9ba033746a5a84a', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, h("img", { key: '64ed13f7093abc57f9b73638b902b160d11c1fd3', src: go_up, alt: "Go up" })), h("button", { key: 'e6a7d97bc089f3b023d06213852aec8e5cd83d18', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, h("img", { key: '66590858743453d7fc0fbb578e98da2a8bc762d5', src: refresh, alt: "Refresh" })), h("button", { key: '8eca55beb0377394da8fae85546b25ee74c0f6f9', type: "button", class: "action", onClick: () => this.open_mkdir(), title: "New folder", "aria-label": "New folder" }, h("svg", { key: '12d1fc50a9e325a1214462f2a06d734ab38ff1c1', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: '7148c12cc461d1778ccfb3e3129786655f780dc2', d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }), h("line", { key: 'a5701765411cff983baa1c4248a383c3a3a9dca6', x1: "12", x2: "12", y1: "10", y2: "16" }), h("line", { key: '9c22835c4279619e8c8cd130007d07ed19795366', x1: "9", x2: "15", y1: "13", y2: "13" }))), this.fetch_enabled() && h(FetchButton, { key: '259d3c2e7bdadac5d1ed77724628459e6c440e09', count: this.fetch_count, onClick: () => void this.downloaderEl?.openFetch(this.current_dir) }), h("button", { key: 'f744681697e23f2f2892a01b625490fc66999592', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, h("img", { key: 'bcb2e3f7c283f4213b0a27cb97afd3e61f8d954e', src: upload, alt: "Upload" })), h("button", { key: '5348bc25576e559e7b2f05ec6378fe72fc8483f5', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), h("input", { key: '7daf75741416f3aeb759ddc6c94106167291d641', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && h("div", { key: 'e384c122d7454b16d13066a7cc6f7f3aa1414feb', class: "content", tabindex: 0, onKeyDown: (event) => this.on_listing_keydown(event) }, h("table", { key: 'bd1b14b317290eb59cb867a2bfbf23fb63b2fa94' }, h("thead", { key: 'c414438b0e8f2a776643bdaaf6441b01ed7c3be3' }, h("tr", { key: 'fd7d0947644aa0e0eb93d56dfacb8fe545c805f3' }, h("th", { key: '8e62f0daaaad938db61b85586aeb138844877ebe', class: "sortable", onClick: () => this.toggle_sort('name'), title: "Sort by name" }, "Name", this.sort_indicator('name')), h("th", { key: 'f2d3e287c8f0f97e23c173c10393d0eec4e4a752', class: "sortable", onClick: () => this.toggle_sort('size'), title: "Sort by size" }, "Size", this.sort_indicator('size')), h("th", { key: 'd62906a8dd76c22cfcf2c7a82d37ffe8ac3582ba' }, "Permissions"), h("th", { key: 'd5ce78f188629f956704a70a8d2280a1db945666' }, "Owner"), h("th", { key: '42d52536f0c5daa29af06c892c5ca3f79b888216', class: "sortable", onClick: () => this.toggle_sort('modified'), title: "Sort by modified date" }, "Modified", this.sort_indicator('modified')), h("th", { key: '4b80527286d771950be9219387fb938e92f07b63', class: "action-col", "aria-label": "Actions" }))), h("tbody", { key: '1959c3f04257c8c1a2e93b4717a6eef9a7999437' }, this.visible_listing().map((item, index) => (h("tr", { key: index, class: {
1363
+ } }, h("section", { key: '72fae8227792615a5452f9b01ec8230c2c10e2a9', class: "listing" }, !this.hideHeader &&
1364
+ h("header", { key: '14632fcb4575678418132892308cfea1903fadab' }, h("section", { key: '3ea3fb2cab9d4cdf36af3876235579562a7acbef', class: "title" }, h("img", { key: 'fd0badaae9b0d7b426ddece5faf7ea3515e9bbf0', src: svg, alt: "SFTP Client" }), h("div", { key: '4eece24a618c119861f5435eb3f1ae8a5bae4966', class: "text" }, h("div", { key: '84b45196e1a1609451413cf8ea369b60cd7f5ec6', class: "name" }, this.name), h("div", { key: '45da97e659ecbaa69e74d1789a1b7961b760a753', class: "description" }, this.description))), h("section", { key: '9177dcc02b911e95870c5f55fc48f741895a0b75', class: "actions" }, h("div", { key: '468f341eebf7569c2a1c4aeea09d56644e5b6161', class: "action", onClick: () => this.toggle_max() }, h("img", { key: '203b54e42cddc50bf068a49fa7f88c846ecaa2c9', src: max, alt: "Maximize" })))), h("main", { key: 'c0f757aaa07734199228e3dc520c98694bc6548d' }, this.show_navigation && h("nav", { key: '295440219080af5fa33566300fb1036998da399c', class: "navigation" }, h("div", { key: 'c9b63f04de675559d2e2bbb876115c63e00bfbd2', class: "breadcrumbs" }, this.breadcrumbs.map((crumb, index, breadcrumbs) => (h("span", { key: index, class: "breadcrumb-container" }, h("span", { key: index, onClick: () => this.list_breadcrumb(crumb.path), class: "breadcrumb" }, crumb.label), index < breadcrumbs.length - 1 && h("img", { class: "arrow", src: chevron }))))), h("section", { key: '325ccd4be07d61df1e16956b5818683feb70c52f', class: "actions", "aria-label": "SFTP actions" }, h("input", { key: 'f75b4191b0718bd2234497b7168af9dc13a070d6', class: "filter", type: "search", autocorrect: "off", autocapitalize: "none", autoComplete: "off", placeholder: "Filter", "aria-label": "Filter this directory", value: this.filter, onInput: (event) => this.filter = event.target.value }), h("button", { key: 'da64c4a88332d3efab6a6e03e8c16a8a1db96b43', type: "button", class: "action", onClick: () => this.go_to_parent_directory(), title: "Go to parent directory", "aria-label": "Go to parent directory" }, h("img", { key: '309e0fdb89aa4d119a5193f1803ebdc117e55105', src: go_up, alt: "Go up" })), h("button", { key: '5f451e50801f10b88a3436515d792b1015bf48bb', type: "button", class: "action", onClick: () => this.refresh_directory(), title: "Refresh", "aria-label": "Refresh" }, h("img", { key: 'aa673b81504e65e78043c328f94d3a9dd02f696a', src: refresh, alt: "Refresh" })), h("button", { key: '963f5abf044c207f9e42babe9e029ac052521f36', type: "button", class: "action", onClick: () => this.open_mkdir(), title: "New folder", "aria-label": "New folder" }, h("svg", { key: 'd441f67a8b5d2944f95e934d60d680dc22ec7c6c', xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { key: '9eec6695289a71b135dee4751217cd4b4810a276', d: "M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }), h("line", { key: '9a759bd7ac97c4e8ebf75c4d54e8f207999634c2', x1: "12", x2: "12", y1: "10", y2: "16" }), h("line", { key: '4591434cdbb6a7d3a1a0212409fe38e21e02a52e', x1: "9", x2: "15", y1: "13", y2: "13" }))), h("button", { key: '301d406858c2d9a4656a342b49e663e76a7f1970', type: "button", class: "action", onClick: () => this.open_upload_picker(), title: "Upload", "aria-label": "Upload" }, h("img", { key: '36ff8480d3acf65282d6ef648349327eb3432237', src: upload, alt: "Upload" })), h("button", { key: '3fa19d5e17ef2e2a8fc926c8ba6994a4a30a1825', type: "button", class: "action disconnect", onClick: () => this.disconnect_session(), title: "Disconnect", "aria-label": "Disconnect" }, "DISCONNECT"))), h("input", { key: 'f5cf6cc13d4b760b538d630467972c8add2df490', type: "file", ref: (el) => this.uploadInputEl = el, onChange: (event) => this.on_upload_selected(event), style: { display: 'none' } }), this.show_content && h("div", { key: 'd69a7009192adc292cf3ccf4de6a4f059b46fa0e', class: "content", tabindex: 0, onKeyDown: (event) => this.on_listing_keydown(event) }, h("table", { key: '2f00d85024b3e4642925f488a34d228dd056a2ce' }, h("thead", { key: '611091a29f97e218f5282e11c7c1accdc1be5732' }, h("tr", { key: '5f0d04ff8a5009852af02472f4261b9a95733a3c' }, h("th", { key: '6df9558b86b3d3161920d5f94e8df0cf47ee9c80', class: "sortable", onClick: () => this.toggle_sort('name'), title: "Sort by name" }, "Name", this.sort_indicator('name')), h("th", { key: '83384582ac59c07f65526cfc5fd1359b5a0cd912', class: "sortable", onClick: () => this.toggle_sort('size'), title: "Sort by size" }, "Size", this.sort_indicator('size')), h("th", { key: 'cbc16eafd7fb17c9d79b5612502140bc9a16a3cb' }, "Permissions"), h("th", { key: '25d802dd84a6cc3eda222d5a732e05010c405f31' }, "Owner"), h("th", { key: 'cf5f9df11baae69f664724c6a79df0a95a5189a8', class: "sortable", onClick: () => this.toggle_sort('modified'), title: "Sort by modified date" }, "Modified", this.sort_indicator('modified')), h("th", { key: '9c8b9515c81245656d89ea65ee091a70606c1a93', class: "action-col", "aria-label": "Actions" }))), h("tbody", { key: '40f8ec5d38a0601af3520891c4a9d35b2da2c32f' }, this.visible_listing().map((item, index) => (h("tr", { key: index, class: {
1475
1365
  'selected': this.is_selected(item),
1476
- 'part': item.kind === 'File' && isPartFile(item.name),
1477
- 'fresh': item.kind === 'File' && this.fresh_names.includes(item.name),
1478
- }, onClick: () => this.list_directory(item), onContextMenu: (event) => void this.on_row_context_menu(item, event) }, h("td", null, item.kind === 'Folder' ? h("img", { class: "kind", src: folder, alt: "Folder" }) : h("img", { class: "kind", src: file, alt: "File" }), h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), h("td", null, item.kind === 'Folder' ? '-' : this.format_size(item.attributes.size)), h("td", null, this.format_permissions(item.attributes.permissions, item.kind)), h("td", null, item.attributes.user ?? '-'), h("td", null, new Date(item.attributes.modified * 1000).toLocaleString()), h("td", { class: "action-col" }, h("div", { class: "file-actions" }, item.kind === 'File' && isPlayableFile(item.name) && this.listing_can_play() &&
1479
- h("button", { type: "button", class: "file-action", onClick: (event) => void this.play_listing_file(item, event), title: "Play", "aria-label": `Play ${item.name}` }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true" }, h("path", { d: "M7 5v14l12-7z" }))), item.kind === 'File' &&
1366
+ }, onClick: () => this.list_directory(item) }, h("td", null, item.kind === 'Folder' ? h("img", { class: "kind", src: folder, alt: "Folder" }) : h("img", { class: "kind", src: file, alt: "File" }), h("span", { class: `name ${item.kind.toLowerCase()}` }, item.name)), h("td", null, item.kind === 'Folder' ? '-' : this.format_size(item.attributes.size)), h("td", null, this.format_permissions(item.attributes.permissions, item.kind)), h("td", null, item.attributes.user ?? '-'), h("td", null, new Date(item.attributes.modified * 1000).toLocaleString()), h("td", { class: "action-col" }, h("div", { class: "file-actions" }, item.kind === 'File' &&
1480
1367
  h("button", { type: "button", class: "file-action", onClick: (event) => this.on_edit_action(item, event), title: "Edit", "aria-label": `Edit ${item.name}` }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }), h("path", { d: "M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z" }))), item.kind === 'File' &&
1481
1368
  h("button", { type: "button", class: "file-action", onClick: (event) => this.on_file_row_action(item, event), title: "Download", "aria-label": `Download ${item.name}` }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { points: "7 10 12 15 17 10" }), h("line", { x1: "12", x2: "12", y1: "15", y2: "3" }))), h("button", { type: "button", class: "file-action", onClick: (event) => this.on_rename_action(item, event), title: "Rename", "aria-label": `Rename ${item.name}` }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("path", { d: "M12 20h9" }), h("path", { d: "M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z" }))), h("button", { type: "button", class: "file-action", onClick: (event) => this.on_chmod_action(item, event), title: "Permissions", "aria-label": `Change permissions on ${item.name}` }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }), h("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" }))), h("button", { type: "button", class: "file-action delete", onClick: (event) => this.on_file_delete_action(item, event), title: "Delete", "aria-label": `Delete ${item.name}` }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("polyline", { points: "3 6 5 6 21 6" }), h("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }), h("path", { d: "M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6" }), h("line", { x1: "10", x2: "10", y1: "11", y2: "17" }), h("line", { x1: "14", x2: "14", y1: "11", y2: "17" })))))))), this.visible_listing().length === 0 &&
1482
- h("tr", { key: '94619eb9cf5506a57c6d085ac6b91d41b7770553', class: "empty" }, h("td", { key: '87161e6091cf501364eda0d0b1072a937f8c9946', colSpan: 6 }, this.filter ? `Nothing here matches "${this.filter}".` : 'This directory is empty.'))))), this.show_loader && h("div", { key: 'db0f871976de1f36a72fa947441e0fb1f6051438', class: "loader" }, "Loading..."), this.show_error && h("div", { key: '8870f437cfe246be74479d98f0a0d5a2bc72f781', class: "error" }, this.error_message)), this.fetch_enabled() &&
1483
- h("phirepass-downloader", { key: '917af582cad03523807ef641710f85bd74bb317e', ref: (el) => this.downloaderEl = el, compact: true, channel: this.channel, connected: this.channel_ready, nodeId: this.nodeId, browsingService: this.serviceId, browsingPath: this.current_dir, streamBase: this.stream_base(), onPhirepassActiveCount: (event) => this.fetch_count = event.detail.n, onPhirepassFetchCompleted: (event) => this.on_fetch_completed(event.detail), onPhirepassShowInFolder: (event) => this.on_show_in_folder(event.detail) }), h("footer", { key: 'ff3c726b1762ca1789b1f3cd795613d9e64ec445' }, h("section", { key: '47e1cbc5a79ee62355136341add2b67456d1a462', class: "status" }, this.status, this.selected_item && h("span", { key: 'c828889045b7d0cca91ce0703a577f9a35a708e0', class: "selected-item" }, this.selected_item.name)), h("section", { key: '9e16fe486979999adadd80483542709570a5992d', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
1484
- h("section", { key: '4da9c7934d550538c3bd488c7ad455af30ff4e00', class: {
1369
+ h("tr", { key: '46a173ad6542c9ab315da2792ea9830f0086b683', class: "empty" }, h("td", { key: '986924de123f9be62f89f869fca02cd195134080', colSpan: 6 }, this.filter ? `Nothing here matches "${this.filter}".` : 'This directory is empty.'))))), this.show_loader && h("div", { key: '588f4ff57df18c993f8566711a2627bd69b03881', class: "loader" }, "Loading..."), this.show_error && h("div", { key: '816c8ca05f68291d784d4c86509c9478204f3449', class: "error" }, this.error_message)), h("footer", { key: '6add74a0d5beb8de15a600d287d96dd69f87a646' }, h("section", { key: '39b31ae22b9f6298b8991be47d5641c1de618ab7', class: "status" }, this.status, this.selected_item && h("span", { key: '6e3942b5471e240719dfaf66cb01763f162ff3f0', class: "selected-item" }, this.selected_item.name)), h("section", { key: 'cc7ab5a9a632da8fae266f9ae73f967083e3589f', class: "version" }, this.version ? `Version: ${this.version}` : ''))), this.show_login_screen &&
1370
+ h("section", { key: '3e13e8c942f690d2e26c231c2403032af620f735', class: {
1485
1371
  'creds': true,
1486
1372
  'blurred': this.show_login_screen,
1487
- } }, h("form", { key: '576cc82e5cd90978039e1e644af04194485b86d6', class: "auth", onSubmit: (event) => {
1373
+ } }, h("form", { key: '7ddb982159a3470bfad44aea75973a2eb37bebcd', class: "auth", onSubmit: (event) => {
1488
1374
  const formData = new FormData(event.target);
1489
1375
  let username = undefined;
1490
1376
  if (this.show_login_screen_username) {
@@ -1501,86 +1387,57 @@ export class PhirepassSftpClient {
1501
1387
  this.show_loader = true;
1502
1388
  event.stopPropagation();
1503
1389
  event.preventDefault();
1504
- } }, h("div", { key: '27098f0a63b4ceddd4e0bf0d84b3b3f321a3f512', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
1505
- h("div", { key: '2714b5b014572d4f58523ddb79bde232bf9b65f1' }, h("label", { key: '8f0c73f148cc08fc8db445cd99fbab060807fe12', htmlFor: "username" }, "Username"), h("input", { key: 'c64fd60eb284e8a77d0943380cb3fcbacbc333fa', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
1506
- h("div", { key: '2d84bbacefcb3b4ba84a9b8ce74bd662fa62c8b3' }, h("label", { key: '0ce1b8309229d45ab0f54d5e2de1e40b3fab57f0', htmlFor: "password" }, "Password"), h("input", { key: '5752cbe6e72c332be94c0b9a813a66526ab06f3c', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), h("div", { key: 'e272596a07a758d008a90a2c2290e589feeb8b3f' }, h("button", { key: '5ddb365a8b700a8d5051539bed3c9aafef20a099', type: "submit" }, "Connect")))), this.show_upload_modal &&
1507
- h("section", { key: 'b4314fc5bb3ace26757d690ff4113954144362f6', class: {
1390
+ } }, h("div", { key: '036877a02034000a79836c0a0979def9163f8a1a', class: "title" }, "SFTP Connection"), this.show_login_screen_username &&
1391
+ h("div", { key: '37830ddb769fe0491831700a90f3fc8bf71cf050' }, h("label", { key: '0f6e3d70e34baae3342a57fceed657e59c8c05a4', htmlFor: "username" }, "Username"), h("input", { key: '3ecb202b3ee015e8719c330edb06889f4f48a433', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "username", name: "username", type: "text", placeholder: "" })), this.show_login_screen_password &&
1392
+ h("div", { key: '092a40a9da1205ec6342069844135aea92b85c5a' }, h("label", { key: '19e465136660c9d2c1ecd0bb02bd7f8a559e3e0b', htmlFor: "password" }, "Password"), h("input", { key: 'ab9a74273abc594fa9fd51a780c2586fb275b4b4', autocorrect: "off", autocapitalize: "none", autoComplete: "off", id: "password", name: "password", type: "password", placeholder: "" })), h("div", { key: 'c1596787c7fea135d203f831cb7432a6e803d488' }, h("button", { key: '89314be80add42ba55f96ec01bf22848742ec179', type: "submit" }, "Connect")))), this.show_upload_modal &&
1393
+ h("section", { key: 'c8b08cf050947d1936c97caf46eacca93175db9f', class: {
1508
1394
  'upload-modal': true,
1509
1395
  'visible': this.show_upload_modal,
1510
- } }, h("div", { key: '8d152c11c9c27528b667199e6cd66e7129506be6', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, h("div", { key: '703aa9f78b0248f026ae168d95db2aaaea65a6ce', class: "title" }, "Uploading File"), h("div", { key: '8e9bceaea052b871b2b6700684384515260c864c', class: "file-name", title: this.upload_file_name }, this.upload_file_name), h("div", { key: '0c3f7be58a562e339dea87904297d0407bddb289', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, h("div", { key: 'e003866966bdae3af7e9321b288dd23424491a16', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), h("div", { key: 'ac5e45111e0d694b09c4af709378e827288ad418', class: "progress-meta" }, h("div", { key: '63e5c77d6af531e49fe9817167d945fc6e80e1be', class: "progress-speed" }, this.upload_speed), h("div", { key: '369628aa1ba577c4a4a9fa13930985716830b993', class: "progress-value" }, this.format_percent(this.upload_progress))), h("button", { key: 'da4984bb0fc81d65a8f2876aa1aaba5dc8ea9da8', type: "button", class: {
1396
+ } }, h("div", { key: 'ccc745354525565cda06b6b6eb8253c557c59009', class: "upload-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Upload progress" }, h("div", { key: 'd478b113fa655386998d93862fc53bf516eaf90b', class: "title" }, "Uploading File"), h("div", { key: '35c85475b00efcf05097e1feae1313afde0d04af', class: "file-name", title: this.upload_file_name }, this.upload_file_name), h("div", { key: 'd5cb7df154d77dacdca48673b2f01e03729846b0', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.upload_progress }, h("div", { key: '4a7c10979b37d06acdda30c0b8d04a2af3cf0e5a', class: "progress-fill", style: { width: `${this.upload_progress}%` } })), h("div", { key: 'c69da13c3bc15a9a36867cbb1a8d041780ffecca', class: "progress-meta" }, h("div", { key: '000b027205a828e1257263e29b5a595ead0fe54a', class: "progress-speed" }, this.upload_speed), h("div", { key: '8eda5c230e39343ffb10aa1bc64f70999d428c57', class: "progress-value" }, this.format_percent(this.upload_progress))), h("button", { key: 'b047fe324179b9f77f97f7bcf541c32e0903bad9', type: "button", class: {
1511
1397
  'cancel': true,
1512
1398
  'finished': this.upload_finished,
1513
1399
  }, onClick: () => this.cancel_upload() }, this.upload_finished ? 'Close' : 'Cancel'))), this.show_download_modal &&
1514
- h("section", { key: '88a14959b710af2dcced2fc37b7c404272571084', class: {
1400
+ h("section", { key: 'fff5c3228be15048397b86a1457f63d4562c98f8', class: {
1515
1401
  'download-modal': true,
1516
1402
  'visible': this.show_download_modal,
1517
- } }, h("div", { key: '86bbc1dd32612e7b63c4af35b366fe0a74597ed9', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, h("div", { key: '8c3edb4fc04ffaecb3fbd5b6d1aeab4211d7876c', class: "title" }, "Downloading File"), h("div", { key: '4815f43687f525c0b6f598e98f9df237a4253dd9', class: "file-name", title: this.download_file_name }, this.download_file_name), h("div", { key: '095ac5ffbcb3f4a1bfe5742232752baffb93308e', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, h("div", { key: '6a1f3d4ddbbda2c8a4069b59c7882ddcddee5b4d', class: "progress-fill", style: { width: `${this.download_progress}%` } })), h("div", { key: 'db52703f7105f26aa4234eb6b623524362ced064', class: "progress-meta" }, h("div", { key: 'a12b2578badf08fc272f3533db2fd93fa946a4b2', class: "progress-speed" }, this.download_speed), h("div", { key: '3b2b1d92c4534d6f7adf01d64a1593af504f98d0', class: "progress-value" }, this.format_percent(this.download_progress))), h("button", { key: 'f9a668ef58d9566ebaf66ad9219d619005294a6f', type: "button", class: {
1403
+ } }, h("div", { key: '8bbf7465cdb2b514b16c4982b3480b04aa5e1a6c', class: "download-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Download progress" }, h("div", { key: 'dea4371acce3010cefdb14bbc3873d6cca1e308c', class: "title" }, "Downloading File"), h("div", { key: 'cffc4ad6e269108252db2bbb3b3f9678e88aed4b', class: "file-name", title: this.download_file_name }, this.download_file_name), h("div", { key: 'ec0fd7bbd72c2c1dcb55dffb39a8e550af9c54a6', class: "progress-track", role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": this.download_progress }, h("div", { key: 'c899bcf67b523e9de0db76bc9163d192120fd61b', class: "progress-fill", style: { width: `${this.download_progress}%` } })), h("div", { key: '14c343bb055ca7300f3b500bb9da06450f9338c8', class: "progress-meta" }, h("div", { key: '6b030a95eb9b11d88a070dd8a8dc9f4a2d10302a', class: "progress-speed" }, this.download_speed), h("div", { key: '0d8eb9884506e9bb7a31ea1ceedc0f3e3e74f9b8', class: "progress-value" }, this.format_percent(this.download_progress))), h("button", { key: '4416377601c6655ba0e9385e6149dd461702439a', type: "button", class: {
1518
1404
  'cancel': true,
1519
1405
  'finished': this.download_finished,
1520
1406
  }, onClick: () => this.cancel_download() }, this.download_finished ? 'Close' : 'Cancel'))), this.show_delete_modal &&
1521
- h("section", { key: 'cbcf699a17d748a8a7fa3daf1d96f42e47847bd6', class: {
1407
+ h("section", { key: '803d5f9fc2096c44335380132eee7d6ee1c70c1f', class: {
1522
1408
  'delete-modal': true,
1523
1409
  'visible': this.show_delete_modal,
1524
- } }, h("div", { key: '3ac99ddba7dc86a7712a4cbb1516254a62f88ef4', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation", tabindex: -1, onKeyDown: (event) => this.on_modal_keydown(event, () => this.cancel_delete()) }, h("div", { key: '5075e7e7fda69e6941980d3bb257b30bd61d1b03', class: "title" }, this.delete_is_dir ? 'Delete Folder' : 'Delete File'), h("div", { key: 'a9bc63a90afc0f56caccdda8c782abf761b06fa9', class: "message" }, this.delete_loading
1410
+ } }, h("div", { key: '0f23cb5f9ed35b97accc994277c86eff46de74bd', class: "delete-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Delete confirmation", tabindex: -1, onKeyDown: (event) => this.on_modal_keydown(event, () => this.cancel_delete()) }, h("div", { key: '6b64cac5732de2d5c091fea7ef1cd1b903b86c61', class: "title" }, this.delete_is_dir ? 'Delete Folder' : 'Delete File'), h("div", { key: 'f1b6592449d9697208c704dcaaeec83d4d40d852', class: "message" }, this.delete_loading
1525
1411
  ? (this.delete_recursive ? 'Deleting the folder and everything in it...' : 'Deleting...')
1526
- : `Are you sure you want to delete this ${this.delete_is_dir ? 'folder' : 'file'}?`), h("div", { key: '50a72830064fc1352787d6ac761a13e8c6d2d5ce', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_is_dir &&
1527
- h("label", { key: '528ba9b17f186d54e98fa5abe26d649721880eab', class: "checkline" }, h("input", { key: '33dc78531ac4833e95460b93de7d211979a7973b', type: "checkbox", checked: this.delete_recursive, disabled: this.delete_loading, onChange: (event) => this.delete_recursive = event.target.checked }), h("span", { key: '68517a96007ba248bbcac1fffaae2b048c4aafaf' }, "Delete everything inside it too")), !this.delete_is_dir || this.delete_recursive ? null :
1528
- h("div", { class: "hint" }, "Without this, the remote refuses a folder that is not empty."), this.delete_error && h("div", { key: 'fb0df28a4daa756166deec9dd18c0acae8874202', class: "dialog-error" }, this.delete_error), this.delete_loading &&
1529
- h("div", { key: '114fcfea0367efd1f2df2d06beeba2013058ff73', class: "delete-loader", "aria-hidden": "true" }, h("span", { key: '2b07a71d733ba7606fa45f0d24548b2b63dcc798', class: "spinner" })), h("div", { key: '44cfc262272484fdbd41257c39457d42de6e1f29', class: "modal-actions" }, h("button", { key: '5035eb462279fb4e89036a34b5b5b64eee052706', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), h("button", { key: 'f16d9f97ce99691c0cfbbad16679bb1dc3affbc9', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete')))), this.prompt_kind &&
1530
- h("section", { key: '8ee05b491fbc60b2fa9115fa7a88b60960e3326a', class: "prompt-modal visible" }, h("div", { key: '46622ceafa285047e2df9082251d7a02e38cb49f', class: "prompt-dialog", role: "dialog", "aria-modal": "true", "aria-label": this.prompt_kind === 'mkdir' ? 'New folder' : 'Rename', tabindex: -1, onKeyDown: (event) => this.on_modal_keydown(event, () => this.close_prompt()) }, h("div", { key: '1dce2a864f58590017238fc76810297190dc223f', class: "title" }, this.prompt_kind === 'mkdir' ? 'New Folder' : 'Rename'), h("div", { key: '556e931df541d9ca07a58882cf658572c23276fe', class: "message" }, this.prompt_kind === 'mkdir'
1412
+ : `Are you sure you want to delete this ${this.delete_is_dir ? 'folder' : 'file'}?`), h("div", { key: 'a67f8bd35875e0477fcf3bbf9f075b10f9066f07', class: "file-name", title: this.delete_file_name }, this.delete_file_name), this.delete_is_dir &&
1413
+ h("label", { key: '5e660c03c1df789bcdc4dba7a2adfe4887dd71ca', class: "checkline" }, h("input", { key: 'c28122496182d007ae2f99d9de79451c23dadef5', type: "checkbox", checked: this.delete_recursive, disabled: this.delete_loading, onChange: (event) => this.delete_recursive = event.target.checked }), h("span", { key: '53539d4803c5358d26e181dc53fcc7f36ad62d6a' }, "Delete everything inside it too")), !this.delete_is_dir || this.delete_recursive ? null :
1414
+ h("div", { class: "hint" }, "Without this, the remote refuses a folder that is not empty."), this.delete_error && h("div", { key: '0773a1e6a26fa8dde7dba0d0ed00107d01782e2f', class: "dialog-error" }, this.delete_error), this.delete_loading &&
1415
+ h("div", { key: 'b1580f0825ec4f4b37f894fbd714f143a9515fd6', class: "delete-loader", "aria-hidden": "true" }, h("span", { key: 'db549d437007182afdaddab37d8caec7b1c4a2c7', class: "spinner" })), h("div", { key: '040a4c6730ce5149737211fae9d67a3a290bdc5c', class: "modal-actions" }, h("button", { key: 'b742ccd04a3e119c446a2186081835fd6f67022d', type: "button", class: "btn secondary", onClick: () => this.cancel_delete(), disabled: this.delete_loading }, "Cancel"), h("button", { key: '4ce414e250ace86f93d24e399ca56014e56c7757', type: "button", class: "btn destructive", onClick: () => this.confirm_delete(), disabled: this.delete_loading }, this.delete_loading ? 'Deleting...' : 'Delete')))), this.prompt_kind &&
1416
+ h("section", { key: 'd533b9ecb021dbb69766ba92e87d0b4279b047d4', class: "prompt-modal visible" }, h("div", { key: 'f7fbe0ee2323439da2c991046d90b1b6397ebee8', class: "prompt-dialog", role: "dialog", "aria-modal": "true", "aria-label": this.prompt_kind === 'mkdir' ? 'New folder' : 'Rename', tabindex: -1, onKeyDown: (event) => this.on_modal_keydown(event, () => this.close_prompt()) }, h("div", { key: '36b154bda604336f8bbb7c46d7bb35b6afd6cec2', class: "title" }, this.prompt_kind === 'mkdir' ? 'New Folder' : 'Rename'), h("div", { key: '76b8027be289fcdba2867e1b06f05cab8481564d', class: "message" }, this.prompt_kind === 'mkdir'
1531
1417
  ? `Create a folder in ${this.current_dir}`
1532
- : 'Give it a new name. Existing names are not overwritten.'), h("form", { key: 'b6a5807b0208576e15468912c48bcdc314cf2d41', onSubmit: (event) => { event.preventDefault(); event.stopPropagation(); void this.submit_prompt(); } }, h("input", { key: 'd7ad180a2b431046905f37ee8ba21e6933f8eb09', class: "dialog-input", type: "text", autocorrect: "off", autocapitalize: "none", autoComplete: "off", spellcheck: false, "aria-label": "Name", disabled: this.prompt_busy, value: this.prompt_value, onInput: (event) => this.prompt_value = event.target.value, ref: (el) => this.focus_once(el, this.promptInputEl, (kept) => this.promptInputEl = kept) }), this.prompt_error && h("div", { key: 'c0afc0bc34860b1c8bcfea5087d8afca425edf6a', class: "dialog-error" }, this.prompt_error), h("div", { key: '91899e1d57a82434cc859e7d90636bd9f1df2545', class: "modal-actions" }, h("button", { key: '24f1d359789dbd40e8d98ddf220acf2e5cdbb1e1', type: "button", class: "btn secondary", onClick: () => this.close_prompt(), disabled: this.prompt_busy }, "Cancel"), h("button", { key: '3a5ae8f5edbbe70c226d9ec01d204b0f276607cd', type: "submit", class: "btn primary", disabled: this.prompt_busy }, this.prompt_busy ? 'Working...' : (this.prompt_kind === 'mkdir' ? 'Create' : 'Rename')))))), this.chmod_target &&
1533
- h("section", { key: '3f5daa368a81ae49fd074c33979fad6d9dc1e79f', class: "prompt-modal visible" }, h("div", { key: 'a2cfc7cbecbead9ccd977e74213c48ba47d5e0f7', class: "prompt-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Change permissions", tabindex: -1, onKeyDown: (event) => this.on_modal_keydown(event, () => this.close_chmod()) }, h("div", { key: '6db7c2771db3bf9dc4c16c506c95fbadc01b24d5', class: "title" }, "Permissions"), h("div", { key: 'c6fba2cffb84fd01ac51171ddedc140978652756', class: "file-name", title: this.chmod_target.name }, this.chmod_target.name), h("table", { key: 'fc871c448ad4ad75754256f0b4d9ce9e5188ea90', class: "perm-grid" }, h("thead", { key: 'b2de44bba7219257af5e16687f1f9e44b64429b8' }, h("tr", { key: 'b4e964c7281f8088385d1707df0c638b99c0e1e7' }, h("th", { key: 'a0bebfa92a96c6276a8c57bbd56555c1c8cacbd2', "aria-label": "Class" }), h("th", { key: 'c7618c92048861c4ee94d0fb8078c6dd719d9603' }, "Read"), h("th", { key: '23d0d6cbf7de82f337d4230e0286174a5fc6bd97' }, "Write"), h("th", { key: 'fbbe7fafe3aa03ed29db6038157167362c736f9c' }, "Execute"))), h("tbody", { key: '5468214c98eb5e6278cade8d46bcae62394d0205' }, [
1418
+ : 'Give it a new name. Existing names are not overwritten.'), h("form", { key: '8ec6e410dc6572de35ff6b2c81734fa48d74a4a8', onSubmit: (event) => { event.preventDefault(); event.stopPropagation(); void this.submit_prompt(); } }, h("input", { key: '0511fa8205057fe088be93781c23e283bc07739e', class: "dialog-input", type: "text", autocorrect: "off", autocapitalize: "none", autoComplete: "off", spellcheck: false, "aria-label": "Name", disabled: this.prompt_busy, value: this.prompt_value, onInput: (event) => this.prompt_value = event.target.value, ref: (el) => this.focus_once(el, this.promptInputEl, (kept) => this.promptInputEl = kept) }), this.prompt_error && h("div", { key: '2644600b1e015e02209309e1163e991acabad2e9', class: "dialog-error" }, this.prompt_error), h("div", { key: '520937e554f3ff7839aad18fd0ed3c56f8a21680', class: "modal-actions" }, h("button", { key: 'e5a037f006c3f97e6227e672cff6cf3dc7282abb', type: "button", class: "btn secondary", onClick: () => this.close_prompt(), disabled: this.prompt_busy }, "Cancel"), h("button", { key: 'b7883cc44b152c2c648f133eb5ffd7f5942d0aa4', type: "submit", class: "btn primary", disabled: this.prompt_busy }, this.prompt_busy ? 'Working...' : (this.prompt_kind === 'mkdir' ? 'Create' : 'Rename')))))), this.chmod_target &&
1419
+ h("section", { key: 'e99ef709477024789821b76e1bbaa6497dcbc474', class: "prompt-modal visible" }, h("div", { key: '1cec5818b817d089a9b4cda3b4ee514e7e9201a7', class: "prompt-dialog", role: "dialog", "aria-modal": "true", "aria-label": "Change permissions", tabindex: -1, onKeyDown: (event) => this.on_modal_keydown(event, () => this.close_chmod()) }, h("div", { key: '49c35a7228bbc6e9898c499904feb5fb525b2b5c', class: "title" }, "Permissions"), h("div", { key: '814edc9c438d956bef13b14bc22733502168c340', class: "file-name", title: this.chmod_target.name }, this.chmod_target.name), h("table", { key: 'a4c1b45c1ee830599e7c08a9a44c69df1ac2b201', class: "perm-grid" }, h("thead", { key: '99b953b4cf5f3a6aeff766d39b15222e74235a3c' }, h("tr", { key: '49d3ae286989915aaca71ba43cb19db357064158' }, h("th", { key: '3f3b7fcbeb1b713d29a874a111552f6ff95a811e', "aria-label": "Class" }), h("th", { key: '6d18882102b71cb61be8ae93a946f62da7b555bc' }, "Read"), h("th", { key: '44aed1177108307db4618680b5e7d28e248cdab6' }, "Write"), h("th", { key: 'd6056bed3aab4164768a010c369365c70e67bbbc' }, "Execute"))), h("tbody", { key: 'd54ecfe06cade301263977cf1f0a0ba9e3721b5c' }, [
1534
1420
  { label: 'Owner', read: 0o400, write: 0o200, exec: 0o100 },
1535
1421
  { label: 'Group', read: 0o040, write: 0o020, exec: 0o010 },
1536
1422
  { label: 'Other', read: 0o004, write: 0o002, exec: 0o001 },
1537
- ].map((row) => (h("tr", { key: row.label }, h("th", { scope: "row" }, row.label), [row.read, row.write, row.exec].map((bit) => (h("td", { key: bit }, h("input", { type: "checkbox", "aria-label": `${row.label} ${bit}`, disabled: this.chmod_busy, checked: (this.chmod_mode & bit) !== 0, onChange: () => this.toggle_chmod_bit(bit) }))))))))), h("div", { key: '61a09c4521472a61f3f7e71fe651cb42f125ed81', class: "perm-special" }, [
1423
+ ].map((row) => (h("tr", { key: row.label }, h("th", { scope: "row" }, row.label), [row.read, row.write, row.exec].map((bit) => (h("td", { key: bit }, h("input", { type: "checkbox", "aria-label": `${row.label} ${bit}`, disabled: this.chmod_busy, checked: (this.chmod_mode & bit) !== 0, onChange: () => this.toggle_chmod_bit(bit) }))))))))), h("div", { key: 'a124e9599de6b406d84ba9ffa3a56b3b993179ef', class: "perm-special" }, [
1538
1424
  { label: 'setuid', bit: 0o4000 },
1539
1425
  { label: 'setgid', bit: 0o2000 },
1540
1426
  { label: 'sticky', bit: 0o1000 },
1541
- ].map((special) => (h("label", { key: special.label, class: "checkline" }, h("input", { type: "checkbox", disabled: this.chmod_busy, checked: (this.chmod_mode & special.bit) !== 0, onChange: () => this.toggle_chmod_bit(special.bit) }), h("span", null, special.label))))), h("div", { key: '49370f167cbe30ee221f6373d4261571b25be38b', class: "perm-octal" }, h("label", { key: 'f0b17a2ed4c59cbbaf02cd34cc847c773118faef', htmlFor: "chmod-octal" }, "Octal"), h("input", { key: '020ec6003d98553c663cceb92502f6391c60691b', id: "chmod-octal", class: "dialog-input", type: "text", autocorrect: "off", autocapitalize: "none", autoComplete: "off", spellcheck: false, maxlength: 4, disabled: this.chmod_busy, value: this.chmod_mode.toString(8).padStart(4, '0'), onInput: (event) => this.on_chmod_octal_input(event.target.value) }), h("span", { key: '4cc7a1cbe4ddfb565f44b5ef3fd116feb879b6c0', class: "perm-preview" }, this.format_permissions(this.chmod_mode, this.chmod_target.kind))), this.chmod_error && h("div", { key: '99cc2d982aef130ea75fa61765d17921186cc2fb', class: "dialog-error" }, this.chmod_error), h("div", { key: 'd5796750cfa9eb9304340bb9fd091eea7781f3cc', class: "modal-actions" }, h("button", { key: 'dffe3756b1b4e593ff71663e931df57d53c4a842', type: "button", class: "btn secondary", onClick: () => this.close_chmod(), disabled: this.chmod_busy }, "Cancel"), h("button", { key: 'cb30401112b8f500b49e6974dc67ae9065319539', type: "button", class: "btn primary", onClick: () => void this.submit_chmod(), disabled: this.chmod_busy }, this.chmod_busy ? 'Applying...' : 'Apply')))), this.show_editor &&
1542
- h("section", { key: 'c9be5edfe1feea95ca51495503dc0c1c3b213d70', class: "editor-modal visible" }, h("div", { key: 'bf7c2aec8559b42017dc7142bc8a12f0fb4f1c39', class: "editor-dialog", role: "dialog", "aria-modal": "true", "aria-label": `Editing ${this.editor_name}`, tabindex: -1, onKeyDown: (event) => {
1427
+ ].map((special) => (h("label", { key: special.label, class: "checkline" }, h("input", { type: "checkbox", disabled: this.chmod_busy, checked: (this.chmod_mode & special.bit) !== 0, onChange: () => this.toggle_chmod_bit(special.bit) }), h("span", null, special.label))))), h("div", { key: '05ab3c8451084b6acdf7ea0e45f71da0f913b08d', class: "perm-octal" }, h("label", { key: '5cb748e079c869720361e56c4973eaea82a85bc0', htmlFor: "chmod-octal" }, "Octal"), h("input", { key: '652571af51a36c975d8b7432923ef2ab80743480', id: "chmod-octal", class: "dialog-input", type: "text", autocorrect: "off", autocapitalize: "none", autoComplete: "off", spellcheck: false, maxlength: 4, disabled: this.chmod_busy, value: this.chmod_mode.toString(8).padStart(4, '0'), onInput: (event) => this.on_chmod_octal_input(event.target.value) }), h("span", { key: '4a789c75be9a941d2adf8de68cfda043c19864cc', class: "perm-preview" }, this.format_permissions(this.chmod_mode, this.chmod_target.kind))), this.chmod_error && h("div", { key: 'acb09c9d16146cc0466df1ea6394ff492604c397', class: "dialog-error" }, this.chmod_error), h("div", { key: '46c5c4fc154529060b24e335dcd192ed6dc6f75d', class: "modal-actions" }, h("button", { key: '2ad9fad876497e4d629c1911fbe29616853a2e59', type: "button", class: "btn secondary", onClick: () => this.close_chmod(), disabled: this.chmod_busy }, "Cancel"), h("button", { key: 'c14f7edb08da6d2db078722438e8e06455a076c7', type: "button", class: "btn primary", onClick: () => void this.submit_chmod(), disabled: this.chmod_busy }, this.chmod_busy ? 'Applying...' : 'Apply')))), this.show_editor &&
1428
+ h("section", { key: 'f040aeca04a6b02af3247c024271fbdc2564a0c4', class: "editor-modal visible" }, h("div", { key: '6874ae8a526168be8c2c09ca3f8a1faa52b78027', class: "editor-dialog", role: "dialog", "aria-modal": "true", "aria-label": `Editing ${this.editor_name}`, tabindex: -1, onKeyDown: (event) => {
1543
1429
  if ((event.ctrlKey || event.metaKey) && event.key === 's') {
1544
1430
  event.preventDefault();
1545
1431
  void this.save_editor();
1546
1432
  return;
1547
1433
  }
1548
1434
  this.on_modal_keydown(event, () => this.close_editor());
1549
- } }, h("div", { key: 'fb6c305fc54a7c5f419a133c9477a69b489b77f0', class: "editor-head" }, h("div", { key: '9b22c14a92be28cc42ea900b4907d4411f5e3c7d', class: "title" }, this.editor_name, this.editor_is_dirty() ? ' *' : ''), h("button", { key: '2c800c08e12448ddf3c0f92f34257960ea0ea713', type: "button", class: "editor-close", onClick: () => this.close_editor(), "aria-label": "Close editor", disabled: this.editor_busy === 'saving' }, "x")), this.editor_busy === 'loading'
1435
+ } }, h("div", { key: '421cbd1bfbde035049ed028c4d05083cc7d8f66f', class: "editor-head" }, h("div", { key: '889adcf6e0187963964920b9750531c3fa06cd37', class: "title" }, this.editor_name, this.editor_is_dirty() ? ' *' : ''), h("button", { key: 'b14d28ca6a80c9a08277ff20bc0b38fc30ea3869', type: "button", class: "editor-close", onClick: () => this.close_editor(), "aria-label": "Close editor", disabled: this.editor_busy === 'saving' }, "x")), this.editor_busy === 'loading'
1550
1436
  ? h("div", { class: "editor-loading" }, "Loading...")
1551
- : h("textarea", { class: "editor-text", spellcheck: false, autocorrect: "off", autocapitalize: "none", autoComplete: "off", "aria-label": "File contents", disabled: this.editor_busy === 'saving' || !this.editor_loaded, value: this.editor_text, onInput: (event) => this.editor_text = event.target.value, ref: (el) => this.focus_once(el, this.editorTextEl, (kept) => this.editorTextEl = kept) }), this.editor_error && h("div", { key: '7918d367cbe8c9a3c179a20f8083b9c4e067ad79', class: "dialog-error" }, this.editor_error), this.editor_confirm_discard &&
1552
- h("div", { key: '6b2ba93692a575bd2c6253dcd7c9abb65807a900', class: "dialog-error" }, "Unsaved changes. Close anyway?"), h("div", { key: '879a150fdb6501ad95847a09f984f5acd9301830', class: "modal-actions" }, this.editor_confirm_discard
1437
+ : h("textarea", { class: "editor-text", spellcheck: false, autocorrect: "off", autocapitalize: "none", autoComplete: "off", "aria-label": "File contents", disabled: this.editor_busy === 'saving' || !this.editor_loaded, value: this.editor_text, onInput: (event) => this.editor_text = event.target.value, ref: (el) => this.focus_once(el, this.editorTextEl, (kept) => this.editorTextEl = kept) }), this.editor_error && h("div", { key: 'e7c1db037e749fec8970ac2b2be2cb85cfcd85be', class: "dialog-error" }, this.editor_error), this.editor_confirm_discard &&
1438
+ h("div", { key: '84ca6080e18c4334e87374126b82b816f318cb0d', class: "dialog-error" }, "Unsaved changes. Close anyway?"), h("div", { key: '4515e164a418815eccfd9d54d8f96a076616f326', class: "modal-actions" }, this.editor_confirm_discard
1553
1439
  ? h("button", { type: "button", class: "btn destructive", onClick: () => this.close_editor(true) }, "Discard")
1554
- : h("button", { type: "button", class: "btn secondary", onClick: () => this.close_editor(), disabled: this.editor_busy === 'saving' }, "Close"), h("button", { key: 'e034f852259bcf75f6ba28159706862cfefbe5fa', type: "button", class: "btn primary", onClick: () => void this.save_editor(), disabled: !!this.editor_busy || !this.editor_is_dirty() }, this.editor_busy === 'saving' ? 'Saving...' : 'Save')))), this.part_delete &&
1555
- h(PartDeleteDialog, { key: 'e7789b9ddf6e9d7f9e479aa390e7391e61c208f7', name: this.part_delete.name, busy: this.part_delete.busy, onCancel: () => this.part_delete = null, onConfirm: () => {
1556
- const target = this.part_delete;
1557
- this.part_delete = { ...target, busy: true };
1558
- void this.downloaderEl?.deleteDownload(target.download_id).finally(() => {
1559
- this.part_delete = null;
1560
- this.refresh_directory();
1561
- });
1562
- } }), this.torrent_menu &&
1563
- h(TorrentContextMenu, { key: '094cd2ab17cf975825db6afefcf205855221a03b', menu: this.torrent_menu, onClose: () => this.torrent_menu = null, onFetch: () => {
1564
- const path = this.torrent_menu.path;
1565
- this.torrent_menu = null;
1566
- void this.downloaderEl?.startTorrentPath(path);
1567
- }, onDownload: () => {
1568
- const item = this.selected_item;
1569
- this.torrent_menu = null;
1570
- if (item)
1571
- void this.start_download(item);
1572
- }, onRename: () => {
1573
- const item = this.selected_item;
1574
- this.torrent_menu = null;
1575
- if (item)
1576
- this.on_rename_action(item, new window.Event('click'));
1577
- }, onDelete: () => {
1578
- const item = this.selected_item;
1579
- this.torrent_menu = null;
1580
- if (item)
1581
- this.on_file_delete_action(item, new window.Event('click'));
1582
- } }), this.listing_player &&
1583
- h("section", { key: 'f5b06ff083b4af19a7c4cc336d8be172c0e646e1', class: "player-modal visible" }, h("phirepass-media-player", { key: 'b2770268f3fb6af053a6a52da1e346d8ae3cdda9', src: this.listing_player.src, name: this.listing_player.name, status: "On the node", positionKey: this.listing_player.key, onPhirepassPlayerClose: () => this.listing_player = null }))));
1440
+ : h("button", { type: "button", class: "btn secondary", onClick: () => this.close_editor(), disabled: this.editor_busy === 'saving' }, "Close"), h("button", { key: 'b1e758ae6fd5de192135d617126c8c6939c62bde', type: "button", class: "btn primary", onClick: () => void this.save_editor(), disabled: !!this.editor_busy || !this.editor_is_dirty() }, this.editor_busy === 'saving' ? 'Saving...' : 'Save'))))));
1584
1441
  }
1585
1442
  static get is() { return "phirepass-sftp-client"; }
1586
1443
  static get encapsulation() { return "shadow"; }
@@ -1889,13 +1746,7 @@ export class PhirepassSftpClient {
1889
1746
  "editor_loaded": {},
1890
1747
  "filter": {},
1891
1748
  "sort_key": {},
1892
- "sort_asc": {},
1893
- "channel_ready": {},
1894
- "fetch_count": {},
1895
- "fresh_names": {},
1896
- "part_delete": {},
1897
- "torrent_menu": {},
1898
- "listing_player": {}
1749
+ "sort_asc": {}
1899
1750
  };
1900
1751
  }
1901
1752
  static get events() {
@@ -1976,7 +1827,6 @@ export class PhirepassSftpClient {
1976
1827
  }
1977
1828
  };
1978
1829
  }
1979
- static get elementRef() { return "el_host"; }
1980
1830
  static get watchers() {
1981
1831
  return [{
1982
1832
  "propName": "nodeId",
@@ -742,13 +742,13 @@ export class PhirepassTerminal {
742
742
  return (h("button", { key: id, type: "button", class: { key: true, armed: !!armed }, "aria-label": hint, "aria-pressed": armed === undefined ? undefined : String(armed), onPointerDown: (event) => event.preventDefault(), onMouseDown: (event) => event.preventDefault(), onClick: onPress }, label));
743
743
  }
744
744
  render() {
745
- return (h(Host, { key: '0cd75107af5640ebcd5fe0b829b0f7910a01f2c6', class: { 'keys-on': this.keyBar === 'on', 'keys-off': this.keyBar === 'off' } }, h("div", { key: 'c405840c6ae231c5ef2d0f39d139eaf4eb54f5de', id: "ccc", ref: el => (this.containerEl = el) }), h("div", { key: 'a4acfc2ee6b2bc4cdcd159a5c4b794c3ccf1c504', class: "keys", role: "toolbar", "aria-label": "Terminal keys" }, this.key_button('ctrl', 'ctrl', 'Control', () => {
745
+ return (h(Host, { key: '4f00fba03285e6410d0248df32247f3231199cf8', class: { 'keys-on': this.keyBar === 'on', 'keys-off': this.keyBar === 'off' } }, h("div", { key: 'f43351419da2ca6ef1232afd96ea30be5feae138', id: "ccc", ref: el => (this.containerEl = el) }), h("div", { key: '56f7929c2045ae17053777b818f3317844ec6467', class: "keys", role: "toolbar", "aria-label": "Terminal keys" }, this.key_button('ctrl', 'ctrl', 'Control', () => {
746
746
  this.ctrlArmed = !this.ctrlArmed;
747
747
  this.terminal?.focus();
748
748
  }, this.ctrlArmed), this.key_button('alt', 'alt', 'Alt', () => {
749
749
  this.altArmed = !this.altArmed;
750
750
  this.terminal?.focus();
751
- }, this.altArmed), KEY_BAR_KEYS.map(entry => this.key_button(entry.id, entry.label, entry.hint, () => this.press(entry.data))), h("span", { key: '0d4b62865ccc92b9e82fff8375912f839c3ec32c', class: "spacer" }), this.key_button('left', '←', 'Left arrow', () => this.press(this.arrow('D'))), this.key_button('down', '↓', 'Down arrow', () => this.press(this.arrow('B'))), this.key_button('up', '↑', 'Up arrow', () => this.press(this.arrow('A'))), this.key_button('right', '→', 'Right arrow', () => this.press(this.arrow('C'))))));
751
+ }, this.altArmed), KEY_BAR_KEYS.map(entry => this.key_button(entry.id, entry.label, entry.hint, () => this.press(entry.data))), h("span", { key: '6573fdb8605d4a3555589412591d921738c98abb', class: "spacer" }), this.key_button('left', '←', 'Left arrow', () => this.press(this.arrow('D'))), this.key_button('down', '↓', 'Down arrow', () => this.press(this.arrow('B'))), this.key_button('up', '↑', 'Up arrow', () => this.press(this.arrow('A'))), this.key_button('right', '→', 'Right arrow', () => this.press(this.arrow('C'))))));
752
752
  }
753
753
  static get is() { return "phirepass-terminal"; }
754
754
  static get encapsulation() { return "shadow"; }