phirepass-widgets 0.0.113 → 0.0.115

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 (52) hide show
  1. package/dist/cjs/{index-CurErEK7.js → index-BCgmMoIq.js} +3 -3
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/phirepass-downloader_3.cjs.entry.js +157 -41
  4. package/dist/cjs/phirepass-rdp.cjs.entry.js +3 -3
  5. package/dist/cjs/phirepass-terminal.cjs.entry.js +4 -4
  6. package/dist/cjs/phirepass-widgets.cjs.js +3 -3
  7. package/dist/cjs/{protocol-DCBMfc2u.js → protocol-CYh109n2.js} +252 -21
  8. package/dist/collection/collection-manifest.json +1 -1
  9. package/dist/collection/common/fetch.js +4 -0
  10. package/dist/collection/components/phirepass-downloader/jobs.js +26 -3
  11. package/dist/collection/components/phirepass-downloader/source.js +14 -0
  12. package/dist/collection/components/phirepass-downloader/views/icons.js +1 -0
  13. package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +9 -0
  14. package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +79 -3
  15. package/dist/collection/components/phirepass-media-player/player.js +24 -0
  16. package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +1 -1
  17. package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +33 -33
  18. package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
  19. package/dist/collection/phirepass-channel_bg.wasm +0 -0
  20. package/dist/components/p-BtMWUitf.js +1 -0
  21. package/dist/components/p-DIf-Ru26.js +1 -0
  22. package/dist/components/p-DqT-qhTU.js +1 -0
  23. package/dist/components/phirepass-downloader.js +1 -1
  24. package/dist/components/phirepass-media-player.js +1 -1
  25. package/dist/components/phirepass-rdp.js +1 -1
  26. package/dist/components/phirepass-sftp-client.js +1 -1
  27. package/dist/components/phirepass-terminal.js +2 -2
  28. package/dist/esm/{index-B9qUl6FW.js → index-Dd9o0CbU.js} +3 -3
  29. package/dist/esm/loader.js +3 -3
  30. package/dist/esm/phirepass-downloader_3.entry.js +157 -41
  31. package/dist/esm/phirepass-rdp.entry.js +3 -3
  32. package/dist/esm/phirepass-terminal.entry.js +4 -4
  33. package/dist/esm/phirepass-widgets.js +4 -4
  34. package/dist/esm/{protocol-CsYQJXY2.js → protocol-BtMWUitf.js} +251 -20
  35. package/dist/phirepass-widgets/{p-1b84c526.entry.js → p-2fd32ec5.entry.js} +1 -1
  36. package/dist/phirepass-widgets/{p-41dd1ac9.entry.js → p-705501d4.entry.js} +2 -2
  37. package/dist/phirepass-widgets/p-BtMWUitf.js +1 -0
  38. package/dist/phirepass-widgets/{p-B9qUl6FW.js → p-Dd9o0CbU.js} +2 -2
  39. package/dist/phirepass-widgets/p-b8caf9e1.entry.js +1 -0
  40. package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
  41. package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
  42. package/dist/types/common/fetch.d.ts +6 -0
  43. package/dist/types/components/phirepass-downloader/jobs.d.ts +10 -2
  44. package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +16 -1
  45. package/dist/types/components/phirepass-media-player/player.d.ts +10 -0
  46. package/dist/types/components.d.ts +10 -2
  47. package/package.json +6 -6
  48. package/dist/components/p-C4cmk3bS.js +0 -1
  49. package/dist/components/p-CsYQJXY2.js +0 -1
  50. package/dist/components/p-D6Geq8Rn.js +0 -1
  51. package/dist/phirepass-widgets/p-614ab3de.entry.js +0 -1
  52. package/dist/phirepass-widgets/p-CsYQJXY2.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CurErEK7.js');
4
- var protocol = require('./protocol-DCBMfc2u.js');
3
+ var index = require('./index-BCgmMoIq.js');
4
+ var protocol = require('./protocol-CYh109n2.js');
5
5
 
6
6
  /**
7
7
  * RDP's display-control PDU describes a monitor in whole, even pixels within
@@ -764,7 +764,7 @@ const PhirepassRdp = class {
764
764
  this.request_tunnel();
765
765
  }
766
766
  render() {
767
- return (index.h(index.Host, { key: '04896084a5e914a9e2a184ee7b560f4978da9bfd' }, index.h("div", { key: 'db5d3d0d4351aeb868ffe6956b86f22b62775e4b', class: "screen", ref: (el) => (this.containerEl = el) }, index.h("slot", { key: 'efafd5d8b1437687713aff0425c050413593d162' })), this.credentialsPrompt && (index.h("form", { key: 'ad6079b6db1d71e8eb60bef71cd808be22b7387c', class: "prompt", onSubmit: (event) => this.submit_credentials(event) }, index.h("label", { key: 'b976c7a3c01e4983fac39e1ef027e4307a6654c7', htmlFor: "rdp-username" }, "Username"), index.h("input", { key: '3a90a73a446015d708eaebec6a7d9bc1703ae5d0', id: "rdp-username", type: "text", autocomplete: "off", autofocus: true, onInput: (event) => (this.usernameBuffer = event.target.value) }), index.h("label", { key: 'eaf13aa5fe39e4576de052b15c85e6b60be466cb', htmlFor: "rdp-password" }, "Password"), index.h("input", { key: 'd53ec8c48b7826b011a07bcb57b7ae1fbe30160f', id: "rdp-password", type: "password", autocomplete: "off", onInput: (event) => (this.passwordBuffer = event.target.value) }), index.h("button", { key: 'd1616e75c1f37a853ec793a25ffc8919544c16d2', type: "submit" }, "Connect"))), this.statusMessage && !this.credentialsPrompt && (index.h("div", { key: '8e6deb9e32f0c416bf85666847f10e095f40e210', class: "status" }, this.statusMessage))));
767
+ return (index.h(index.Host, { key: '9db127da5dbe168ef5f7a021767e5cedeb8305e6' }, index.h("div", { key: '06d2de6763ec479198389032ab65033eefab21d6', class: "screen", ref: (el) => (this.containerEl = el) }, index.h("slot", { key: '7842ca9fd64795794e1b90e15319ddaa599f85b8' })), this.credentialsPrompt && (index.h("form", { key: 'ce53830ced182740f139a318f099918c31013d9f', class: "prompt", onSubmit: (event) => this.submit_credentials(event) }, index.h("label", { key: '2b55341b9cfc2e08a847e26985000f5e1bc86eca', htmlFor: "rdp-username" }, "Username"), index.h("input", { key: '243500ff59de6f16cc67acc5ddf9e15e3c0de0f6', id: "rdp-username", type: "text", autocomplete: "off", autofocus: true, onInput: (event) => (this.usernameBuffer = event.target.value) }), index.h("label", { key: '5a346aa6a730c4cb0dd550eab9a65db9f2e74bc6', htmlFor: "rdp-password" }, "Password"), index.h("input", { key: '0f1081b05f94e15a7f04df4de390a33a021ffe53', id: "rdp-password", type: "password", autocomplete: "off", onInput: (event) => (this.passwordBuffer = event.target.value) }), index.h("button", { key: 'e9657c9df124176210508f5125fc526e3c78c5f1', type: "submit" }, "Connect"))), this.statusMessage && !this.credentialsPrompt && (index.h("div", { key: '3c59dbae63b7c5c5ef80344abad4b1a2b4c0b79d', class: "status" }, this.statusMessage))));
768
768
  }
769
769
  static get watchers() { return {
770
770
  "nodeId": [{
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CurErEK7.js');
4
- var protocol = require('./protocol-DCBMfc2u.js');
3
+ var index = require('./index-BCgmMoIq.js');
4
+ var protocol = require('./protocol-CYh109n2.js');
5
5
 
6
6
  /**
7
7
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
@@ -955,13 +955,13 @@ const PhirepassTerminal = class {
955
955
  return (index.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));
956
956
  }
957
957
  render() {
958
- return (index.h(index.Host, { key: '7916b1ec27e8557c5327364992658bbd9456a050', class: { 'keys-on': this.keyBar === 'on', 'keys-off': this.keyBar === 'off' } }, index.h("div", { key: '7b1716371a6df4d3330b94e8a23195069628ccc0', id: "ccc", ref: el => (this.containerEl = el) }), index.h("div", { key: 'fb43cc80fbf8d0d6374ed03d980f04cfaec1bd5a', class: "keys", role: "toolbar", "aria-label": "Terminal keys" }, this.key_button('ctrl', 'ctrl', 'Control', () => {
958
+ return (index.h(index.Host, { key: '0cd75107af5640ebcd5fe0b829b0f7910a01f2c6', class: { 'keys-on': this.keyBar === 'on', 'keys-off': this.keyBar === 'off' } }, index.h("div", { key: 'c405840c6ae231c5ef2d0f39d139eaf4eb54f5de', id: "ccc", ref: el => (this.containerEl = el) }), index.h("div", { key: 'a4acfc2ee6b2bc4cdcd159a5c4b794c3ccf1c504', class: "keys", role: "toolbar", "aria-label": "Terminal keys" }, this.key_button('ctrl', 'ctrl', 'Control', () => {
959
959
  this.ctrlArmed = !this.ctrlArmed;
960
960
  this.terminal?.focus();
961
961
  }, this.ctrlArmed), this.key_button('alt', 'alt', 'Alt', () => {
962
962
  this.altArmed = !this.altArmed;
963
963
  this.terminal?.focus();
964
- }, this.altArmed), KEY_BAR_KEYS.map(entry => this.key_button(entry.id, entry.label, entry.hint, () => this.press(entry.data))), index.h("span", { key: '0bbada06a098775bfdab27fde2580abe6fdd969d', 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'))))));
964
+ }, this.altArmed), KEY_BAR_KEYS.map(entry => this.key_button(entry.id, entry.label, entry.hint, () => this.press(entry.data))), index.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'))))));
965
965
  }
966
966
  static get watchers() { return {
967
967
  "nodeId": [{
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-CurErEK7.js');
3
+ var index = require('./index-BCgmMoIq.js');
4
4
  var appGlobals = require('./app-globals-V2Kpy_OQ.js');
5
5
 
6
6
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
7
7
  /*
8
- Stencil Client Patch Browser v4.45.3 | MIT Licensed | https://stenciljs.com
8
+ Stencil Client Patch Browser v4.45.4 | MIT Licensed | https://stenciljs.com
9
9
  */
10
10
 
11
11
  var patchBrowser = () => {
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["phirepass-rdp.cjs",[[769,"phirepass-rdp",{"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"username":[1],"password":[1],"destination":[1],"scale":[1],"dynamicResize":[4,"dynamic-resize"],"captureKeyboard":[4,"capture-keyboard"],"clipboard":[4],"serverId":[1,"server-id"],"channelFactory":[16],"credentialsPrompt":[32],"statusMessage":[32],"toggleFullscreen":[64],"keyboardLockSupported":[64],"focusDesktop":[64],"sendCtrlAltDel":[64],"sendMetaKey":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal.cjs",[[513,"phirepass-terminal",{"terminalOptions":[16],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"keyBar":[1,"key-bar"],"serverId":[1,"server-id"],"channelFactory":[16],"ctrlArmed":[32],"altArmed":[32]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-downloader_3.cjs",[[513,"phirepass-sftp-client",{"name":[1],"description":[1],"hideHeader":[4,"hide-header"],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"serverId":[1,"server-id"],"channelFactory":[16],"max":[32],"show_login_screen":[32],"show_login_screen_username":[32],"show_error":[32],"error_message":[32],"show_login_screen_password":[32],"show_navigation":[32],"breadcrumbs":[32],"current_dir":[32],"listing":[32],"show_content":[32],"show_loader":[32],"version":[32],"status":[32],"selected_item":[32],"show_upload_modal":[32],"upload_progress":[32],"upload_file_name":[32],"upload_speed":[32],"upload_finished":[32],"show_download_modal":[32],"download_progress":[32],"download_file_name":[32],"download_speed":[32],"download_finished":[32],"show_delete_modal":[32],"delete_file_name":[32],"delete_loading":[32],"delete_is_dir":[32],"delete_recursive":[32],"delete_error":[32],"prompt_kind":[32],"prompt_value":[32],"prompt_error":[32],"prompt_busy":[32],"chmod_target":[32],"chmod_mode":[32],"chmod_error":[32],"chmod_busy":[32],"show_editor":[32],"editor_name":[32],"editor_text":[32],"editor_saved_text":[32],"editor_busy":[32],"editor_error":[32],"editor_confirm_discard":[32],"editor_loaded":[32],"filter":[32],"sort_key":[32],"sort_asc":[32],"channel_ready":[32],"fetch_count":[32],"fresh_names":[32],"part_delete":[32],"torrent_menu":[32],"listing_player":[32],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}],[513,"phirepass-downloader",{"nodeId":[1,"node-id"],"nodeLabel":[1,"node-label"],"token":[1],"channel":[16],"connected":[4],"channelFactory":[16],"browsingService":[1,"browsing-service"],"browsingPath":[1025,"browsing-path"],"compact":[516],"streamBase":[1,"stream-base"],"canConfigure":[4,"can-configure"],"inlinePlayer":[4,"inline-player"],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"serverId":[1,"server-id"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"connection":[32],"caps":[32],"jobs":[32],"tab":[32],"drawerOpen":[32],"dialogOpen":[32],"unread":[32],"form":[32],"where":[32],"starting":[32],"refusal":[32],"confirm":[32],"notices":[32],"subDir":[32],"picker":[32],"player":[32],"receive":[64],"openFetch":[64],"toggleDrawer":[64],"jobForPath":[64],"deleteDownload":[64],"torrentPathFor":[64],"startTorrentPath":[64]},null,{"channel":[{"onChannel":0}],"connected":[{"onConnected":0}],"browsingPath":[{"onBrowsing":0}],"browsingService":[{"onBrowsing":0}],"nodeId":[{"onNode":0}]}],[513,"phirepass-media-player",{"src":[1],"name":[1],"mime":[1],"status":[1],"ready":[2],"positionStore":[16],"positionKey":[1,"position-key"],"remotePlayback":[16],"castDevice":[1,"cast-device"],"phase":[32],"stored":[32],"castAvailable":[32],"currentTime":[32],"duration":[32],"close":[64]},null,{"src":[{"onSrc":0}]}]]]], options);
22
+ return index.bootstrapLazy([["phirepass-rdp.cjs",[[769,"phirepass-rdp",{"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"username":[1],"password":[1],"destination":[1],"scale":[1],"dynamicResize":[4,"dynamic-resize"],"captureKeyboard":[4,"capture-keyboard"],"clipboard":[4],"serverId":[1,"server-id"],"channelFactory":[16],"credentialsPrompt":[32],"statusMessage":[32],"toggleFullscreen":[64],"keyboardLockSupported":[64],"focusDesktop":[64],"sendCtrlAltDel":[64],"sendMetaKey":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-terminal.cjs",[[513,"phirepass-terminal",{"terminalOptions":[16],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"keyBar":[1,"key-bar"],"serverId":[1,"server-id"],"channelFactory":[16],"ctrlArmed":[32],"altArmed":[32]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}]]],["phirepass-downloader_3.cjs",[[513,"phirepass-sftp-client",{"name":[1],"description":[1],"hideHeader":[4,"hide-header"],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"nodeId":[1,"node-id"],"serviceId":[1,"service-id"],"token":[1],"serverId":[1,"server-id"],"channelFactory":[16],"max":[32],"show_login_screen":[32],"show_login_screen_username":[32],"show_error":[32],"error_message":[32],"show_login_screen_password":[32],"show_navigation":[32],"breadcrumbs":[32],"current_dir":[32],"listing":[32],"show_content":[32],"show_loader":[32],"version":[32],"status":[32],"selected_item":[32],"show_upload_modal":[32],"upload_progress":[32],"upload_file_name":[32],"upload_speed":[32],"upload_finished":[32],"show_download_modal":[32],"download_progress":[32],"download_file_name":[32],"download_speed":[32],"download_finished":[32],"show_delete_modal":[32],"delete_file_name":[32],"delete_loading":[32],"delete_is_dir":[32],"delete_recursive":[32],"delete_error":[32],"prompt_kind":[32],"prompt_value":[32],"prompt_error":[32],"prompt_busy":[32],"chmod_target":[32],"chmod_mode":[32],"chmod_error":[32],"chmod_busy":[32],"show_editor":[32],"editor_name":[32],"editor_text":[32],"editor_saved_text":[32],"editor_busy":[32],"editor_error":[32],"editor_confirm_discard":[32],"editor_loaded":[32],"filter":[32],"sort_key":[32],"sort_asc":[32],"channel_ready":[32],"fetch_count":[32],"fresh_names":[32],"part_delete":[32],"torrent_menu":[32],"listing_player":[32],"maximize":[64],"minimize":[64]},null,{"nodeId":[{"onNodeIdChange":0}],"serverId":[{"onServerIdChange":0}]}],[513,"phirepass-downloader",{"nodeId":[1,"node-id"],"nodeLabel":[1,"node-label"],"token":[1],"channel":[16],"connected":[4],"channelFactory":[16],"browsingService":[1,"browsing-service"],"browsingPath":[1025,"browsing-path"],"compact":[516],"streamBase":[1,"stream-base"],"canConfigure":[4,"can-configure"],"inlinePlayer":[4,"inline-player"],"serverHost":[1,"server-host"],"serverPort":[2,"server-port"],"serverId":[1,"server-id"],"allowInsecure":[4,"allow-insecure"],"heartbeatInterval":[2,"heartbeat-interval"],"connection":[32],"caps":[32],"jobs":[32],"tab":[32],"drawerOpen":[32],"dialogOpen":[32],"unread":[32],"form":[32],"where":[32],"starting":[32],"refusal":[32],"confirm":[32],"notices":[32],"subDir":[32],"picker":[32],"player":[32],"receive":[64],"openFetch":[64],"toggleDrawer":[64],"jobForPath":[64],"deleteDownload":[64],"torrentPathFor":[64],"startTorrentPath":[64]},null,{"channel":[{"onChannel":0}],"connected":[{"onConnected":0}],"browsingPath":[{"onBrowsing":0}],"browsingService":[{"onBrowsing":0}],"nodeId":[{"onNode":0}]}],[513,"phirepass-media-player",{"src":[1],"name":[1],"mime":[1],"status":[1],"ready":[2],"positionStore":[16],"positionKey":[1,"position-key"],"remotePlayback":[16],"linkMinter":[16],"castDevice":[1,"cast-device"],"phase":[32],"stored":[32],"castAvailable":[32],"castSrc":[32],"linkNote":[32],"currentTime":[32],"duration":[32],"close":[64]},null,{"src":[{"onSrc":0}]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -273,6 +273,117 @@ class Channel {
273
273
  }
274
274
  wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
275
275
  }
276
+ /**
277
+ * @param {string} download_id
278
+ * @param {boolean} delete_file
279
+ * @param {number | null} [msg_id]
280
+ */
281
+ send_download_delete(download_id, delete_file, msg_id) {
282
+ const val2 = +delete_file;
283
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
284
+ const ptr0 = passStringToWasm0(download_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
285
+ const len0 = WASM_VECTOR_LEN;
286
+ wasm.channel_send_download_delete(this.__wbg_ptr, ptr0, len0, val2, val3);
287
+ }
288
+ /**
289
+ * @param {string} download_id
290
+ * @param {boolean} ignore_window
291
+ * @param {number | null} [msg_id]
292
+ */
293
+ send_download_resume(download_id, ignore_window, msg_id) {
294
+ const val2 = +ignore_window;
295
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
296
+ const ptr0 = passStringToWasm0(download_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
297
+ const len0 = WASM_VECTOR_LEN;
298
+ wasm.channel_send_download_resume(this.__wbg_ptr, ptr0, len0, val2, val3);
299
+ }
300
+ /**
301
+ * @param {string} download_id
302
+ * @param {boolean} in_order
303
+ * @param {number | null} [msg_id]
304
+ */
305
+ send_download_set_order(download_id, in_order, msg_id) {
306
+ const val2 = +in_order;
307
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
308
+ const ptr0 = passStringToWasm0(download_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
309
+ const len0 = WASM_VECTOR_LEN;
310
+ wasm.channel_send_download_set_order(this.__wbg_ptr, ptr0, len0, val2, val3);
311
+ }
312
+ /**
313
+ * @param {string} node_id
314
+ * @param {number | null} [msg_id]
315
+ */
316
+ send_download_settings_get(node_id, msg_id) {
317
+ const val2 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
318
+ const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
319
+ const len0 = WASM_VECTOR_LEN;
320
+ wasm.channel_send_download_settings_get(this.__wbg_ptr, ptr0, len0, val2);
321
+ }
322
+ /**
323
+ * @param {string} node_id
324
+ * @param {any} settings
325
+ * @param {number | null} [msg_id]
326
+ */
327
+ send_download_settings_save(node_id, settings, msg_id) {
328
+ const val2 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
329
+ const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
330
+ const len0 = WASM_VECTOR_LEN;
331
+ wasm.channel_send_download_settings_save(this.__wbg_ptr, ptr0, len0, settings, val2);
332
+ }
333
+ /**
334
+ * @param {string} node_id
335
+ * @param {any} source
336
+ * @param {string | null | undefined} sub_dir
337
+ * @param {any} browsing
338
+ * @param {boolean | null | undefined} in_order
339
+ * @param {any} options
340
+ * @param {number | null} [msg_id]
341
+ */
342
+ send_download_start(node_id, source, sub_dir, browsing, in_order, options, msg_id) {
343
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
344
+ let ptr0, len0, ptr1, len1;
345
+ try {
346
+ ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
347
+ len0 = WASM_VECTOR_LEN;
348
+ ptr1 = isLikeNone(sub_dir) ? 0 : passStringToWasm0(sub_dir, wasm.__wbindgen_export, wasm.__wbindgen_export2);
349
+ len1 = WASM_VECTOR_LEN;
350
+ } catch (e) {
351
+ if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
352
+ if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
353
+ throw e;
354
+ }
355
+ wasm.channel_send_download_start(this.__wbg_ptr, ptr0, len0, source, ptr1, len1, browsing, isLikeNone(in_order) ? 0xFFFFFF : in_order ? 1 : 0, options, val3);
356
+ }
357
+ /**
358
+ * @param {string} download_id
359
+ * @param {boolean} discard
360
+ * @param {number | null} [msg_id]
361
+ */
362
+ send_download_stop(download_id, discard, msg_id) {
363
+ const val2 = +discard;
364
+ const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
365
+ const ptr0 = passStringToWasm0(download_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
366
+ const len0 = WASM_VECTOR_LEN;
367
+ wasm.channel_send_download_stop(this.__wbg_ptr, ptr0, len0, val2, val3);
368
+ }
369
+ /**
370
+ * `{ Node: "<uuid>" }` or `"All"`.
371
+ * @param {any} scope
372
+ */
373
+ send_download_subscribe(scope) {
374
+ wasm.channel_send_download_subscribe(this.__wbg_ptr, scope);
375
+ }
376
+ /**
377
+ * @param {string} node_id
378
+ * @param {any} browsing
379
+ * @param {number | null} [msg_id]
380
+ */
381
+ send_download_where(node_id, browsing, msg_id) {
382
+ const val2 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
383
+ const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
384
+ const len0 = WASM_VECTOR_LEN;
385
+ wasm.channel_send_download_where(this.__wbg_ptr, ptr0, len0, browsing, val2);
386
+ }
276
387
  /**
277
388
  * Set permission bits. The agent masks these to `0o7777`.
278
389
  * @param {string} node_id
@@ -704,6 +815,10 @@ function __wbg_get_imports() {
704
815
  const ret = Error(getStringFromWasm0(arg0, arg1));
705
816
  return ret;
706
817
  },
818
+ __wbg_Number_ff192a72a0dcdf6d: function(arg0) {
819
+ const ret = Number(arg0);
820
+ return ret;
821
+ },
707
822
  __wbg_String_8564e559799eccda: function(arg0, arg1) {
708
823
  const ret = String(arg1);
709
824
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -711,6 +826,17 @@ function __wbg_get_imports() {
711
826
  getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
712
827
  getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
713
828
  },
829
+ __wbg___wbindgen_bigint_get_as_i64_11da4b52cd0aedef: function(arg0, arg1) {
830
+ const v = arg1;
831
+ const ret = typeof(v) === 'bigint' ? v : undefined;
832
+ getDataViewMemory0().setBigInt64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
833
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
834
+ },
835
+ __wbg___wbindgen_boolean_get_4f1baf9a00be3c74: function(arg0) {
836
+ const v = arg0;
837
+ const ret = typeof(v) === 'boolean' ? v : undefined;
838
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
839
+ },
714
840
  __wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
715
841
  const ret = debugString(arg1);
716
842
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -718,6 +844,49 @@ function __wbg_get_imports() {
718
844
  getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
719
845
  getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
720
846
  },
847
+ __wbg___wbindgen_in_3f58a9d3b3a7eed2: function(arg0, arg1) {
848
+ const ret = arg0 in arg1;
849
+ return ret;
850
+ },
851
+ __wbg___wbindgen_is_bigint_5fa10641e039d3ef: function(arg0) {
852
+ const ret = typeof(arg0) === 'bigint';
853
+ return ret;
854
+ },
855
+ __wbg___wbindgen_is_function_741ff2bb612836f5: function(arg0) {
856
+ const ret = typeof(arg0) === 'function';
857
+ return ret;
858
+ },
859
+ __wbg___wbindgen_is_null_c22311b1cc228e3a: function(arg0) {
860
+ const ret = arg0 === null;
861
+ return ret;
862
+ },
863
+ __wbg___wbindgen_is_object_8b968c3ab8e96595: function(arg0) {
864
+ const val = arg0;
865
+ const ret = typeof(val) === 'object' && val !== null;
866
+ return ret;
867
+ },
868
+ __wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
869
+ const ret = typeof(arg0) === 'string';
870
+ return ret;
871
+ },
872
+ __wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
873
+ const ret = arg0 === undefined;
874
+ return ret;
875
+ },
876
+ __wbg___wbindgen_jsval_eq_38d7bfbe4cc84039: function(arg0, arg1) {
877
+ const ret = arg0 === arg1;
878
+ return ret;
879
+ },
880
+ __wbg___wbindgen_jsval_loose_eq_b2f214e2e4b30e36: function(arg0, arg1) {
881
+ const ret = arg0 == arg1;
882
+ return ret;
883
+ },
884
+ __wbg___wbindgen_number_get_934b640d0889af78: function(arg0, arg1) {
885
+ const obj = arg1;
886
+ const ret = typeof(obj) === 'number' ? obj : undefined;
887
+ getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
888
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
889
+ },
721
890
  __wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
722
891
  const obj = arg1;
723
892
  const ret = typeof(obj) === 'string' ? obj : undefined;
@@ -744,7 +913,7 @@ function __wbg_get_imports() {
744
913
  const ret = arg0.call(arg1, arg2, arg3);
745
914
  return ret;
746
915
  }, arguments); },
747
- __wbg_clearInterval_26ba580547547579: function(arg0) {
916
+ __wbg_clearInterval_2ed00e80b9bdc143: function(arg0) {
748
917
  const ret = clearInterval(arg0);
749
918
  return ret;
750
919
  },
@@ -755,6 +924,14 @@ function __wbg_get_imports() {
755
924
  const ret = arg0.data;
756
925
  return ret;
757
926
  },
927
+ __wbg_done_57e08d0be6e30c02: function(arg0) {
928
+ const ret = arg0.done;
929
+ return ret;
930
+ },
931
+ __wbg_entries_7bb1459bd9b5c2b9: function(arg0) {
932
+ const ret = Object.entries(arg0);
933
+ return ret;
934
+ },
758
935
  __wbg_from_eac91875c8a5ffa4: function(arg0) {
759
936
  const ret = Array.from(arg0);
760
937
  return ret;
@@ -766,7 +943,23 @@ function __wbg_get_imports() {
766
943
  const ret = Reflect.get(arg0, arg1);
767
944
  return ret;
768
945
  }, arguments); },
769
- __wbg_info_2b8ee6588e4c6072: function(arg0, arg1) {
946
+ __wbg_get_635eea311fa1a291: function() { return handleError(function (arg0, arg1) {
947
+ const ret = Reflect.get(arg0, arg1);
948
+ return ret;
949
+ }, arguments); },
950
+ __wbg_get_d7176cfb76d71114: function(arg0, arg1) {
951
+ const ret = arg0[arg1 >>> 0];
952
+ return ret;
953
+ },
954
+ __wbg_get_unchecked_e6325ad374eff861: function(arg0, arg1) {
955
+ const ret = arg0[arg1 >>> 0];
956
+ return ret;
957
+ },
958
+ __wbg_get_with_ref_key_fc601247060b7204: function(arg0, arg1) {
959
+ const ret = arg0[arg1];
960
+ return ret;
961
+ },
962
+ __wbg_info_b0bac022aae81d46: function(arg0, arg1) {
770
963
  console.info(getStringFromWasm0(arg0, arg1));
771
964
  },
772
965
  __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
@@ -779,10 +972,36 @@ function __wbg_get_imports() {
779
972
  const ret = result;
780
973
  return ret;
781
974
  },
975
+ __wbg_instanceof_Uint8Array_d7aeb0dcb3108fea: function(arg0) {
976
+ let result;
977
+ try {
978
+ result = arg0 instanceof Uint8Array;
979
+ } catch (_) {
980
+ result = false;
981
+ }
982
+ const ret = result;
983
+ return ret;
984
+ },
985
+ __wbg_isArray_bcf1376d0d732d08: function(arg0) {
986
+ const ret = Array.isArray(arg0);
987
+ return ret;
988
+ },
989
+ __wbg_isSafeInteger_1a35ba4d31e71d38: function(arg0) {
990
+ const ret = Number.isSafeInteger(arg0);
991
+ return ret;
992
+ },
993
+ __wbg_iterator_e4c5e8f68ada7b58: function() {
994
+ const ret = Symbol.iterator;
995
+ return ret;
996
+ },
782
997
  __wbg_length_186163212ffe79c3: function(arg0) {
783
998
  const ret = arg0.length;
784
999
  return ret;
785
1000
  },
1001
+ __wbg_length_b03a0fabb109b1e9: function(arg0) {
1002
+ const ret = arg0.length;
1003
+ return ret;
1004
+ },
786
1005
  __wbg_new_13de428334042d26: function(arg0) {
787
1006
  const ret = new Uint8Array(arg0);
788
1007
  return ret;
@@ -799,6 +1018,14 @@ function __wbg_get_imports() {
799
1018
  const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
800
1019
  return ret;
801
1020
  }, arguments); },
1021
+ __wbg_next_178c1651c11432b3: function(arg0) {
1022
+ const ret = arg0.next;
1023
+ return ret;
1024
+ },
1025
+ __wbg_next_af5ac6a08bb0a717: function() { return handleError(function (arg0) {
1026
+ const ret = arg0.next();
1027
+ return ret;
1028
+ }, arguments); },
802
1029
  __wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
803
1030
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
804
1031
  },
@@ -813,7 +1040,7 @@ function __wbg_get_imports() {
813
1040
  __wbg_send_d83d0891cf698779: function() { return handleError(function (arg0, arg1, arg2) {
814
1041
  arg0.send(getArrayU8FromWasm0(arg1, arg2));
815
1042
  }, arguments); },
816
- __wbg_setInterval_d933acbf2578adfa: function() { return handleError(function (arg0, arg1) {
1043
+ __wbg_setInterval_ef738bbfe8cc0974: function() { return handleError(function (arg0, arg1) {
817
1044
  const ret = setInterval(arg0, arg1);
818
1045
  return ret;
819
1046
  }, arguments); },
@@ -838,27 +1065,31 @@ function __wbg_get_imports() {
838
1065
  __wbg_set_onopen_757be120cc7b1ea6: function(arg0, arg1) {
839
1066
  arg0.onopen = arg1;
840
1067
  },
841
- __wbg_warn_b0df9a9e7105e74b: function(arg0, arg1) {
1068
+ __wbg_value_e0f328965e184931: function(arg0) {
1069
+ const ret = arg0.value;
1070
+ return ret;
1071
+ },
1072
+ __wbg_warn_95c497419b251cd5: function(arg0, arg1) {
842
1073
  console.warn(getStringFromWasm0(arg0, arg1));
843
1074
  },
844
1075
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
845
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
846
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63);
1076
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1077
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_96);
847
1078
  return ret;
848
1079
  },
849
1080
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
850
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
851
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63_37);
1081
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1082
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_96_46);
852
1083
  return ret;
853
1084
  },
854
1085
  __wbindgen_generic_0000000000000003: function(arg0, arg1) {
855
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
856
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63_38);
1086
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1087
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_96_47);
857
1088
  return ret;
858
1089
  },
859
1090
  __wbindgen_generic_0000000000000004: function(arg0, arg1) {
860
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
861
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_67);
1091
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 7, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1092
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_100);
862
1093
  return ret;
863
1094
  },
864
1095
  __wbindgen_generic_0000000000000005: function(arg0) {
@@ -896,20 +1127,20 @@ function __wbg_get_imports() {
896
1127
  };
897
1128
  }
898
1129
 
899
- function __wasm_bindgen_func_elem_67(arg0, arg1) {
900
- wasm.__wasm_bindgen_func_elem_67(arg0, arg1);
1130
+ function __wasm_bindgen_func_elem_100(arg0, arg1) {
1131
+ wasm.__wasm_bindgen_func_elem_100(arg0, arg1);
901
1132
  }
902
1133
 
903
- function __wasm_bindgen_func_elem_63(arg0, arg1, arg2) {
904
- wasm.__wasm_bindgen_func_elem_63(arg0, arg1, arg2);
1134
+ function __wasm_bindgen_func_elem_96(arg0, arg1, arg2) {
1135
+ wasm.__wasm_bindgen_func_elem_96(arg0, arg1, arg2);
905
1136
  }
906
1137
 
907
- function __wasm_bindgen_func_elem_63_37(arg0, arg1, arg2) {
908
- wasm.__wasm_bindgen_func_elem_63_37(arg0, arg1, arg2);
1138
+ function __wasm_bindgen_func_elem_96_46(arg0, arg1, arg2) {
1139
+ wasm.__wasm_bindgen_func_elem_96_46(arg0, arg1, arg2);
909
1140
  }
910
1141
 
911
- function __wasm_bindgen_func_elem_63_38(arg0, arg1, arg2) {
912
- wasm.__wasm_bindgen_func_elem_63_38(arg0, arg1, arg2);
1142
+ function __wasm_bindgen_func_elem_96_47(arg0, arg1, arg2) {
1143
+ wasm.__wasm_bindgen_func_elem_96_47(arg0, arg1, arg2);
913
1144
  }
914
1145
 
915
1146
 
@@ -1195,7 +1426,7 @@ async function __wbg_init_once(module_or_path) {
1195
1426
  }
1196
1427
 
1197
1428
  if (module_or_path === undefined) {
1198
- 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-DCBMfc2u.js', document.baseURI).href)));
1429
+ 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-CYh109n2.js', document.baseURI).href)));
1199
1430
  }
1200
1431
  const imports = __wbg_get_imports();
1201
1432
 
@@ -9,7 +9,7 @@
9
9
  "mixins": [],
10
10
  "compiler": {
11
11
  "name": "@stencil/core",
12
- "version": "4.45.3",
12
+ "version": "4.45.4",
13
13
  "typescriptVersion": "5.8.3"
14
14
  },
15
15
  "collections": [],
@@ -6,6 +6,10 @@
6
6
  * enums by name, data-carrying enums externally tagged (`{ Http: { … } }`).
7
7
  * Unit enums that may grow end in `Unknown`, as on the Rust side, so a newer
8
8
  * server never breaks an older widget.
9
+ *
10
+ * A Rust `None` reaches JS as `undefined` (the field is absent), not `null`,
11
+ * even where a type below says `| null`. Read optional fields with `??` or a
12
+ * truthiness check, never `=== null`. Checked against the real channel build.
9
13
  */
10
14
  /**
11
15
  * `msg_id`s `<phirepass-downloader>` mints start here, so a host sharing its
@@ -21,15 +21,30 @@ export function applyProgress(prev, job) {
21
21
  const { [job.download_id]: _gone, ...rest } = prev;
22
22
  return { jobs: rest, first: false };
23
23
  }
24
- const jobs = { ...prev, [job.download_id]: { ...job, deleting: before?.deleting } };
24
+ // Once deleting, a row stays so until the node says Deleted: its own
25
+ // progress in between does not carry the flag.
26
+ const deleting = job.deleting || before?.deleting || undefined;
27
+ const jobs = { ...prev, [job.download_id]: { ...job, deleting } };
25
28
  const completed = before && !isFinished(before.state) && isFinished(job.state) ? job : undefined;
26
29
  return { jobs, completed, first: !before };
27
30
  }
28
31
  const ACTIVE_STATES = new Set(['Queued', 'Scheduled', 'Resolving', 'FetchingMetadata', 'Downloading', 'Verifying', 'Paused', 'Stopped', 'Unknown']);
32
+ /**
33
+ * A finished torrent whose seeding was stopped. Its files are whole and
34
+ * Resume seeds again, so it stays with the finished rows. The agent keeps
35
+ * `seeding_since` through a Stop, which is what tells it apart from a
36
+ * download stopped half-way.
37
+ */
38
+ export function isPausedSeeding(row) {
39
+ return row.state === 'Stopped' && row.kind === 'Torrent' && !!row.seeding_since;
40
+ }
29
41
  export function tabOf(row) {
30
42
  if (row.state === 'Retrying') {
31
43
  return 'retrying';
32
44
  }
45
+ if (isPausedSeeding(row)) {
46
+ return 'finished';
47
+ }
33
48
  if (ACTIVE_STATES.has(row.state)) {
34
49
  return 'active';
35
50
  }
@@ -115,7 +130,9 @@ export function playCheck(row) {
115
130
  if (row.in_order) {
116
131
  return { play: true, file, switchToInOrder: false };
117
132
  }
118
- return { play: false, file: null, switchToInOrder: row.kind === 'Torrent' };
133
+ // Paused seeding has nothing left to download, so switching the order
134
+ // would change nothing.
135
+ return { play: false, file: null, switchToInOrder: row.kind === 'Torrent' && !isPausedSeeding(row) };
119
136
  }
120
137
  export function streamUrl(base, nodeId, downloadId, fileIndex) {
121
138
  return `${base.replace(/\/+$/, '')}/api/web/stream/${encodeURIComponent(nodeId)}/${encodeURIComponent(downloadId)}/${fileIndex}`;
@@ -164,7 +181,7 @@ export function statePill(row) {
164
181
  case 'Completed':
165
182
  return { text: 'Completed', tone: 'ok' };
166
183
  case 'Stopped':
167
- return { text: 'Stopped', tone: 'ps' };
184
+ return { text: isPausedSeeding(row) ? 'Seeding paused' : 'Stopped', tone: 'ps' };
168
185
  case 'Cancelled':
169
186
  return { text: 'Cancelled', tone: 'err' };
170
187
  default:
@@ -278,6 +295,12 @@ export function statsLine(row, ctx = {}) {
278
295
  break;
279
296
  }
280
297
  case 'Stopped':
298
+ if (isPausedSeeding(row)) {
299
+ push(`${formatBytes(row.up_total)} uploaded`);
300
+ push(row.reason ?? 'Seeding paused by you');
301
+ push('Resume shares it again');
302
+ break;
303
+ }
281
304
  push(pct, { strong: true });
282
305
  push(row.reason ?? 'Stopped by you');
283
306
  push('Resume continues from here');
@@ -79,6 +79,8 @@ export const EMPTY_AUTH = { mode: 'none', username: '', password: '', token: '',
79
79
  * what is missing. `null` with no error means no login.
80
80
  */
81
81
  export function buildSourceAuth(form) {
82
+ // The node refuses these too (`SourceAuth::problem`); this answers sooner.
83
+ const breaks = (...values) => values.some(v => /[\r\n\0]/.test(v));
82
84
  switch (form.mode) {
83
85
  case 'none':
84
86
  return { auth: null };
@@ -86,11 +88,20 @@ export function buildSourceAuth(form) {
86
88
  if (!form.username) {
87
89
  return { auth: null, error: 'Enter a username.' };
88
90
  }
91
+ if (form.username.includes(':')) {
92
+ return { auth: null, error: 'A username cannot contain a colon.' };
93
+ }
94
+ if (breaks(form.username, form.password)) {
95
+ return { auth: null, error: 'A login cannot contain line breaks.' };
96
+ }
89
97
  return { auth: { Basic: { username: form.username, password: form.password } } };
90
98
  case 'bearer':
91
99
  if (!form.token.trim()) {
92
100
  return { auth: null, error: 'Enter a token.' };
93
101
  }
102
+ if (breaks(form.token)) {
103
+ return { auth: null, error: 'A login cannot contain line breaks.' };
104
+ }
94
105
  return { auth: { Bearer: { token: form.token.trim() } } };
95
106
  case 'header': {
96
107
  const name = form.headerName.trim();
@@ -100,6 +111,9 @@ export function buildSourceAuth(form) {
100
111
  if (DENIED_AUTH_HEADERS.has(name.toLowerCase())) {
101
112
  return { auth: null, error: `${name} cannot be set here.` };
102
113
  }
114
+ if (breaks(form.headerValue)) {
115
+ return { auth: null, error: 'A login cannot contain line breaks.' };
116
+ }
103
117
  return { auth: { Header: { name, value: form.headerValue } } };
104
118
  }
105
119
  }
@@ -22,6 +22,7 @@ const paths = {
22
22
  lock: () => [h("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2" }), h("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })],
23
23
  signal: () => [h("path", { d: "M2 20h.01M7 20v-4M12 20v-8M17 20V8M22 4v16" })],
24
24
  plus: () => [h("path", { d: "M12 5v14M5 12h14" })],
25
+ link: () => [h("path", { d: "M10 13a5 5 0 0 0 7.5.5l3-3a5 5 0 0 0-7-7l-1.7 1.7" }), h("path", { d: "M14 11a5 5 0 0 0-7.5-.5l-3 3a5 5 0 0 0 7 7l1.7-1.7" })],
25
26
  };
26
27
  const filled = {
27
28
  pause: () => [h("rect", { x: "6", y: "5", width: "4", height: "14", rx: "1" }), h("rect", { x: "14", y: "5", width: "4", height: "14", rx: "1" })],
@@ -214,3 +214,12 @@ a.btn {
214
214
  animation: none;
215
215
  }
216
216
  }
217
+
218
+ .link-note {
219
+ margin: 0;
220
+ padding: 6px 10px;
221
+ font-size: 12px;
222
+ color: var(--w-dim, #737f8c);
223
+ overflow-wrap: anywhere;
224
+ border-top: 1px solid var(--w-border, #262c35);
225
+ }