airdcpp-webui 2.11.2 → 2.11.3-beta.1

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 (145) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.html +2 -2
  3. package/dist/js/{285.902dc3166e82226541a5.chunk.js → 285.c10a92f5e683562b290c.chunk.js} +2 -2
  4. package/dist/js/285.c10a92f5e683562b290c.chunk.js.gz +0 -0
  5. package/dist/js/{285.902dc3166e82226541a5.chunk.js.map → 285.c10a92f5e683562b290c.chunk.js.map} +1 -1
  6. package/dist/js/334.f0dae385c5c4aa9ceb6d.chunk.js +2 -0
  7. package/dist/js/334.f0dae385c5c4aa9ceb6d.chunk.js.gz +0 -0
  8. package/dist/js/334.f0dae385c5c4aa9ceb6d.chunk.js.map +1 -0
  9. package/dist/js/{424.b407aaf3218fa480b144.chunk.js → 424.2b137728423ffe5720b9.chunk.js} +1 -1
  10. package/dist/js/424.2b137728423ffe5720b9.chunk.js.gz +0 -0
  11. package/dist/js/{424.b407aaf3218fa480b144.chunk.js.map → 424.2b137728423ffe5720b9.chunk.js.map} +1 -1
  12. package/dist/js/{668.d0b45ae92f54a69beee3.chunk.js → 668.d8fc363a0da7c52c6cf3.chunk.js} +1 -1
  13. package/dist/js/668.d8fc363a0da7c52c6cf3.chunk.js.gz +0 -0
  14. package/dist/js/{668.d0b45ae92f54a69beee3.chunk.js.map → 668.d8fc363a0da7c52c6cf3.chunk.js.map} +1 -1
  15. package/dist/js/{69.8ca10b3d679cc4c52a20.chunk.js → 69.90201ebd79a3d236605f.chunk.js} +2 -2
  16. package/dist/js/69.90201ebd79a3d236605f.chunk.js.gz +0 -0
  17. package/dist/js/69.90201ebd79a3d236605f.chunk.js.map +1 -0
  18. package/dist/js/{702.99e6ce480dc579b6e542.chunk.js → 702.d36d38b2be52ab51c0a9.chunk.js} +1 -1
  19. package/dist/js/702.d36d38b2be52ab51c0a9.chunk.js.gz +0 -0
  20. package/dist/js/{702.99e6ce480dc579b6e542.chunk.js.map → 702.d36d38b2be52ab51c0a9.chunk.js.map} +1 -1
  21. package/dist/js/760.28a29fef05eb0889fc25.chunk.js +3 -0
  22. package/dist/js/{760.75d229a05d7b9bdf414b.chunk.js.LICENSE.txt → 760.28a29fef05eb0889fc25.chunk.js.LICENSE.txt} +0 -0
  23. package/dist/js/760.28a29fef05eb0889fc25.chunk.js.gz +0 -0
  24. package/dist/js/760.28a29fef05eb0889fc25.chunk.js.map +1 -0
  25. package/dist/js/{favorite-hubs.8e51f1debd3cd6c6d6c7.chunk.js → favorite-hubs.d78427e6a9006438d07b.chunk.js} +1 -1
  26. package/dist/js/favorite-hubs.d78427e6a9006438d07b.chunk.js.gz +0 -0
  27. package/dist/js/{favorite-hubs.8e51f1debd3cd6c6d6c7.chunk.js.map → favorite-hubs.d78427e6a9006438d07b.chunk.js.map} +1 -1
  28. package/dist/js/{filelists.a1ecb558a5c0c376191d.chunk.js → filelists.726450e0ff6e77eaa054.chunk.js} +1 -1
  29. package/dist/js/filelists.726450e0ff6e77eaa054.chunk.js.gz +0 -0
  30. package/dist/js/{filelists.a1ecb558a5c0c376191d.chunk.js.map → filelists.726450e0ff6e77eaa054.chunk.js.map} +1 -1
  31. package/dist/js/{files.9b2b25680e1e04de1931.chunk.js → files.50c047ffc599c58eb13a.chunk.js} +2 -2
  32. package/dist/js/files.50c047ffc599c58eb13a.chunk.js.gz +0 -0
  33. package/dist/js/{files.9b2b25680e1e04de1931.chunk.js.map → files.50c047ffc599c58eb13a.chunk.js.map} +1 -1
  34. package/dist/js/home.ed1091a84aa53f290563.chunk.js +3 -0
  35. package/dist/js/{home.21a1fe21d45ac82fafe5.chunk.js.LICENSE.txt → home.ed1091a84aa53f290563.chunk.js.LICENSE.txt} +0 -0
  36. package/dist/js/home.ed1091a84aa53f290563.chunk.js.gz +0 -0
  37. package/dist/js/home.ed1091a84aa53f290563.chunk.js.map +1 -0
  38. package/dist/js/{hubs.f336a1aeaac00fab20ce.chunk.js → hubs.eed2f41d894688465906.chunk.js} +2 -2
  39. package/dist/js/hubs.eed2f41d894688465906.chunk.js.gz +0 -0
  40. package/dist/js/{hubs.f336a1aeaac00fab20ce.chunk.js.map → hubs.eed2f41d894688465906.chunk.js.map} +1 -1
  41. package/dist/js/locales/{ca.7409d603c21de58635a6.chunk.js → ca.ed09d3a3d4bcca929ba1.chunk.js} +0 -0
  42. package/dist/js/locales/{ca.7409d603c21de58635a6.chunk.js.gz → ca.ed09d3a3d4bcca929ba1.chunk.js.gz} +0 -0
  43. package/dist/js/locales/{da.bd0c6f71e355d0794e71.chunk.js → da.6f60a77e9ef082dd3bf4.chunk.js} +0 -0
  44. package/dist/js/locales/{da.bd0c6f71e355d0794e71.chunk.js.gz → da.6f60a77e9ef082dd3bf4.chunk.js.gz} +0 -0
  45. package/dist/js/locales/{de.5adea2a7ce417c784479.chunk.js → de.3b7d3665460384259e82.chunk.js} +0 -0
  46. package/dist/js/locales/{de.5adea2a7ce417c784479.chunk.js.gz → de.3b7d3665460384259e82.chunk.js.gz} +0 -0
  47. package/dist/js/locales/{el.648369d465eb99118703.chunk.js → el.598573d2a5ed18804fe0.chunk.js} +0 -0
  48. package/dist/js/locales/{el.648369d465eb99118703.chunk.js.gz → el.598573d2a5ed18804fe0.chunk.js.gz} +0 -0
  49. package/dist/js/locales/{en.c66f69f706afd2da9eb5.chunk.js → en.f0fe75dca201449e5e47.chunk.js} +0 -0
  50. package/dist/js/locales/{en.c66f69f706afd2da9eb5.chunk.js.gz → en.f0fe75dca201449e5e47.chunk.js.gz} +0 -0
  51. package/dist/js/locales/{es.793f17d88083bf7f0738.chunk.js → es.cbe6378a22cf5ee485cd.chunk.js} +0 -0
  52. package/dist/js/locales/{es.793f17d88083bf7f0738.chunk.js.gz → es.cbe6378a22cf5ee485cd.chunk.js.gz} +0 -0
  53. package/dist/js/locales/{eu.010416cbe0a067839d4a.chunk.js → eu.7734fc077f26418d6b32.chunk.js} +0 -0
  54. package/dist/js/locales/{eu.010416cbe0a067839d4a.chunk.js.gz → eu.7734fc077f26418d6b32.chunk.js.gz} +0 -0
  55. package/dist/js/locales/{fi.7ecbf3197777fb8fd70f.chunk.js → fi.d1f8a5f4048236243b0f.chunk.js} +0 -0
  56. package/dist/js/locales/{fi.7ecbf3197777fb8fd70f.chunk.js.gz → fi.d1f8a5f4048236243b0f.chunk.js.gz} +0 -0
  57. package/dist/js/locales/fr.f46ce4fb57ed20dea8b5.chunk.js +1 -0
  58. package/dist/js/locales/fr.f46ce4fb57ed20dea8b5.chunk.js.gz +0 -0
  59. package/dist/js/locales/{hu.37c8f09717da5f1bc37c.chunk.js → hu.d0d2c38a03a3b38c2bc5.chunk.js} +0 -0
  60. package/dist/js/locales/{hu.37c8f09717da5f1bc37c.chunk.js.gz → hu.d0d2c38a03a3b38c2bc5.chunk.js.gz} +0 -0
  61. package/dist/js/locales/{it.9842f3b2b5bb3b7420c5.chunk.js → it.0c911d75c50ea83190ad.chunk.js} +0 -0
  62. package/dist/js/locales/{it.9842f3b2b5bb3b7420c5.chunk.js.gz → it.0c911d75c50ea83190ad.chunk.js.gz} +0 -0
  63. package/dist/js/locales/{nl.88085590f152551ec225.chunk.js → nl.36d288d75b3d3cbabf11.chunk.js} +0 -0
  64. package/dist/js/locales/{nl.88085590f152551ec225.chunk.js.gz → nl.36d288d75b3d3cbabf11.chunk.js.gz} +0 -0
  65. package/dist/js/locales/{no.cfa0a90ce428e087e846.chunk.js → no.8f2f465d5f785650175d.chunk.js} +0 -0
  66. package/dist/js/locales/{no.cfa0a90ce428e087e846.chunk.js.gz → no.8f2f465d5f785650175d.chunk.js.gz} +0 -0
  67. package/dist/js/locales/{pl.89540648cb16acad8d27.chunk.js → pl.06e51d7d7b09ba14714d.chunk.js} +0 -0
  68. package/dist/js/locales/{pl.89540648cb16acad8d27.chunk.js.gz → pl.06e51d7d7b09ba14714d.chunk.js.gz} +0 -0
  69. package/dist/js/locales/{pt-br.a537d1e531731dbec9dd.chunk.js → pt-br.9d19d92899e8c0917c66.chunk.js} +0 -0
  70. package/dist/js/locales/{pt-br.a537d1e531731dbec9dd.chunk.js.gz → pt-br.9d19d92899e8c0917c66.chunk.js.gz} +0 -0
  71. package/dist/js/locales/{pt.08213e494539393b14d1.chunk.js → pt.4390db3955db29b0e7dd.chunk.js} +0 -0
  72. package/dist/js/locales/{pt.08213e494539393b14d1.chunk.js.gz → pt.4390db3955db29b0e7dd.chunk.js.gz} +0 -0
  73. package/dist/js/locales/{ro.23f02315e6d9ab090aac.chunk.js → ro.705fcd327263fcf419bf.chunk.js} +0 -0
  74. package/dist/js/locales/{ro.23f02315e6d9ab090aac.chunk.js.gz → ro.705fcd327263fcf419bf.chunk.js.gz} +0 -0
  75. package/dist/js/locales/{ru.c775ae5709b4e2affc37.chunk.js → ru.8ab7e1c0d9eee7aa7afb.chunk.js} +0 -0
  76. package/dist/js/locales/{ru.c775ae5709b4e2affc37.chunk.js.gz → ru.8ab7e1c0d9eee7aa7afb.chunk.js.gz} +0 -0
  77. package/dist/js/locales/{sv.60ec4539680a48384a56.chunk.js → sv.be546e605910932db11f.chunk.js} +0 -0
  78. package/dist/js/locales/{sv.60ec4539680a48384a56.chunk.js.gz → sv.be546e605910932db11f.chunk.js.gz} +0 -0
  79. package/dist/js/locales/{tr.c19f95d7bf191aad9a74.chunk.js → tr.25a0d0f19e007e2febc9.chunk.js} +0 -0
  80. package/dist/js/locales/{tr.c19f95d7bf191aad9a74.chunk.js.gz → tr.25a0d0f19e007e2febc9.chunk.js.gz} +0 -0
  81. package/dist/js/locales/uk_UA.64a1a537c623ae0259dd.chunk.js +1 -0
  82. package/dist/js/locales/uk_UA.64a1a537c623ae0259dd.chunk.js.gz +0 -0
  83. package/dist/js/locales/{zh_CN.d27ea53dd79304789681.chunk.js → zh_CN.4b75674e4815a965ccea.chunk.js} +0 -0
  84. package/dist/js/locales/{zh_CN.d27ea53dd79304789681.chunk.js.gz → zh_CN.4b75674e4815a965ccea.chunk.js.gz} +0 -0
  85. package/dist/js/{main.d64158ea2453985dde98.entry.js → main.ad3d59f07b32feb5be60.entry.js} +3 -3
  86. package/dist/js/{main.d64158ea2453985dde98.entry.js.LICENSE.txt → main.ad3d59f07b32feb5be60.entry.js.LICENSE.txt} +0 -0
  87. package/dist/js/main.ad3d59f07b32feb5be60.entry.js.gz +0 -0
  88. package/dist/js/main.ad3d59f07b32feb5be60.entry.js.map +1 -0
  89. package/dist/js/{messages.e4523315258f6dab0f37.chunk.js → messages.d213dd0ac314a64b5a6c.chunk.js} +1 -1
  90. package/dist/js/messages.d213dd0ac314a64b5a6c.chunk.js.gz +0 -0
  91. package/dist/js/{messages.e4523315258f6dab0f37.chunk.js.map → messages.d213dd0ac314a64b5a6c.chunk.js.map} +1 -1
  92. package/dist/js/{queue.e52e481f79bce96a17e1.chunk.js → queue.2fcf7a1381f1fb4af03f.chunk.js} +1 -1
  93. package/dist/js/{queue.e52e481f79bce96a17e1.chunk.js.gz → queue.2fcf7a1381f1fb4af03f.chunk.js.gz} +0 -0
  94. package/dist/js/{queue.e52e481f79bce96a17e1.chunk.js.map → queue.2fcf7a1381f1fb4af03f.chunk.js.map} +1 -1
  95. package/dist/js/{search.321f771dd92b51431378.chunk.js → search.24ec8c5fe5f45b1180a9.chunk.js} +2 -2
  96. package/dist/js/search.24ec8c5fe5f45b1180a9.chunk.js.gz +0 -0
  97. package/dist/js/{search.321f771dd92b51431378.chunk.js.map → search.24ec8c5fe5f45b1180a9.chunk.js.map} +1 -1
  98. package/dist/js/settings.83541ccd8eafaab78d16.chunk.js +2 -0
  99. package/dist/js/settings.83541ccd8eafaab78d16.chunk.js.gz +0 -0
  100. package/dist/js/settings.83541ccd8eafaab78d16.chunk.js.map +1 -0
  101. package/dist/js/{share.ecb413c8d6a1cc8a6154.chunk.js → share.d94de2f3077842a88c25.chunk.js} +2 -2
  102. package/dist/js/share.d94de2f3077842a88c25.chunk.js.gz +0 -0
  103. package/dist/js/{share.ecb413c8d6a1cc8a6154.chunk.js.map → share.d94de2f3077842a88c25.chunk.js.map} +1 -1
  104. package/dist/js/{system-log.7aa8ba9d8b4a5711c4fc.chunk.js → system-log.b3fc65678cc7480e44e0.chunk.js} +1 -1
  105. package/dist/js/system-log.b3fc65678cc7480e44e0.chunk.js.gz +0 -0
  106. package/dist/js/{system-log.7aa8ba9d8b4a5711c4fc.chunk.js.map → system-log.b3fc65678cc7480e44e0.chunk.js.map} +1 -1
  107. package/dist/js/{transfers.5a7661c5701a462d4c53.chunk.js → transfers.5ec21f789068ff2e228f.chunk.js} +2 -2
  108. package/dist/js/transfers.5ec21f789068ff2e228f.chunk.js.gz +0 -0
  109. package/dist/js/{transfers.5a7661c5701a462d4c53.chunk.js.map → transfers.5ec21f789068ff2e228f.chunk.js.map} +1 -1
  110. package/dist/sw.js +1 -1
  111. package/dist/sw.js.gz +0 -0
  112. package/package.json +53 -51
  113. package/dist/js/285.902dc3166e82226541a5.chunk.js.gz +0 -0
  114. package/dist/js/334.f72694a737e72404ed6e.chunk.js +0 -2
  115. package/dist/js/334.f72694a737e72404ed6e.chunk.js.gz +0 -0
  116. package/dist/js/334.f72694a737e72404ed6e.chunk.js.map +0 -1
  117. package/dist/js/424.b407aaf3218fa480b144.chunk.js.gz +0 -0
  118. package/dist/js/668.d0b45ae92f54a69beee3.chunk.js.gz +0 -0
  119. package/dist/js/69.8ca10b3d679cc4c52a20.chunk.js.gz +0 -0
  120. package/dist/js/69.8ca10b3d679cc4c52a20.chunk.js.map +0 -1
  121. package/dist/js/702.99e6ce480dc579b6e542.chunk.js.gz +0 -0
  122. package/dist/js/760.75d229a05d7b9bdf414b.chunk.js +0 -3
  123. package/dist/js/760.75d229a05d7b9bdf414b.chunk.js.gz +0 -0
  124. package/dist/js/760.75d229a05d7b9bdf414b.chunk.js.map +0 -1
  125. package/dist/js/favorite-hubs.8e51f1debd3cd6c6d6c7.chunk.js.gz +0 -0
  126. package/dist/js/filelists.a1ecb558a5c0c376191d.chunk.js.gz +0 -0
  127. package/dist/js/files.9b2b25680e1e04de1931.chunk.js.gz +0 -0
  128. package/dist/js/home.21a1fe21d45ac82fafe5.chunk.js +0 -3
  129. package/dist/js/home.21a1fe21d45ac82fafe5.chunk.js.gz +0 -0
  130. package/dist/js/home.21a1fe21d45ac82fafe5.chunk.js.map +0 -1
  131. package/dist/js/hubs.f336a1aeaac00fab20ce.chunk.js.gz +0 -0
  132. package/dist/js/locales/fr.cf760489c7a0a9a02e31.chunk.js +0 -1
  133. package/dist/js/locales/fr.cf760489c7a0a9a02e31.chunk.js.gz +0 -0
  134. package/dist/js/locales/uk_UA.0678837b62a41e004e9c.chunk.js +0 -1
  135. package/dist/js/locales/uk_UA.0678837b62a41e004e9c.chunk.js.gz +0 -0
  136. package/dist/js/main.d64158ea2453985dde98.entry.js.gz +0 -0
  137. package/dist/js/main.d64158ea2453985dde98.entry.js.map +0 -1
  138. package/dist/js/messages.e4523315258f6dab0f37.chunk.js.gz +0 -0
  139. package/dist/js/search.321f771dd92b51431378.chunk.js.gz +0 -0
  140. package/dist/js/settings.3c031a77619c7df3a86e.chunk.js +0 -2
  141. package/dist/js/settings.3c031a77619c7df3a86e.chunk.js.gz +0 -0
  142. package/dist/js/settings.3c031a77619c7df3a86e.chunk.js.map +0 -1
  143. package/dist/js/share.ecb413c8d6a1cc8a6154.chunk.js.gz +0 -0
  144. package/dist/js/system-log.7aa8ba9d8b4a5711c4fc.chunk.js.gz +0 -0
  145. package/dist/js/transfers.5a7661c5701a462d4c53.chunk.js.gz +0 -0
@@ -1,2 +1,2 @@
1
1
  "use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[158],{60725:(e,s,n)=>{n.d(s,{Z:()=>a});var t=n(87537),i=n.n(t),o=n(23645),r=n.n(o)()(i());r.push([e.id,".ccpm-state {\r\n display: flex;\r\n}\r\n\r\n.ccpm-state > i {\r\n align-self: center;\r\n}","",{version:3,sources:["webpack://./src/routes/Sidebar/routes/Messages/style.css"],names:[],mappings:"AAAA;EACE,aAAa;AACf;;AAEA;EACE,kBAAkB;AACpB",sourcesContent:[".ccpm-state {\r\n display: flex;\r\n}\r\n\r\n.ccpm-state > i {\r\n align-self: center;\r\n}"],sourceRoot:""}]);const a=r},203:(e,s,n)=>{n.d(s,{Z:()=>c});var t=n(85893),i=n(55019),o=n(47021),r=n(54578),a=n(4333);function c(e){return{itemNameGetter:e=>e.user.nicks,itemStatusGetter(e){const{flags:s}=e.user;return(0,i.zg)(s)},itemHeaderDescriptionGetter:e=>e.user.hub_names,itemHeaderIconGetter:e=>(0,t.jsx)(r.Z,{flags:e.user.flags},void 0),itemHeaderTitleGetter(s,n,i){const{user:r}=s;return(0,t.jsx)(o.Ie,Object.assign({user:r,ids:e,remoteMenuId:a.Z.HINTED_USER},{children:i}),void 0)}}}},30916:(e,s,n)=>{n.r(s),n.d(s,{default:()=>ce});var t=n(85893),i=n(67294),o=n(10907),r=n(203),a=n(40279),c=n(14695),d=n(518),l=n(48117),u=n(50566),p=n(38982),S=n(76249),h=n(32347);const E={connectCCPM:{displayName:"Connect",access:S.PS.PRIVATE_CHAT_EDIT,icon:l.Z.PLAY,handler:({data:e})=>d.Z.post(`${c.Z.SESSIONS_URL}/${e.id}/ccpm`),filter:e=>e.ccpm_state.id===S.ZY.DISCONNECTED},disconnectCCPM:{access:S.PS.PRIVATE_CHAT_EDIT,displayName:"Disconnect",icon:l.Z.REMOVE,handler:({data:e})=>d.Z.delete(`${c.Z.SESSIONS_URL}/${e.id}/ccpm`),filter:e=>e.ccpm_state.id===S.ZY.CONNECTED}},A=(0,p.Z)((0,u.Z)(E,c.Z.SESSIONS_URL,S.PS.PRIVATE_CHAT_EDIT),c.Z.SESSIONS_URL,S.PS.PRIVATE_CHAT_EDIT),m={moduleId:h.jv.MESSAGES,actions:A};var C=n(6654),Z=n(3267),v=n(15479),I=n(78522);const T=e=>a.Z.getSession(e.user.cid);class _ extends i.Component{constructor(){super(...arguments),this.handleSubmit=e=>{C.Z.createSession(this.props.location,e,a.Z)},this.recentUserRender=e=>(0,t.jsx)("a",Object.assign({onClick:s=>this.handleSubmit(e.user)},{children:e.user.nicks}),void 0)}render(){const{sessionT:e}=this.props;return(0,t.jsxs)("div",Object.assign({className:"private chat session new"},{children:[(0,t.jsx)(I.v,{onChange:this.handleSubmit,offlineMessage:e.t("offlineMessage","You must to be connected to at least one hub in order to send private messages"),isClearable:!1,autoFocus:!0},void 0),(0,t.jsx)(Z.Z,{entryType:v.WJ.PRIVATE_CHAT,hasSession:T,entryTitleRenderer:this.recentUserRender,entryIcon:l.Z.MESSAGES_PLAIN},void 0)]}),void 0)}}const f=_;var g=n(40479),b=n(88998),O=n(54883),N=n(47021),P=n(68325);const x=(e,s)=>{const{translate:n}=s;switch(e){case S.ZY.CONNECTED:return n("Direct encrypted channel established");case S.ZY.CONNECTING:return(0,t.jsx)(O.Z,{size:"mini",inline:!0,text:n("Establishing connection...")},void 0);case S.ZY.DISCONNECTED:return n("Direct encrypted channel available");default:return null}},y=({session:e,sessionT:s})=>{const{flags:n}=e.user;if(-1===n.indexOf("ccpm"))return null;const i=e.ccpm_state.id;return i===S.ZY.DISCONNECTED&&-1!==n.indexOf("offline")?null:(0,t.jsx)(b.C,{children:(0,t.jsxs)("div",Object.assign({className:"ccpm-state"},{children:[(0,t.jsx)(P.Z,{encryption:e.ccpm_state.encryption,alwaysVisible:!0,boundary:".session-container"},void 0),(0,t.jsx)(N.PC,{caption:x(i,s),actions:m,ids:["disconnectCCPM","connectCCPM"],itemData:e},void 0)]}),void 0)},void 0)};var j=n(10293),D=n.n(j),R=n(41143),M=n.n(R),w=n(14936),H=n(94897),U=n(46614);const G=D().createStore({scroll:(0,U.$)(),onSocketConnected(e){M()(!this.hasMessages(),"No existing private messages should exist on socket connect"),M()(!this.hasInitializedSessions(),"No initialized private message sessions should exist on socket connect");const s=c.Z.MODULE_URL;e(s,c.Z.MESSAGE,this._onChatMessage),e(s,c.Z.STATUS,this._onStatusMessage),e(s,c.Z.SESSION_REMOVED,this._onSessionRemoved),e(s,c.Z.SESSION_UPDATED,this._onSessionUpdated)}}),k=(0,w.Z)(G,C.Z,H.Z.PRIVATE_CHAT_VIEW);var V=n(74225),L=n(4333);class Y extends i.Component{constructor(){super(...arguments),this.handleFileUpload=e=>{const{cid:s,hub_url:n,flags:t}=this.props.session.user,i=-1===t.indexOf("nmdc")&&-1===t.indexOf("bot");return(0,V.Pd)(e,n,i?s:void 0)}}render(){const{session:e,sessionApi:s,sessionT:n,uiActions:i}=this.props;return(0,t.jsxs)("div",Object.assign({className:"private chat session"},{children:[(0,t.jsx)(g.Z,{chatAccess:S.PS.PRIVATE_CHAT_SEND,chatActions:i,chatApi:C.Z,sessionApi:s,messageStore:k,session:e,handleFileUpload:this.handleFileUpload,highlightRemoteMenuId:L.Z.PRIVATE_CHAT_MESSAGE_HIGHLIGHT},void 0),(0,t.jsx)(y,{session:e,sessionT:n},void 0)]}),void 0)}}Y.displayName="PrivateChatSession";const z=Y;var $=n(93379),F=n.n($),B=n(7795),J=n.n(B),W=n(90569),q=n.n(W),K=n(3565),Q=n.n(K),X=n(19216),ee=n.n(X),se=n(44589),ne=n.n(se),te=n(60725),ie={};ie.styleTagTransform=ne(),ie.setAttributes=Q(),ie.insert=q().bind(null,"head"),ie.domAPI=J(),ie.insertStyleElement=ee(),F()(te.Z,ie),te.Z&&te.Z.locals&&te.Z.locals;var oe=n(93101),re=n(8717);const ae=["clear"],ce=(0,oe.J)((e=>{const{match:s,t:n}=e,i=function(e,s){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&s.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i<t.length;i++)s.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(n[t[i]]=e[t[i]])}return n}(e,["match","t"]);return(0,t.jsx)(o.Z,Object.assign({activeId:s.params.id,baseUrl:"messages",newCaption:n((0,re.zS)("new",h.jv.MESSAGES),"New session"),newDescription:n((0,re.zS)("newDesc",h.jv.MESSAGES),"Open a new private chat session"),newIcon:l.Z.MESSAGES_PLAIN,unreadInfoStore:a.Z,editAccess:S.PS.PRIVATE_CHAT_EDIT,uiActions:m,sessionApi:C.Z,actionIds:ae,sessionItemLayout:z,newLayout:f,t:n},(0,r.Z)(["browse","ignore","unignore"]),i),void 0)}),a.Z)}}]);
2
- //# sourceMappingURL=messages.e4523315258f6dab0f37.chunk.js.map
2
+ //# sourceMappingURL=messages.d213dd0ac314a64b5a6c.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"js/messages.e4523315258f6dab0f37.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,gGAAiG,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,4DAA4D,MAAQ,GAAG,SAAW,8CAA8C,eAAiB,CAAC,iGAAiG,WAAa,MAEra,W,yFCMe,SAAS,EAAwDC,GAiC9E,MAhCiE,CAC/DC,eAAeC,GACNA,EAAQC,KAAKC,MAGtBC,iBAAiBH,GACf,MAAM,MAAEI,GAAUJ,EAAQC,KAC1B,OAAO,QAAwBG,IAGjCC,4BAA4BL,GACnBA,EAAQC,KAAKK,UAGtBC,qBAAqBP,IACZ,SAAC,IAAQ,CAACI,MAAQJ,EAAQC,KAAKG,YAAK,GAG7CI,sBAAsBR,EAASS,EAAUC,GACvC,MAAM,KAAET,GAASD,EACjB,OACE,SAAC,KAAQ,eACPC,KAAOA,EACPU,IAAMb,EACNc,aAAe,iBAAyB,UAEtCF,SAAU,O,mLC5BtB,MAWMG,EAAyD,CAC7DC,YAAa,CACXC,YAAa,UACbC,OAAQ,uBACRC,KAAMC,EAAA,OACNC,QAhByD,EAAGC,KAAMpB,KAC7DqB,EAAA,OAAmB,GAAGC,EAAA,kBAAqCtB,EAAQH,WAgBxE0B,OARsBH,GAA0BA,EAAKI,WAAW3B,KAAO,mBAUzE4B,eAAgB,CAC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D,OACE,+BAAKM,UAAU,wBAAsB,YACnC,SAAC+C,EAAA,EAAU,CACTC,WAAa,uBACbC,YAAcH,EACdI,QAAU,IACVL,WAAaA,EACbM,aAAe,EACfhG,QAAUA,EACVqF,iBAAmB/C,KAAK+C,iBACxBY,sBAAwBC,EAAA,uCAA4C,IAGtE,SAACC,EAAa,CACZnG,QAAUA,EACV4C,SAAWA,QAAQ,WACnB,IA3BD,EAAA7B,YAAc,qBAiCvB,U,0IC3CIqF,GAAU,GAEdA,GAAQC,kBAAoB,KAC5BD,GAAQE,cAAgB,IAElBF,GAAQG,OAAS,SAAc,KAAM,QAE3CH,GAAQI,OAAS,IACjBJ,GAAQK,mBAAqB,KAEhB,IAAI,KAASL,IAKJ,MAAW,aAAiB,Y,2BCHlD,MAAMM,GAAiB,CAAE,SAyBzB,IAAe,EAAAC,GAAA,IAvBiEpE,IAC9E,MAAM,MAAEqE,EAAK,EAAE5D,GAAgBT,EAAVsE,E,yUAAK,CAAKtE,EAAzB,eACN,OACE,SAACuE,EAAA,EAAa,eACZC,SAAWH,EAAMI,OAAOnH,GACxBoH,QAAQ,WACRC,WAAalE,GAAE,SAAU,MAAO,eAAsB,eACtDmE,eAAiBnE,GAAE,SAAU,UAAW,eAAsB,mCAC9DoE,QAAUlG,EAAA,iBACVmG,gBAAkBpF,EAAA,EAClBqF,WAAa,uBACb3B,UAAY,EACZD,WAAa,IACb6B,UAAYb,GACZc,kBAAoB,EACpBC,UAAY,EACZzE,EAAIA,IACC,EAAA0E,EAAA,GAAyB,CAAE,SAAU,SAAU,aAC/Cb,QAAK,KAKkC5E,EAAA","sources":["webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/style.css","webpack://airdcpp-webui/./src/routes/Sidebar/decorators/UserItemHandlerDecorator.tsx","webpack://airdcpp-webui/./src/actions/ui/PrivateChatActions.ts","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/components/MessageNew.tsx","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/components/MessageFooter.tsx","webpack://airdcpp-webui/./src/stores/PrivateChatMessageStore.ts","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/components/PrivateChatSession.tsx","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/style.css?55a2","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/components/Messages.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ccpm-state {\\r\\n display: flex;\\r\\n}\\r\\n\\r\\n.ccpm-state > i {\\r\\n align-self: center;\\r\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/routes/Sidebar/routes/Messages/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,aAAa;AACf;;AAEA;EACE,kBAAkB;AACpB\",\"sourcesContent\":[\".ccpm-state {\\r\\n display: flex;\\r\\n}\\r\\n\\r\\n.ccpm-state > i {\\r\\n align-self: center;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { userOnlineStatusToColor } from 'utils/TypeConvert';\r\nimport { UserMenu } from 'components/menu';\r\nimport UserIcon from 'components/icon/UserIcon';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\ninterface UserSessionBase {\r\n user: API.HintedUser;\r\n}\r\n\r\nexport default function <SessionT extends UI.SessionItemBase & UserSessionBase>(itemMenuIds: string[]) {\r\n const UserItemHandlerDecorator: UI.SessionInfoGetter<SessionT> = {\r\n itemNameGetter(session) {\r\n return session.user.nicks;\r\n },\r\n\r\n itemStatusGetter(session) {\r\n const { flags } = session.user;\r\n return userOnlineStatusToColor(flags);\r\n },\r\n\r\n itemHeaderDescriptionGetter(session) {\r\n return session.user.hub_names;\r\n },\r\n\r\n itemHeaderIconGetter(session) {\r\n return <UserIcon flags={ session.user.flags } />;\r\n },\r\n\r\n itemHeaderTitleGetter(session, location, actionMenu) {\r\n const { user } = session;\r\n return (\r\n <UserMenu \r\n user={ user } \r\n ids={ itemMenuIds }\r\n remoteMenuId={ MenuConstants.HINTED_USER }\r\n >\r\n { actionMenu }\r\n </UserMenu>\r\n );\r\n },\r\n };\r\n\r\n return UserItemHandlerDecorator;\r\n}\r\n","import PrivateChatConstants from 'constants/PrivateChatConstants';\r\nimport SocketService from 'services/SocketService';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport ChatActionDecorator from './decorators/ChatActionDecorator';\r\nimport SessionActionDecorator from './decorators/SessionActionDecorator';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\nconst handleConnectCCPM: UI.ActionHandler<API.PrivateChat> = ({ data: session }) => {\r\n return SocketService.post(`${PrivateChatConstants.SESSIONS_URL}/${session.id}/ccpm`);\r\n};\r\n\r\nconst handleDisconnectCCPM: UI.ActionHandler<API.PrivateChat> = ({ data: session }) => {\r\n return SocketService.delete(`${PrivateChatConstants.SESSIONS_URL}/${session.id}/ccpm`);\r\n};\r\n\r\nconst ccpmConnected = (data: API.PrivateChat) => data.ccpm_state.id === API.CCPMStateEnum.CONNECTED;\r\nconst ccpmDisconnected = (data: API.PrivateChat) => data.ccpm_state.id === API.CCPMStateEnum.DISCONNECTED;\r\n\r\nconst PrivateChatActions: UI.ActionListType<API.PrivateChat> = {\r\n connectCCPM: {\r\n displayName: 'Connect',\r\n access: API.AccessEnum.PRIVATE_CHAT_EDIT, \r\n icon: IconConstants.PLAY,\r\n handler: handleConnectCCPM,\r\n filter: ccpmDisconnected,\r\n },\r\n disconnectCCPM: {\r\n access: API.AccessEnum.PRIVATE_CHAT_EDIT, \r\n displayName: 'Disconnect', \r\n icon: IconConstants.REMOVE,\r\n handler: handleDisconnectCCPM,\r\n filter: ccpmConnected,\r\n },\r\n};\r\n\r\n\r\nconst PrivateChatActionsDecorated = SessionActionDecorator(\r\n ChatActionDecorator(\r\n PrivateChatActions, \r\n PrivateChatConstants.SESSIONS_URL, \r\n API.AccessEnum.PRIVATE_CHAT_EDIT\r\n ), \r\n PrivateChatConstants.SESSIONS_URL, \r\n API.AccessEnum.PRIVATE_CHAT_EDIT\r\n);\r\n\r\n\r\nexport default {\r\n moduleId: UI.Modules.MESSAGES,\r\n actions: PrivateChatActionsDecorated,\r\n};\r\n","import { Component } from 'react';\r\n\r\nimport RecentLayout from 'routes/Sidebar/components/RecentLayout';\r\n\r\nimport PrivateChatActions from 'actions/reflux/PrivateChatActions';\r\nimport PrivateChatSessionStore from 'stores/PrivateChatSessionStore';\r\n\r\nimport { HistoryEntryEnum } from 'constants/HistoryConstants';\r\n\r\nimport * as API from 'types/api';\r\n\r\nimport { NewSessionLayoutProps } from 'routes/Sidebar/components/SessionLayout';\r\nimport IconConstants from 'constants/IconConstants';\r\nimport { UserSelectField } from 'components/select';\r\n\r\n\r\nconst hasSession = (entry: API.HistoryItem) => {\r\n return PrivateChatSessionStore.getSession(entry.user!.cid);\r\n};\r\n\r\nclass MessageNew extends Component<NewSessionLayoutProps> {\r\n handleSubmit = (user: API.HintedUser) => {\r\n PrivateChatActions.createSession(this.props.location, user, PrivateChatSessionStore);\r\n }\r\n\r\n recentUserRender = (entry: API.HistoryItem) => {\r\n return (\r\n <a onClick={ _ => this.handleSubmit(entry.user!) }>\r\n { entry.user!.nicks }\r\n </a> \r\n );\r\n }\r\n\r\n render() {\r\n const { sessionT } = this.props;\r\n return (\r\n <div className=\"private chat session new\"> \r\n <UserSelectField \r\n onChange={ this.handleSubmit } \r\n offlineMessage={ sessionT.t<string>(\r\n 'offlineMessage',\r\n 'You must to be connected to at least one hub in order to send private messages'\r\n ) }\r\n isClearable={ false }\r\n autoFocus={ true }\r\n />\r\n <RecentLayout\r\n entryType={ HistoryEntryEnum.PRIVATE_CHAT }\r\n hasSession={ hasSession }\r\n entryTitleRenderer={ this.recentUserRender }\r\n entryIcon={ IconConstants.MESSAGES_PLAIN }\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default MessageNew;\r\n","import * as React from 'react';\r\n\r\nimport PrivateChatActions from 'actions/ui/PrivateChatActions';\r\n\r\nimport { SessionFooter } from 'routes/Sidebar/components/SessionFooter';\r\nimport Loader from 'components/semantic/Loader';\r\nimport { ActionMenu } from 'components/menu';\r\nimport EncryptionState from 'components/EncryptionState';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\nconst getCaption = (state: API.CCPMStateEnum, sessionT: UI.ModuleTranslator) => {\r\n const { translate } = sessionT;\r\n switch (state) {\r\n case API.CCPMStateEnum.CONNECTED: return translate('Direct encrypted channel established');\r\n case API.CCPMStateEnum.CONNECTING: return (\r\n <Loader \r\n size=\"mini\" \r\n inline={ true } \r\n text={ translate('Establishing connection...') }\r\n />\r\n );\r\n case API.CCPMStateEnum.DISCONNECTED: return translate('Direct encrypted channel available');\r\n default: return null;\r\n }\r\n};\r\n\r\n\r\ninterface CCPMStateProps {\r\n session: API.PrivateChat;\r\n sessionT: UI.ModuleTranslator;\r\n}\r\n\r\nconst CCPMState: React.FC<CCPMStateProps> = ({ session, sessionT }) => {\r\n const { flags } = session.user;\r\n if (flags.indexOf('ccpm') === -1) {\r\n return null;\r\n }\r\n\r\n const state = session.ccpm_state.id;\r\n if (state === API.CCPMStateEnum.DISCONNECTED && flags.indexOf('offline') !== -1) {\r\n return null;\r\n }\r\n\r\n return (\r\n <SessionFooter>\r\n <div className=\"ccpm-state\">\r\n <EncryptionState \r\n encryption={ session.ccpm_state.encryption } \r\n alwaysVisible={ true }\r\n boundary=\".session-container\"\r\n />\r\n <ActionMenu\r\n caption={ getCaption(state, sessionT) }\r\n actions={ PrivateChatActions }\r\n ids={[ 'disconnectCCPM', 'connectCCPM' ]}\r\n itemData={ session }\r\n />\r\n </div>\r\n </SessionFooter>\r\n );\r\n};\r\n\r\nexport default CCPMState;","//@ts-ignore\r\nimport Reflux from 'reflux';\r\nimport invariant from 'invariant';\r\n\r\nimport PrivateChatConstants from 'constants/PrivateChatConstants';\r\nimport PrivateChatActions from 'actions/reflux/PrivateChatActions';\r\n\r\nimport MessageStoreDecorator from './decorators/MessageStoreDecorator';\r\n\r\nimport AccessConstants from 'constants/AccessConstants';\r\nimport { AddSocketListener } from 'decorators/SocketSubscriptionDecorator';\r\nimport { SessionScrollPositionKeeper } from './helpers/SessionScrollPositionKeeper';\r\n\r\n\r\nconst PrivateChatMessageStore = Reflux.createStore({\r\n scroll: SessionScrollPositionKeeper(),\r\n\r\n onSocketConnected(addSocketListener: AddSocketListener) {\r\n invariant(!this.hasMessages(), 'No existing private messages should exist on socket connect');\r\n invariant(!this.hasInitializedSessions(), 'No initialized private message sessions should exist on socket connect');\r\n\r\n const url = PrivateChatConstants.MODULE_URL;\r\n addSocketListener(url, PrivateChatConstants.MESSAGE, this._onChatMessage);\r\n addSocketListener(url, PrivateChatConstants.STATUS, this._onStatusMessage);\r\n\r\n addSocketListener(url, PrivateChatConstants.SESSION_REMOVED, this._onSessionRemoved);\r\n addSocketListener(url, PrivateChatConstants.SESSION_UPDATED, this._onSessionUpdated);\r\n },\r\n});\r\n\r\nexport default MessageStoreDecorator(PrivateChatMessageStore, PrivateChatActions, AccessConstants.PRIVATE_CHAT_VIEW)\r\n;\r\n","import { Component } from 'react';\r\n\r\nimport ChatLayout, { ChatAPI, ChatActionList } from 'routes/Sidebar/components/chat/ChatLayout';\r\nimport MessageFooter from 'routes/Sidebar/routes/Messages/components/MessageFooter';\r\n\r\nimport PrivateChatMessageStore from 'stores/PrivateChatMessageStore';\r\n\r\nimport * as API from 'types/api';\r\n//import * as UI from 'types/ui';\r\n\r\nimport { SessionChildProps } from 'routes/Sidebar/components/SessionLayout';\r\nimport { shareTempFile } from 'services/api/ShareApi';\r\nimport PrivateChatActions from 'actions/reflux/PrivateChatActions';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\ninterface PrivateChatSessionProps extends SessionChildProps<API.PrivateChat, {}, ChatActionList> {\r\n\r\n}\r\n\r\nclass PrivateChatSession extends Component<PrivateChatSessionProps> {\r\n static displayName = 'PrivateChatSession';\r\n\r\n handleFileUpload = (file: File) => {\r\n const { cid, hub_url, flags } = this.props.session.user;\r\n\r\n const isPrivate = flags.indexOf('nmdc') === -1 && flags.indexOf('bot') === -1;\r\n return shareTempFile(file, hub_url, isPrivate ? cid : undefined);\r\n }\r\n\r\n render() {\r\n const { session, sessionApi, sessionT, uiActions } = this.props;\r\n return (\r\n <div className=\"private chat session\">\r\n <ChatLayout\r\n chatAccess={ API.AccessEnum.PRIVATE_CHAT_SEND }\r\n chatActions={ uiActions }\r\n chatApi={ PrivateChatActions as ChatAPI }\r\n sessionApi={ sessionApi }\r\n messageStore={ PrivateChatMessageStore }\r\n session={ session }\r\n handleFileUpload={ this.handleFileUpload }\r\n highlightRemoteMenuId={ MenuConstants.PRIVATE_CHAT_MESSAGE_HIGHLIGHT }\r\n />\r\n\r\n <MessageFooter\r\n session={ session }\r\n sessionT={ sessionT }\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default PrivateChatSession;\r\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import * as React from 'react';\r\n\r\nimport SessionLayout from 'routes/Sidebar/components/SessionLayout';\r\nimport UserItemHandlerDecorator from 'routes/Sidebar/decorators/UserItemHandlerDecorator';\r\n\r\nimport PrivateChatSessionStore from 'stores/PrivateChatSessionStore';\r\nimport PrivateChatUIActions from 'actions/ui/PrivateChatActions';\r\nimport PrivateChatAPIActions from 'actions/reflux/PrivateChatActions';\r\n\r\nimport MessageNew from 'routes/Sidebar/routes/Messages/components/MessageNew';\r\nimport PrivateChatSession from 'routes/Sidebar/routes/Messages/components/PrivateChatSession';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport '../style.css';\r\nimport { \r\n SessionProviderDecoratorChildProps, SessionProviderDecorator\r\n} from 'routes/Sidebar/decorators/SessionProviderDecorator';\r\nimport { toI18nKey } from 'utils/TranslationUtils';\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\n\r\nconst sessionActions = [ 'clear' ];\r\n\r\nconst Messages: React.FC<SessionProviderDecoratorChildProps<API.PrivateChat>> = props => {\r\n const { match, t, ...other } = props;\r\n return (\r\n <SessionLayout \r\n activeId={ match.params.id }\r\n baseUrl=\"messages\"\r\n newCaption={ t(toI18nKey('new', UI.Modules.MESSAGES), 'New session') }\r\n newDescription={ t(toI18nKey('newDesc', UI.Modules.MESSAGES), 'Open a new private chat session') } \r\n newIcon={ IconConstants.MESSAGES_PLAIN }\r\n unreadInfoStore={ PrivateChatSessionStore }\r\n editAccess={ API.AccessEnum.PRIVATE_CHAT_EDIT }\r\n uiActions={ PrivateChatUIActions }\r\n sessionApi={ PrivateChatAPIActions as UI.SessionActions<API.PrivateChat> }\r\n actionIds={ sessionActions }\r\n sessionItemLayout={ PrivateChatSession }\r\n newLayout={ MessageNew }\r\n t={ t }\r\n { ...UserItemHandlerDecorator([ 'browse', 'ignore', 'unignore' ]) }\r\n { ...other }\r\n />\r\n );\r\n};\r\n\r\nexport default SessionProviderDecorator(Messages, PrivateChatSessionStore);\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","itemMenuIds","itemNameGetter","session","user","nicks","itemStatusGetter","flags","itemHeaderDescriptionGetter","hub_names","itemHeaderIconGetter","itemHeaderTitleGetter","location","actionMenu","ids","remoteMenuId","PrivateChatActions","connectCCPM","displayName","access","icon","IconConstants","handler","data","SocketService","PrivateChatConstants","filter","ccpm_state","disconnectCCPM","PrivateChatActionsDecorated","SessionActionDecorator","ChatActionDecorator","moduleId","actions","hasSession","entry","PrivateChatSessionStore","cid","MessageNew","Component","handleSubmit","this","props","recentUserRender","onClick","_","render","sessionT","className","onChange","offlineMessage","t","isClearable","autoFocus","RecentLayout","entryType","entryTitleRenderer","entryIcon","getCaption","state","translate","Loader","size","inline","text","indexOf","SessionFooter","EncryptionState","encryption","alwaysVisible","boundary","caption","itemData","PrivateChatMessageStore","scroll","SessionScrollPositionKeeper","onSocketConnected","addSocketListener","hasMessages","hasInitializedSessions","url","_onChatMessage","_onStatusMessage","_onSessionRemoved","_onSessionUpdated","MessageStoreDecorator","AccessConstants","PrivateChatSession","handleFileUpload","file","hub_url","isPrivate","undefined","sessionApi","uiActions","ChatLayout","chatAccess","chatActions","chatApi","messageStore","highlightRemoteMenuId","MenuConstants","MessageFooter","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","sessionActions","SessionProviderDecorator","match","other","SessionLayout","activeId","params","baseUrl","newCaption","newDescription","newIcon","unreadInfoStore","editAccess","actionIds","sessionItemLayout","newLayout","UserItemHandlerDecorator"],"sourceRoot":""}
1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BF,GAAQG,OAAS,SAAc,KAAM,QAE3CH,GAAQI,OAAS,IACjBJ,GAAQK,mBAAqB,KAEhB,IAAI,KAASL,IAKJ,MAAW,aAAiB,Y,2BCHlD,MAAMM,GAAiB,CAAE,SAyBzB,IAAe,EAAAC,GAAA,IAvBiEpE,IAC9E,MAAM,MAAEqE,EAAK,EAAE5D,GAAgBT,EAAVsE,E,yUAAK,CAAKtE,EAAzB,eACN,OACE,SAACuE,EAAA,EAAa,eACZC,SAAWH,EAAMI,OAAOnH,GACxBoH,QAAQ,WACRC,WAAalE,GAAE,SAAU,MAAO,eAAsB,eACtDmE,eAAiBnE,GAAE,SAAU,UAAW,eAAsB,mCAC9DoE,QAAUlG,EAAA,iBACVmG,gBAAkBpF,EAAA,EAClBqF,WAAa,uBACb3B,UAAY,EACZD,WAAa,IACb6B,UAAYb,GACZc,kBAAoB,EACpBC,UAAY,EACZzE,EAAIA,IACC,EAAA0E,EAAA,GAAyB,CAAE,SAAU,SAAU,aAC/Cb,QAAK,KAKkC5E,EAAA","sources":["webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/style.css","webpack://airdcpp-webui/./src/routes/Sidebar/decorators/UserItemHandlerDecorator.tsx","webpack://airdcpp-webui/./src/actions/ui/PrivateChatActions.ts","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/components/MessageNew.tsx","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/components/MessageFooter.tsx","webpack://airdcpp-webui/./src/stores/PrivateChatMessageStore.ts","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/components/PrivateChatSession.tsx","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/style.css?55a2","webpack://airdcpp-webui/./src/routes/Sidebar/routes/Messages/components/Messages.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".ccpm-state {\\r\\n display: flex;\\r\\n}\\r\\n\\r\\n.ccpm-state > i {\\r\\n align-self: center;\\r\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/routes/Sidebar/routes/Messages/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,aAAa;AACf;;AAEA;EACE,kBAAkB;AACpB\",\"sourcesContent\":[\".ccpm-state {\\r\\n display: flex;\\r\\n}\\r\\n\\r\\n.ccpm-state > i {\\r\\n align-self: center;\\r\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import { userOnlineStatusToColor } from 'utils/TypeConvert';\r\nimport { UserMenu } from 'components/menu';\r\nimport UserIcon from 'components/icon/UserIcon';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\ninterface UserSessionBase {\r\n user: API.HintedUser;\r\n}\r\n\r\nexport default function <SessionT extends UI.SessionItemBase & UserSessionBase>(itemMenuIds: string[]) {\r\n const UserItemHandlerDecorator: UI.SessionInfoGetter<SessionT> = {\r\n itemNameGetter(session) {\r\n return session.user.nicks;\r\n },\r\n\r\n itemStatusGetter(session) {\r\n const { flags } = session.user;\r\n return userOnlineStatusToColor(flags);\r\n },\r\n\r\n itemHeaderDescriptionGetter(session) {\r\n return session.user.hub_names;\r\n },\r\n\r\n itemHeaderIconGetter(session) {\r\n return <UserIcon flags={ session.user.flags } />;\r\n },\r\n\r\n itemHeaderTitleGetter(session, location, actionMenu) {\r\n const { user } = session;\r\n return (\r\n <UserMenu \r\n user={ user } \r\n ids={ itemMenuIds }\r\n remoteMenuId={ MenuConstants.HINTED_USER }\r\n >\r\n { actionMenu }\r\n </UserMenu>\r\n );\r\n },\r\n };\r\n\r\n return UserItemHandlerDecorator;\r\n}\r\n","import PrivateChatConstants from 'constants/PrivateChatConstants';\r\nimport SocketService from 'services/SocketService';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport ChatActionDecorator from './decorators/ChatActionDecorator';\r\nimport SessionActionDecorator from './decorators/SessionActionDecorator';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\nconst handleConnectCCPM: UI.ActionHandler<API.PrivateChat> = ({ data: session }) => {\r\n return SocketService.post(`${PrivateChatConstants.SESSIONS_URL}/${session.id}/ccpm`);\r\n};\r\n\r\nconst handleDisconnectCCPM: UI.ActionHandler<API.PrivateChat> = ({ data: session }) => {\r\n return SocketService.delete(`${PrivateChatConstants.SESSIONS_URL}/${session.id}/ccpm`);\r\n};\r\n\r\nconst ccpmConnected = (data: API.PrivateChat) => data.ccpm_state.id === API.CCPMStateEnum.CONNECTED;\r\nconst ccpmDisconnected = (data: API.PrivateChat) => data.ccpm_state.id === API.CCPMStateEnum.DISCONNECTED;\r\n\r\nconst PrivateChatActions: UI.ActionListType<API.PrivateChat> = {\r\n connectCCPM: {\r\n displayName: 'Connect',\r\n access: API.AccessEnum.PRIVATE_CHAT_EDIT, \r\n icon: IconConstants.PLAY,\r\n handler: handleConnectCCPM,\r\n filter: ccpmDisconnected,\r\n },\r\n disconnectCCPM: {\r\n access: API.AccessEnum.PRIVATE_CHAT_EDIT, \r\n displayName: 'Disconnect', \r\n icon: IconConstants.REMOVE,\r\n handler: handleDisconnectCCPM,\r\n filter: ccpmConnected,\r\n },\r\n};\r\n\r\n\r\nconst PrivateChatActionsDecorated = SessionActionDecorator(\r\n ChatActionDecorator(\r\n PrivateChatActions, \r\n PrivateChatConstants.SESSIONS_URL, \r\n API.AccessEnum.PRIVATE_CHAT_EDIT\r\n ), \r\n PrivateChatConstants.SESSIONS_URL, \r\n API.AccessEnum.PRIVATE_CHAT_EDIT\r\n);\r\n\r\n\r\nexport default {\r\n moduleId: UI.Modules.MESSAGES,\r\n actions: PrivateChatActionsDecorated,\r\n};\r\n","import { Component } from 'react';\r\n\r\nimport RecentLayout from 'routes/Sidebar/components/RecentLayout';\r\n\r\nimport PrivateChatActions from 'actions/reflux/PrivateChatActions';\r\nimport PrivateChatSessionStore from 'stores/PrivateChatSessionStore';\r\n\r\nimport { HistoryEntryEnum } from 'constants/HistoryConstants';\r\n\r\nimport * as API from 'types/api';\r\n\r\nimport { NewSessionLayoutProps } from 'routes/Sidebar/components/SessionLayout';\r\nimport IconConstants from 'constants/IconConstants';\r\nimport { UserSelectField } from 'components/select';\r\n\r\n\r\nconst hasSession = (entry: API.HistoryItem) => {\r\n return PrivateChatSessionStore.getSession(entry.user!.cid);\r\n};\r\n\r\nclass MessageNew extends Component<NewSessionLayoutProps> {\r\n handleSubmit = (user: API.HintedUser) => {\r\n PrivateChatActions.createSession(this.props.location, user, PrivateChatSessionStore);\r\n }\r\n\r\n recentUserRender = (entry: API.HistoryItem) => {\r\n return (\r\n <a onClick={ _ => this.handleSubmit(entry.user!) }>\r\n { entry.user!.nicks }\r\n </a> \r\n );\r\n }\r\n\r\n render() {\r\n const { sessionT } = this.props;\r\n return (\r\n <div className=\"private chat session new\"> \r\n <UserSelectField \r\n onChange={ this.handleSubmit } \r\n offlineMessage={ sessionT.t<string>(\r\n 'offlineMessage',\r\n 'You must to be connected to at least one hub in order to send private messages'\r\n ) }\r\n isClearable={ false }\r\n autoFocus={ true }\r\n />\r\n <RecentLayout\r\n entryType={ HistoryEntryEnum.PRIVATE_CHAT }\r\n hasSession={ hasSession }\r\n entryTitleRenderer={ this.recentUserRender }\r\n entryIcon={ IconConstants.MESSAGES_PLAIN }\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default MessageNew;\r\n","import * as React from 'react';\r\n\r\nimport PrivateChatActions from 'actions/ui/PrivateChatActions';\r\n\r\nimport { SessionFooter } from 'routes/Sidebar/components/SessionFooter';\r\nimport Loader from 'components/semantic/Loader';\r\nimport { ActionMenu } from 'components/menu';\r\nimport EncryptionState from 'components/EncryptionState';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\nconst getCaption = (state: API.CCPMStateEnum, sessionT: UI.ModuleTranslator) => {\r\n const { translate } = sessionT;\r\n switch (state) {\r\n case API.CCPMStateEnum.CONNECTED: return translate('Direct encrypted channel established');\r\n case API.CCPMStateEnum.CONNECTING: return (\r\n <Loader \r\n size=\"mini\" \r\n inline={ true } \r\n text={ translate('Establishing connection...') }\r\n />\r\n );\r\n case API.CCPMStateEnum.DISCONNECTED: return translate('Direct encrypted channel available');\r\n default: return null;\r\n }\r\n};\r\n\r\n\r\ninterface CCPMStateProps {\r\n session: API.PrivateChat;\r\n sessionT: UI.ModuleTranslator;\r\n}\r\n\r\nconst CCPMState: React.FC<CCPMStateProps> = ({ session, sessionT }) => {\r\n const { flags } = session.user;\r\n if (flags.indexOf('ccpm') === -1) {\r\n return null;\r\n }\r\n\r\n const state = session.ccpm_state.id;\r\n if (state === API.CCPMStateEnum.DISCONNECTED && flags.indexOf('offline') !== -1) {\r\n return null;\r\n }\r\n\r\n return (\r\n <SessionFooter>\r\n <div className=\"ccpm-state\">\r\n <EncryptionState \r\n encryption={ session.ccpm_state.encryption } \r\n alwaysVisible={ true }\r\n boundary=\".session-container\"\r\n />\r\n <ActionMenu\r\n caption={ getCaption(state, sessionT) }\r\n actions={ PrivateChatActions }\r\n ids={[ 'disconnectCCPM', 'connectCCPM' ]}\r\n itemData={ session }\r\n />\r\n </div>\r\n </SessionFooter>\r\n );\r\n};\r\n\r\nexport default CCPMState;","//@ts-ignore\r\nimport Reflux from 'reflux';\r\nimport invariant from 'invariant';\r\n\r\nimport PrivateChatConstants from 'constants/PrivateChatConstants';\r\nimport PrivateChatActions from 'actions/reflux/PrivateChatActions';\r\n\r\nimport MessageStoreDecorator from './decorators/MessageStoreDecorator';\r\n\r\nimport AccessConstants from 'constants/AccessConstants';\r\nimport { AddSocketListener } from 'decorators/SocketSubscriptionDecorator';\r\nimport { SessionScrollPositionKeeper } from './helpers/SessionScrollPositionKeeper';\r\n\r\n\r\nconst PrivateChatMessageStore = Reflux.createStore({\r\n scroll: SessionScrollPositionKeeper(),\r\n\r\n onSocketConnected(addSocketListener: AddSocketListener) {\r\n invariant(!this.hasMessages(), 'No existing private messages should exist on socket connect');\r\n invariant(!this.hasInitializedSessions(), 'No initialized private message sessions should exist on socket connect');\r\n\r\n const url = PrivateChatConstants.MODULE_URL;\r\n addSocketListener(url, PrivateChatConstants.MESSAGE, this._onChatMessage);\r\n addSocketListener(url, PrivateChatConstants.STATUS, this._onStatusMessage);\r\n\r\n addSocketListener(url, PrivateChatConstants.SESSION_REMOVED, this._onSessionRemoved);\r\n addSocketListener(url, PrivateChatConstants.SESSION_UPDATED, this._onSessionUpdated);\r\n },\r\n});\r\n\r\nexport default MessageStoreDecorator(PrivateChatMessageStore, PrivateChatActions, AccessConstants.PRIVATE_CHAT_VIEW)\r\n;\r\n","import { Component } from 'react';\r\n\r\nimport ChatLayout, { ChatAPI, ChatActionList } from 'routes/Sidebar/components/chat/ChatLayout';\r\nimport MessageFooter from 'routes/Sidebar/routes/Messages/components/MessageFooter';\r\n\r\nimport PrivateChatMessageStore from 'stores/PrivateChatMessageStore';\r\n\r\nimport * as API from 'types/api';\r\n//import * as UI from 'types/ui';\r\n\r\nimport { SessionChildProps } from 'routes/Sidebar/components/SessionLayout';\r\nimport { shareTempFile } from 'services/api/ShareApi';\r\nimport PrivateChatActions from 'actions/reflux/PrivateChatActions';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\ninterface PrivateChatSessionProps extends SessionChildProps<API.PrivateChat, {}, ChatActionList> {\r\n\r\n}\r\n\r\nclass PrivateChatSession extends Component<PrivateChatSessionProps> {\r\n static displayName = 'PrivateChatSession';\r\n\r\n handleFileUpload = (file: File) => {\r\n const { cid, hub_url, flags } = this.props.session.user;\r\n\r\n const isPrivate = flags.indexOf('nmdc') === -1 && flags.indexOf('bot') === -1;\r\n return shareTempFile(file, hub_url, isPrivate ? cid : undefined);\r\n }\r\n\r\n render() {\r\n const { session, sessionApi, sessionT, uiActions } = this.props;\r\n return (\r\n <div className=\"private chat session\">\r\n <ChatLayout\r\n chatAccess={ API.AccessEnum.PRIVATE_CHAT_SEND }\r\n chatActions={ uiActions }\r\n chatApi={ PrivateChatActions as ChatAPI }\r\n sessionApi={ sessionApi }\r\n messageStore={ PrivateChatMessageStore }\r\n session={ session }\r\n handleFileUpload={ this.handleFileUpload }\r\n highlightRemoteMenuId={ MenuConstants.PRIVATE_CHAT_MESSAGE_HIGHLIGHT }\r\n />\r\n\r\n <MessageFooter\r\n session={ session }\r\n sessionT={ sessionT }\r\n />\r\n </div>\r\n );\r\n }\r\n}\r\n\r\nexport default PrivateChatSession;\r\n","\n import API from \"!../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import * as React from 'react';\r\n\r\nimport SessionLayout from 'routes/Sidebar/components/SessionLayout';\r\nimport UserItemHandlerDecorator from 'routes/Sidebar/decorators/UserItemHandlerDecorator';\r\n\r\nimport PrivateChatSessionStore from 'stores/PrivateChatSessionStore';\r\nimport PrivateChatUIActions from 'actions/ui/PrivateChatActions';\r\nimport PrivateChatAPIActions from 'actions/reflux/PrivateChatActions';\r\n\r\nimport MessageNew from 'routes/Sidebar/routes/Messages/components/MessageNew';\r\nimport PrivateChatSession from 'routes/Sidebar/routes/Messages/components/PrivateChatSession';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport '../style.css';\r\nimport { \r\n SessionProviderDecoratorChildProps, SessionProviderDecorator\r\n} from 'routes/Sidebar/decorators/SessionProviderDecorator';\r\nimport { toI18nKey } from 'utils/TranslationUtils';\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\n\r\nconst sessionActions = [ 'clear' ];\r\n\r\nconst Messages: React.FC<SessionProviderDecoratorChildProps<API.PrivateChat>> = props => {\r\n const { match, t, ...other } = props;\r\n return (\r\n <SessionLayout \r\n activeId={ match.params.id }\r\n baseUrl=\"messages\"\r\n newCaption={ t(toI18nKey('new', UI.Modules.MESSAGES), 'New session') }\r\n newDescription={ t(toI18nKey('newDesc', UI.Modules.MESSAGES), 'Open a new private chat session') } \r\n newIcon={ IconConstants.MESSAGES_PLAIN }\r\n unreadInfoStore={ PrivateChatSessionStore }\r\n editAccess={ API.AccessEnum.PRIVATE_CHAT_EDIT }\r\n uiActions={ PrivateChatUIActions }\r\n sessionApi={ PrivateChatAPIActions as UI.SessionActions<API.PrivateChat> }\r\n actionIds={ sessionActions }\r\n sessionItemLayout={ PrivateChatSession }\r\n newLayout={ MessageNew }\r\n t={ t }\r\n { ...UserItemHandlerDecorator([ 'browse', 'ignore', 'unignore' ]) }\r\n { ...other }\r\n />\r\n );\r\n};\r\n\r\nexport default SessionProviderDecorator(Messages, PrivateChatSessionStore);\r\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","itemMenuIds","itemNameGetter","session","user","nicks","itemStatusGetter","flags","itemHeaderDescriptionGetter","hub_names","itemHeaderIconGetter","itemHeaderTitleGetter","location","actionMenu","ids","remoteMenuId","PrivateChatActions","connectCCPM","displayName","access","icon","IconConstants","handler","data","SocketService","PrivateChatConstants","filter","ccpm_state","disconnectCCPM","PrivateChatActionsDecorated","SessionActionDecorator","ChatActionDecorator","moduleId","actions","hasSession","entry","PrivateChatSessionStore","cid","MessageNew","Component","handleSubmit","this","props","recentUserRender","onClick","_","render","sessionT","className","onChange","offlineMessage","t","isClearable","autoFocus","RecentLayout","entryType","entryTitleRenderer","entryIcon","getCaption","state","translate","Loader","size","inline","text","indexOf","SessionFooter","EncryptionState","encryption","alwaysVisible","boundary","caption","itemData","PrivateChatMessageStore","scroll","SessionScrollPositionKeeper","onSocketConnected","addSocketListener","hasMessages","hasInitializedSessions","url","_onChatMessage","_onStatusMessage","_onSessionRemoved","_onSessionUpdated","MessageStoreDecorator","AccessConstants","PrivateChatSession","handleFileUpload","file","hub_url","isPrivate","undefined","sessionApi","uiActions","ChatLayout","chatAccess","chatActions","chatApi","messageStore","highlightRemoteMenuId","MenuConstants","MessageFooter","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","sessionActions","SessionProviderDecorator","match","other","SessionLayout","activeId","params","baseUrl","newCaption","newDescription","newIcon","unreadInfoStore","editAccess","actionIds","sessionItemLayout","newLayout","UserItemHandlerDecorator"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
1
  "use strict";(self.webpackChunkairdcpp_webui=self.webpackChunkairdcpp_webui||[]).push([[618],{24751:(e,s,i)=>{i.d(s,{Z:()=>d});var t=i(87537),o=i.n(t),n=i(23645),r=i.n(n)()(o());r.push([e.id,".status .error {\r\n color: red;\r\n}\r\n\r\n@media only screen and (min-width: 767px) {\r\n .source.modal td {\r\n max-width: 250px;\r\n }\r\n\r\n /* Can't be applied to dropdown cells */\r\n .source.modal td:not(.user) {\r\n overflow-x: hidden;\r\n }\r\n}\r\n","",{version:3,sources:["webpack://./src/routes/Queue/style.css"],names:[],mappings:"AAAA;EACE,UAAU;AACZ;;AAEA;EACE;IACE,gBAAgB;EAClB;;EAEA,uCAAuC;EACvC;IACE,kBAAkB;EACpB;AACF",sourcesContent:[".status .error {\r\n color: red;\r\n}\r\n\r\n@media only screen and (min-width: 767px) {\r\n .source.modal td {\r\n max-width: 250px;\r\n }\r\n\r\n /* Can't be applied to dropdown cells */\r\n .source.modal td:not(.user) {\r\n overflow-x: hidden;\r\n }\r\n}\r\n"],sourceRoot:""}]);const d=r},80218:(e,s,i)=>{i.d(s,{Z:()=>l});var t=i(1087),o=i(518),n=i(48117),r=i(76249),d=i(32347);const a=e=>o.Z.post(t.Z.BUNDLES_URL+"/priority",{priority:e}),c={removeCompleted:{access:r.PS.QUEUE_EDIT,displayName:"Remove completed bundles",icon:n.Z.REMOVE,handler:()=>o.Z.post(t.Z.BUNDLES_URL+"/remove_completed"),notifications:{onSuccess:"{{result.count}} completed bundles were removed"}},divider:null,pause:{displayName:"Pause all bundles",access:r.PS.QUEUE_EDIT,icon:n.Z.PAUSE,handler:()=>a(r.gg.PAUSED_FORCED)},resume:{displayName:"Resume all bundles",access:r.PS.QUEUE_EDIT,icon:n.Z.PLAY,handler:()=>a(r.gg.DEFAULT)}},l={moduleId:d.jv.QUEUE,actions:c}},49133:(e,s,i)=>{i.d(s,{Z:()=>l});var t=i(1087),o=i(518),n=i(48117),r=i(76249),d=i(32347),a=i(60160);const c={search:{access:r.PS.SEARCH,displayName:"Search (foreground)",icon:n.Z.SEARCH,handler:({data:e,location:s})=>a.Z.search(e,s)},searchFileAlternates:{access:r.PS.QUEUE_EDIT,displayName:"Search for alternates",icon:n.Z.SEARCH_ALTERNATES,filter:e=>0===e.time_finished,handler:({data:e})=>o.Z.post(`${t.Z.FILES_URL}/${e.id}/search`),notifications:{onSuccess:"File {{item.name}} was searched for alternates"}},removeFile:{displayName:"Remove",access:r.PS.QUEUE_EDIT,icon:n.Z.REMOVE,confirmation:{content:"Are you sure that you want to remove the file {{item.name}}?",approveCaption:"Remove file",rejectCaption:"Don't remove",checkboxCaption:"Remove on disk"},handler:({data:e},s)=>o.Z.post(`${t.Z.FILES_URL}/${e.id}/remove`,{remove_finished:s}),notifications:{onSuccess:"File {{item.name}} was removed from queue"}}},l={moduleId:d.jv.QUEUE,actions:c}},43231:(e,s,i)=>{i.d(s,{Z:()=>c});var t=i(85893),o=i(45697),n=i.n(o),r=(i(67294),i(94184)),d=i.n(r);const a=({className:e,percent:s,caption:i})=>(0,t.jsxs)("div",Object.assign({className:d()("ui progress",e,{indeterminate:void 0===s}),"data-percent":s},{children:[(0,t.jsx)("div",Object.assign({className:"bar",style:{transitionDuration:"300ms",width:void 0===s?void 0:s+"%",minWidth:"0px"}},{children:(0,t.jsx)("div",{className:"progress"},void 0)}),void 0),!!i&&(0,t.jsx)("div",Object.assign({className:"label"},{children:i}),void 0)]}),void 0);a.propTypes={percent:n().number.isRequired,caption:n().node.isRequired,className:n().string};const c=a},81821:(e,s,i)=>{i.r(s),i.d(s,{default:()=>_e});var t=i(85893),o=i(67294),n=i(35108),r=i(80218),d=i(1087),a=i(518),c=i(20097),l=i(48117),u=i(76249),m=i(32347),h=i(60160);const p=e=>e.status.id===d.s.COMPLETION_VALIDATION_ERROR,v=e=>0===e.time_finished,E=(e,s)=>a.Z.post(`${d.Z.BUNDLES_URL}/${e.id}/share`,{skip_validation:s}),j={sources:{displayName:"Manage sources...",icon:l.Z.USER,filter:e=>e.sources.total>0&&v(e),handler:({data:e,location:s})=>{c.Z.push(`${s.pathname}/sources/${e.id}`)}},content:{displayName:"Manage files...",icon:l.Z.FILE,filter:e=>"directory"===e.type.id,handler:({data:e,location:s})=>{c.Z.push(`${s.pathname}/content/${e.id}`)}},divider:null,search:{access:u.PS.SEARCH,displayName:"Search (foreground)",icon:l.Z.SEARCH,handler:({data:e,location:s})=>h.Z.search(e,s)},searchBundleAlternates:{access:u.PS.QUEUE_EDIT,displayName:"Search for alternates",icon:l.Z.SEARCH_ALTERNATES,filter:v,handler:({data:e})=>a.Z.post(`${d.Z.BUNDLES_URL}/${e.id}/search`),notifications:{onSuccess:"The bundle {{item.name}} was searched for alternates"}},divider2:null,removeBundle:{displayName:"Remove",access:u.PS.QUEUE_EDIT,icon:l.Z.REMOVE,confirmation:{content:"Are you sure that you want to remove the bundle {{item.name}}?",approveCaption:"Remove bundle",rejectCaption:"Don't remove",checkboxCaption:"Remove finished files"},handler:({data:e},s)=>a.Z.post(`${d.Z.BUNDLES_URL}/${e.id}/remove`,{remove_finished:s})},divider3:null,rescan:{displayName:"Rescan for errors",access:u.PS.QUEUE_EDIT,icon:l.Z.REFRESH_COLORED,filter:p,handler:({data:e})=>E(e,!1)},forceShare:{displayName:"Force in share",access:u.PS.QUEUE_EDIT,icon:l.Z.ERROR,filter:p,handler:({data:e})=>E(e,!0)}},x={moduleId:m.jv.QUEUE,actions:j};var U=i(78230),y=i(45697),b=i.n(y),g=i(18446),Z=i.n(g);const C={[u.gg.PAUSED_FORCED]:{str:"Paused (forced)",id:0},[u.gg.PAUSED]:{str:"Paused",id:1},[u.gg.LOWEST]:{str:"Lowest",id:2},[u.gg.LOW]:{str:"Low",id:3},[u.gg.NORMAL]:{str:"Normal",id:4},[u.gg.HIGH]:{str:"High",id:5},[u.gg.HIGHEST]:{str:"Highest",id:6}};var f=i(9453),S=i(98374),A=i(94184),w=i.n(A),N=i(49694);const R=({caption:e,className:s})=>{const i=w()("ui empty dropdown",s);return(0,t.jsx)("div",Object.assign({className:i},{children:(0,t.jsx)(N.Z,{children:e},void 0)}),void 0)};var _=i(66883),D=i(8717),L=i(89519);class I extends o.Component{constructor(){super(...arguments),this.setPriority=e=>{const{item:s,prioAction:i,t}=this.props;return(0,L.h9)((()=>i(s,e)),t)},this.setAutoPriority=()=>{this.setPriority(u.gg.DEFAULT)},this.getPriorityListItem=(e,s,i)=>{const o=this.props.item.priority.id;return(0,t.jsx)(S.Z,Object.assign({active:o===e.id,onClick:()=>{this.setPriority(e.id),i()}},{children:(0,D.Iu)(e.str,s,m.jv.QUEUE)}),e.id)},this.getChildren=e=>{const{t:s}=this.props;let i=Object.keys(C).map((i=>this.getPriorityListItem(C[i],s,e)));return i.push((0,t.jsx)("div",{className:"ui divider"},"divider")),i.push((0,t.jsx)(S.Z,Object.assign({active:this.props.itemPrio.auto,onClick:()=>{this.setPriority(u.gg.DEFAULT),e()}},{children:(0,D.Iu)("Auto",s,m.jv.QUEUE)}),"auto")),i}}shouldComponentUpdate(e){return!Z()(e.item.priority,this.props.item.priority)}render(){const{itemPrio:e,t:s}=this.props;let i=(0,D.Iu)(C[e.id].str,s,m.jv.QUEUE);return e.auto&&(i+=` (${(0,D.Iu)("Auto",s,m.jv.QUEUE).toLocaleLowerCase()})`),_.Z.hasAccess(u.PS.QUEUE_EDIT)?(0,t.jsx)(f.Z,Object.assign({caption:i,className:"priority-menu"},{children:this.getChildren}),void 0):(0,t.jsx)(R,{caption:i},void 0)}}I.propTypes={itemPrio:b().object.isRequired,item:b().object.isRequired,prioAction:b().func.isRequired};const O=I;var P=i(43231);const T=(e,s)=>{if(e.completed)return"success";const i=e.id;return w()({grey:(!i||i===u.gT.QUEUED)&&0===s.speed},{blue:(!i||i===u.gT.QUEUED)&&s.speed>0})},Q=({cellData:e,rowDataGetter:s})=>{if(e.failed)return(0,t.jsx)("span",Object.assign({className:"error"},{children:e.str}),void 0);const i=s();return(0,t.jsx)(P.Z,{className:T(e,i),caption:e.str,percent:100*i.downloaded_bytes/i.size},void 0)};var B=i(10293),$=i.n(B),q=i(93836);const F=$().createStore({_viewName:"queue_bundle_view",_apiUrl:d.Z.MODULE_URL,mixins:[(0,q.Z)("name")]});var H=i(28427),K=i(92245),k=i(20368),G=i(49133);const M=$().createStore({_viewName:"queue_file_view",_apiUrl:d.Z.MODULE_URL,mixins:[(0,q.Z)("name")]});var V=i(68126),z=i(93379),W=i.n(z),Y=i(7795),X=i.n(Y),J=i(90569),ee=i.n(J),se=i(3565),ie=i.n(se),te=i(19216),oe=i.n(te),ne=i(44589),re=i.n(ne),de=i(24751),ae={};ae.styleTagTransform=re(),ae.setAttributes=ie(),ae.insert=ee().bind(null,"head"),ae.domAPI=X(),ae.insertStyleElement=oe(),W()(de.Z,ae),de.Z&&de.Z.locals&&de.Z.locals;var ce=i(19072),le=i(4333);const ue=({cellData:e,rowDataGetter:s,t:i})=>(0,t.jsx)(O,{itemPrio:e,item:s(),prioAction:ce.YU,t:i},void 0);class me extends o.Component{constructor(){super(...arguments),this.isActive=(e,s)=>!s.status.downloaded,this.isRunning=(e,s)=>s.speed>0}render(){return(0,t.jsxs)(U.Z,Object.assign({store:M,sourceFilter:{pattern:this.props.bundle.id,method:u.V3.EXACT,property:"bundle"},moduleId:G.Z.moduleId},{children:[(0,t.jsx)(n.Column,{name:"Name",width:200,flexGrow:20,columnKey:"name",cell:(0,t.jsx)(V.Nq,{actions:G.Z,remoteMenuId:le.Z.QUEUE_FILE},void 0)},void 0),(0,t.jsx)(n.Column,{name:"Size",width:70,columnKey:"size",cell:(0,t.jsx)(V.Eh,{},void 0),flexGrow:1},void 0),(0,t.jsx)(n.Column,{name:"Status",width:120,columnKey:"status",cell:(0,t.jsx)(Q,{},void 0)},void 0),(0,t.jsx)(n.Column,{name:"Sources",width:65,columnKey:"sources",renderCondition:this.isActive},void 0),(0,t.jsx)(n.Column,{name:"Time left",width:50,columnKey:"seconds_left",renderCondition:this.isRunning,cell:(0,t.jsx)(V.VL,{},void 0)},void 0),(0,t.jsx)(n.Column,{name:"Speed",width:55,columnKey:"speed",cell:(0,t.jsx)(V.LV,{},void 0),renderCondition:this.isRunning},void 0),(0,t.jsx)(n.Column,{name:"Priority",width:80,columnKey:"priority",renderCondition:this.isActive,cell:(0,t.jsx)(ue,{},void 0),flexGrow:1},void 0)]}),void 0)}}const he=me;var pe=i(42090);class ve extends o.Component{render(){const e=this.props,{bundle:s}=e,i=function(e,s){var i={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&s.indexOf(t)<0&&(i[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)s.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(i[t[o]]=e[t[o]])}return i}(e,["bundle"]);return(0,t.jsx)(H.Z,Object.assign({className:"source",title:s.name,subHeader:s.target,closable:!0,icon:(0,t.jsx)(k.Z,{typeInfo:s.type},void 0),fullHeight:!0},i,{children:(0,t.jsx)(he,{bundle:s},void 0)}),void 0)}}ve.displayName="BundleFileDialog";const Ee=(0,K.ZP)((0,pe.Z)(ve,{urls:{bundle:({match:e},s)=>s.get(`${d.Z.BUNDLES_URL}/${e.params.bundleId}`)}}),"content/:bundleId"),je={removeBundleSource:{access:u.PS.QUEUE_EDIT,displayName:"Remove source",icon:l.Z.REMOVE,handler:({data:e})=>{const{source:s,bundle:i}=e;return a.Z.delete(`${d.Z.BUNDLES_URL}/${i.id}/sources/${s.user.cid}`)}}},xe={moduleId:m.jv.QUEUE,subId:"bundleSource",actions:je};var Ue=i(2445),ye=i(47021),be=i(90195);const ge=({source:e,bundle:s,t:i})=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",Object.assign({className:"user dropdown"},{children:(0,t.jsx)(ye.Ie,Object.assign({userIcon:!0,user:e.user,ids:be.D,contextElement:".source.modal",remoteMenuId:le.Z.HINTED_USER},{children:(0,t.jsx)(ye.PC,{actions:xe,itemData:{source:e,bundle:s}},void 0)}),void 0)}),void 0),(0,t.jsx)("td",Object.assign({className:"hubs"},{children:e.user.hub_names}),void 0),(0,t.jsx)("td",Object.assign({className:"speed"},{children:e.last_speed>0&&(0,Ue.CY)(e.last_speed,i)}),void 0),(0,t.jsx)("td",Object.assign({className:"files"},{children:e.files}),void 0),(0,t.jsx)("td",Object.assign({className:"size"},{children:(0,Ue.BU)(e.size,i)}),void 0)]},void 0),Ze=(e,s)=>e.user.nicks.localeCompare(s.user.nicks),Ce=(0,pe.Z)((({sources:e,bundle:s,queueT:i})=>{const{translate:o}=i;return(0,t.jsxs)("div",Object.assign({className:"sources"},{children:[(0,t.jsx)("h2",{children:o("Sources")},void 0),(0,t.jsxs)("table",Object.assign({className:"ui striped table"},{children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:o("User")},void 0),(0,t.jsx)("th",{children:o("Hubs")},void 0),(0,t.jsx)("th",{children:o("Last known speed")},void 0),(0,t.jsx)("th",{children:o("Files")},void 0),(0,t.jsx)("th",{children:o("Size")},void 0)]},void 0)},void 0),(0,t.jsx)("tbody",{children:e.sort(Ze).map((e=>(0,t.jsx)(ge,{source:e,bundle:s,t:i.plainT},e.user.cid)))},void 0)]}),void 0)]}),void 0)}),{urls:{sources:({bundle:e},s)=>s.get(`${d.Z.BUNDLES_URL}/${e.id}/sources`)},onSocketConnected:(e,{refetchData:s,props:i})=>{e(d.Z.MODULE_URL,d.Z.BUNDLE_SOURCES,(e=>{e.id===i.bundle.id&&s()}))}});class fe extends o.Component{render(){const{bundle:e,queueT:s}=this.props;return(0,t.jsx)(H.Z,Object.assign({className:"source",title:e.name,subHeader:e.target,closable:!0,icon:(0,t.jsx)(k.Z,{typeInfo:e.type},void 0),fullHeight:!0},this.props,{children:(0,t.jsx)(Ce,{bundle:e,queueT:s},void 0)}),void 0)}}fe.displayName="SourceDialog";const Se=(0,K.ZP)((0,pe.Z)(fe,{urls:{bundle:({match:e},s)=>s.get(`${d.Z.BUNDLES_URL}/${e.params.bundleId}`)}}),"sources/:bundleId");var Ae=i(27695),we=i(91768);const Ne=({cellData:e,rowDataGetter:s,t:i})=>(0,t.jsx)(O,{itemPrio:e,item:s(),prioAction:ce.aR,t:i},void 0);class Re extends o.Component{constructor(){super(...arguments),this.isActive=(e,s)=>!s.status.downloaded,this.isDownloaded=(e,s)=>s.status.downloaded,this.isRunning=(e,s)=>s.speed>0,this.emptyRowsNodeGetter=()=>{const{t:e}=this.queueT;return(0,t.jsx)(Ae.Z,{title:e("queueEmpty","The queue is empty"),icon:l.Z.FILE,description:e("queueEmptyDesc","New items can be queued from search or filelists")},void 0)},this.queueT=(0,D.HY)(this.props.t,m.jv.QUEUE)}render(){const{translate:e}=this.queueT;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(U.Z,Object.assign({emptyRowsNodeGetter:this.emptyRowsNodeGetter,store:F,footerData:(0,t.jsx)(ye.PC,{className:"top left pointing",caption:e("Actions..."),actions:r.Z,header:e("Queue actions"),triggerIcon:"chevron up",button:!0},void 0),moduleId:r.Z.moduleId},{children:[(0,t.jsx)(n.Column,{name:"Name",width:200,flexGrow:4,columnKey:"name",cell:(0,t.jsx)(V.Nq,{actions:x,remoteMenuId:le.Z.QUEUE_BUNDLE,ids:["content","sources","divider","search","searchBundleAlternates","divider","removeBundle","divider","rescan","forceShare"]},void 0)},void 0),(0,t.jsx)(n.Column,{name:"Size",width:60,columnKey:"size",cell:(0,t.jsx)(V.Eh,{},void 0),flexGrow:1},void 0),(0,t.jsx)(n.Column,{name:"Type/content",width:150,columnKey:"type",hideWidth:1e3,cell:(0,t.jsx)(V.DS,{actions:x,actionId:"content"},void 0)},void 0),(0,t.jsx)(n.Column,{name:"Status",width:120,flexGrow:3,columnKey:"status",cell:(0,t.jsx)(Q,{},void 0)},void 0),(0,t.jsx)(n.Column,{name:"Sources",width:60,columnKey:"sources",renderCondition:this.isActive,flexGrow:1,cell:(0,t.jsx)(V.DS,{actions:x,actionId:"sources"},void 0)},void 0),(0,t.jsx)(n.Column,{name:"Time left",width:50,columnKey:"seconds_left",renderCondition:this.isRunning,cell:(0,t.jsx)(V.VL,{},void 0)},void 0),(0,t.jsx)(n.Column,{name:"Speed",width:50,columnKey:"speed",cell:(0,t.jsx)(V.LV,{},void 0),renderCondition:this.isRunning,flexGrow:1},void 0),(0,t.jsx)(n.Column,{name:"Priority",width:80,columnKey:"priority",renderCondition:this.isActive,cell:(0,t.jsx)(Ne,{},void 0),flexGrow:1},void 0),(0,t.jsx)(n.Column,{name:"Added",width:100,columnKey:"time_added",cell:(0,t.jsx)(V.Ks,{},void 0),hideWidth:1400},void 0),(0,t.jsx)(n.Column,{name:"Finished",width:100,columnKey:"time_finished",cell:(0,t.jsx)(V.Ks,{},void 0),renderCondition:this.isDownloaded,hideWidth:1200},void 0)]}),void 0),(0,t.jsx)(Se,{queueT:this.queueT},void 0),(0,t.jsx)(Ee,{},void 0)]},void 0)}}Re.displayName="Queue";const _e=(0,we.Z)()(Re)}}]);
2
- //# sourceMappingURL=queue.e52e481f79bce96a17e1.chunk.js.map
2
+ //# sourceMappingURL=queue.2fcf7a1381f1fb4af03f.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"js/queue.e52e481f79bce96a17e1.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,oRAAqR,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,0CAA0C,MAAQ,GAAG,SAAW,6FAA6F,eAAiB,CAAC,qRAAqR,WAAa,MAE1yB,W,yFCEA,MAAMC,EAAuBC,GACpB,SAAmB,gBAA6B,YAAa,CAClEC,SAAUD,IAiBRE,EAAwC,CAC5CC,gBAAiB,CACfC,OAAQ,gBACRC,YAAa,2BACbC,KAAM,WACNC,QAV0B,IACrB,SAAmB,gBAA6B,qBAUrDC,cAAe,CACbC,UAAW,oDAGfC,QAAS,KACTC,MAAO,CACLN,YAAa,oBACbD,OAAQ,gBACRE,KAAM,UACNC,QA5BgB,IACXR,EAAoB,qBA6B3Ba,OAAQ,CACNP,YAAa,qBACbD,OAAQ,gBACRE,KAAM,SACNC,QA9BiB,IACZR,EAAoB,gBAiC7B,GACEc,SAAU,WACVC,QAASZ,I,oGC7CX,MAsBMa,EAAqD,CACzDC,OAAQ,CACNZ,OAAQ,YACRC,YAAa,sBACbC,KAAM,WACNC,QAxBkD,EAAGU,KAAMC,EAAUC,SAAAA,KAChE,WAAqBD,EAAUC,IAyBtCC,qBAAsB,CACpBh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,EAAAJ,OAAM,CACLC,KAAK,QACL5F,MAAO,GACP8F,UAAU,QACVC,MAAO,SAAC,KAAS,WACjBG,gBAAkB/D,KAAKgD,UACvBU,SAAU,QAAC,IAEb,SAAC,EAAAF,OAAM,CACLC,KAAK,WACL5F,MAAO,GACP8F,UAAU,WACVI,gBAAkB/D,KAAK8C,SACvBc,MAAO,SAAC,GAAY,WACpBF,SAAU,QAAC,IAEb,SAAC,EAAAF,OAAM,CACLC,KAAK,QACL5F,MAAO,IACP8F,UAAU,aACVC,MAAO,SAAC,KAAY,WACpB4D,UAAW,WAAI,IAEjB,SAAC,EAAAhE,OAAM,CACLC,KAAK,WACL5F,MAAO,IACP8F,UAAU,gBACVC,MAAO,SAAC,KAAY,WACpBG,gBAAkB/D,KAAK+G,aACvBS,UAAW,WAAI,WACf,IAEJ,SAAC,GAAY,CAAClB,OAAStG,KAAKsG,aAAM,IAClC,SAAC,GAAgB,kBAAE,IApJlB,GAAA5K,YAAc,QA0JvB,UAAe,EAAAgM,GAAA,IAAf,CAAiCZ","sources":["webpack://airdcpp-webui/./src/routes/Queue/style.css","webpack://airdcpp-webui/./src/actions/ui/QueueActions.ts","webpack://airdcpp-webui/./src/actions/ui/QueueFileActions.ts","webpack://airdcpp-webui/./src/components/semantic/Progress.tsx","webpack://airdcpp-webui/./src/actions/ui/QueueBundleActions.ts","webpack://airdcpp-webui/./src/constants/PriorityConstants.ts","webpack://airdcpp-webui/./src/components/semantic/EmptyDropdown.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/PriorityMenu.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/StatusCell.tsx","webpack://airdcpp-webui/./src/stores/QueueBundleViewStore.js","webpack://airdcpp-webui/./src/stores/QueueFileViewStore.js","webpack://airdcpp-webui/./src/routes/Queue/style.css?62bc","webpack://airdcpp-webui/./src/routes/Queue/components/BundleFileTable.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/BundleFileDialog.tsx","webpack://airdcpp-webui/./src/actions/ui/QueueBundleSourceActions.ts","webpack://airdcpp-webui/./src/routes/Queue/components/BundleSourceTable.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/BundleSourceDialog.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/Queue.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".status .error {\\r\\n color: red;\\r\\n}\\r\\n\\r\\n@media only screen and (min-width: 767px) {\\r\\n .source.modal td {\\r\\n max-width: 250px;\\r\\n }\\r\\n\\r\\n /* Can't be applied to dropdown cells */\\r\\n .source.modal td:not(.user) {\\r\\n overflow-x: hidden;\\r\\n }\\r\\n}\\r\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/routes/Queue/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,UAAU;AACZ;;AAEA;EACE;IACE,gBAAgB;EAClB;;EAEA,uCAAuC;EACvC;IACE,kBAAkB;EACpB;AACF\",\"sourcesContent\":[\".status .error {\\r\\n color: red;\\r\\n}\\r\\n\\r\\n@media only screen and (min-width: 767px) {\\r\\n .source.modal td {\\r\\n max-width: 250px;\\r\\n }\\r\\n\\r\\n /* Can't be applied to dropdown cells */\\r\\n .source.modal td:not(.user) {\\r\\n overflow-x: hidden;\\r\\n }\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import QueueConstants from 'constants/QueueConstants';\r\nimport SocketService from 'services/SocketService';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\nconst setBundlePriorities = (prio: API.QueuePriorityEnum) => {\r\n return SocketService.post(QueueConstants.BUNDLES_URL + '/priority', { \r\n priority: prio \r\n });\r\n};\r\n\r\nconst handlePause = () => {\r\n return setBundlePriorities(API.QueuePriorityEnum.PAUSED_FORCED);\r\n};\r\n\r\nconst handleResume = () => {\r\n return setBundlePriorities(API.QueuePriorityEnum.DEFAULT);\r\n};\r\n\r\nconst handleRemoveCompleted = () => {\r\n return SocketService.post(QueueConstants.BUNDLES_URL + '/remove_completed');\r\n};\r\n\r\n\r\nconst QueueActions: UI.ActionListType<null> = {\r\n removeCompleted: {\r\n access: API.AccessEnum.QUEUE_EDIT, \r\n displayName: 'Remove completed bundles', \r\n icon: IconConstants.REMOVE,\r\n handler: handleRemoveCompleted,\r\n notifications: {\r\n onSuccess: '{{result.count}} completed bundles were removed'\r\n }\r\n },\r\n divider: null,\r\n pause: {\r\n displayName: 'Pause all bundles',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.PAUSE,\r\n handler: handlePause,\r\n },\r\n resume: { \r\n displayName: 'Resume all bundles',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.PLAY,\r\n handler: handleResume,\r\n }\r\n};\r\n\r\nexport default {\r\n moduleId: UI.Modules.QUEUE,\r\n actions: QueueActions,\r\n};\r\n\r\n","import QueueConstants from 'constants/QueueConstants';\r\nimport SocketService from 'services/SocketService';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport SearchActions from 'actions/reflux/SearchActions';\r\n\r\n\r\nconst itemNotFinished = (item: API.QueueFile) => item.time_finished === 0;\r\n\r\n\r\nconst handleSearch: UI.ActionHandler<API.QueueFile> = ({ data: itemInfo, location }) => {\r\n return SearchActions.search(itemInfo, location);\r\n};\r\n\r\nconst handleRemoveFile: UI.ActionHandler<API.QueueFile> = (\r\n { data: file },\r\n removeFinished: boolean\r\n) => {\r\n return SocketService.post(`${QueueConstants.FILES_URL}/${file.id}/remove`, {\r\n remove_finished: removeFinished,\r\n });\r\n};\r\n\r\nconst handleSearchFileAlternates: UI.ActionHandler<API.QueueFile> = ({ data: file }) => {\r\n return SocketService.post(`${QueueConstants.FILES_URL}/${file.id}/search`);\r\n};\r\n\r\n\r\n\r\nconst QueueFileActions: UI.ActionListType<API.QueueFile> = {\r\n search: {\r\n access: API.AccessEnum.SEARCH, \r\n displayName: 'Search (foreground)', \r\n icon: IconConstants.SEARCH,\r\n handler: handleSearch,\r\n },\r\n searchFileAlternates: {\r\n access: API.AccessEnum.QUEUE_EDIT, \r\n displayName: 'Search for alternates', \r\n icon: IconConstants.SEARCH_ALTERNATES,\r\n filter: itemNotFinished,\r\n handler: handleSearchFileAlternates,\r\n notifications: {\r\n onSuccess: 'File {{item.name}} was searched for alternates',\r\n }\r\n },\r\n removeFile: { \r\n displayName: 'Remove',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REMOVE,\r\n confirmation: {\r\n content: 'Are you sure that you want to remove the file {{item.name}}?',\r\n approveCaption: 'Remove file',\r\n rejectCaption: `Don't remove`,\r\n checkboxCaption: 'Remove on disk',\r\n },\r\n handler: handleRemoveFile,\r\n notifications: {\r\n onSuccess: 'File {{item.name}} was removed from queue',\r\n }\r\n },\r\n};\r\n\r\n\r\nexport default {\r\n moduleId: UI.Modules.QUEUE,\r\n //subId: 'file',\r\n actions: QueueFileActions,\r\n} as UI.ModuleActions<API.QueueFile>;\r\n","import PropTypes from 'prop-types';\r\nimport * as React from 'react';\r\nimport classNames from 'classnames';\r\n\r\n\r\nexport interface ProgressProps {\r\n caption?: React.ReactNode;\r\n className?: string | null;\r\n percent?: number;\r\n}\r\n\r\nconst Progress: React.FC<ProgressProps> = ({ className, percent, caption }) => (\r\n <div \r\n className={ classNames(\r\n 'ui progress', \r\n className, \r\n { 'indeterminate': percent === undefined },\r\n ) } \r\n data-percent={ percent }\r\n >\r\n <div \r\n className=\"bar\" \r\n style={{ \r\n transitionDuration: 300 + 'ms',\r\n width: percent === undefined ? undefined : percent + '%',\r\n minWidth: '0px'\r\n }}\r\n >\r\n <div className=\"progress\"/>\r\n </div>\r\n { !!caption && (\r\n <div className=\"label\">\r\n { caption }\r\n </div>\r\n )}\r\n </div>\r\n);\r\n\r\nProgress.propTypes = {\r\n percent: PropTypes.number.isRequired,\r\n caption: PropTypes.node.isRequired,\r\n className: PropTypes.string,\r\n};\r\n\r\nexport default Progress;","import { default as QueueConstants, StatusEnum } from 'constants/QueueConstants';\r\nimport SocketService from 'services/SocketService';\r\nimport History from 'utils/History';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport SearchActions from 'actions/reflux/SearchActions';\r\n\r\n\r\nconst bundleValidationFailed = (bundle: API.QueueBundle) => bundle.status.id === StatusEnum.COMPLETION_VALIDATION_ERROR;\r\nconst itemNotFinished = (bundle: API.QueueBundle) => bundle.time_finished === 0;\r\nconst isDirectoryBundle = (bundle: API.QueueBundle) => bundle.type.id === 'directory';\r\nconst hasSources = (bundle: API.QueueBundle) => bundle.sources.total > 0 && itemNotFinished(bundle);\r\n\r\n\r\nconst shareBundle = (\r\n bundle: API.QueueBundle, \r\n skipValidation: boolean\r\n) => {\r\n return SocketService.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/share`, { \r\n skip_validation: skipValidation, \r\n });\r\n};\r\n\r\nconst handleRescan: UI.ActionHandler<API.QueueBundle> = ({ data: bundle }) => {\r\n return shareBundle(bundle, false);\r\n};\r\n\r\nconst handleForceShare: UI.ActionHandler<API.QueueBundle> = ({ data: bundle }) => {\r\n return shareBundle(bundle, true);\r\n};\r\n\r\nconst handleRemoveBundle: UI.ActionHandler<API.QueueBundle> = (\r\n { data: bundle },\r\n removeFinished\r\n) => {\r\n return SocketService.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/remove`, { \r\n remove_finished: removeFinished,\r\n });\r\n};\r\n\r\nconst handleSearch: UI.ActionHandler<API.QueueBundle> = ({ data: itemInfo, location }) => {\r\n return SearchActions.search(itemInfo, location);\r\n};\r\n\r\nconst handleSearchBundleAlternates: UI.ActionHandler<API.QueueBundle> = (\r\n { data: bundle }\r\n) => {\r\n return SocketService.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/search`);\r\n};\r\n\r\nconst handleSources: UI.ActionHandler<API.QueueBundle> = ({ data, location }) => {\r\n History.push(`${location.pathname}/sources/${data.id}`);\r\n};\r\n\r\nconst handleContent: UI.ActionHandler<API.QueueBundle> = ({ data, location }) => {\r\n History.push(`${location.pathname}/content/${data.id}`);\r\n};\r\n\r\n\r\n\r\nconst QueueBundleActions: UI.ActionListType<API.QueueBundle> = {\r\n sources: { \r\n displayName: 'Manage sources...', \r\n icon: IconConstants.USER,\r\n filter: hasSources,\r\n handler: handleSources,\r\n },\r\n content: { \r\n displayName: 'Manage files...', \r\n icon: IconConstants.FILE,\r\n filter: isDirectoryBundle,\r\n handler: handleContent,\r\n },\r\n divider: null,\r\n search: { \r\n access: API.AccessEnum.SEARCH, \r\n displayName: 'Search (foreground)', \r\n icon: IconConstants.SEARCH,\r\n handler: handleSearch,\r\n },\r\n searchBundleAlternates: { \r\n access: API.AccessEnum.QUEUE_EDIT, \r\n displayName: 'Search for alternates', \r\n icon: IconConstants.SEARCH_ALTERNATES,\r\n filter: itemNotFinished,\r\n handler: handleSearchBundleAlternates,\r\n notifications: {\r\n onSuccess: 'The bundle {{item.name}} was searched for alternates'\r\n }\r\n },\r\n divider2: null,\r\n removeBundle: {\r\n displayName: 'Remove',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REMOVE,\r\n confirmation: {\r\n content: 'Are you sure that you want to remove the bundle {{item.name}}?',\r\n approveCaption: 'Remove bundle',\r\n rejectCaption: `Don't remove`,\r\n checkboxCaption: 'Remove finished files',\r\n },\r\n handler: handleRemoveBundle,\r\n },\r\n divider3: null,\r\n rescan: {\r\n displayName: 'Rescan for errors',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REFRESH_COLORED,\r\n filter: bundleValidationFailed,\r\n handler: handleRescan,\r\n },\r\n forceShare: { \r\n displayName: 'Force in share',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.ERROR,\r\n filter: bundleValidationFailed,\r\n handler: handleForceShare,\r\n }\r\n};\r\n\r\n\r\nexport default {\r\n moduleId: UI.Modules.QUEUE,\r\n //subId: 'bundle',\r\n actions: QueueBundleActions,\r\n} as UI.ModuleActions<API.QueueBundle>;\r\n","import { QueuePriorityEnum } from 'types/api';\r\n\r\nexport const PriorityEnum = {\r\n [QueuePriorityEnum.PAUSED_FORCED]: { str: 'Paused (forced)', id: 0 },\r\n [QueuePriorityEnum.PAUSED]: { str: 'Paused', id: 1 },\r\n [QueuePriorityEnum.LOWEST]: { str: 'Lowest', id: 2 },\r\n [QueuePriorityEnum.LOW]: { str: 'Low', id: 3 },\r\n [QueuePriorityEnum.NORMAL]: { str: 'Normal', id: 4 },\r\n [QueuePriorityEnum.HIGH]: { str: 'High', id: 5 },\r\n [QueuePriorityEnum.HIGHEST]: { str: 'Highest', id: 6 },\r\n};","import * as React from 'react';\r\nimport classNames from 'classnames';\r\n\r\nimport DropdownCaption from './DropdownCaption';\r\n\r\n\r\ninterface EmptyDropdownProps {\r\n caption: React.ReactNode;\r\n className?: string;\r\n}\r\n\r\n// A component used to emulate a dropdown when there are no items to display\r\nconst EmptyDropdown: React.FC<EmptyDropdownProps> = ({ caption, className }) => {\r\n const titleClassName = classNames(\r\n //'caption',\r\n 'ui empty dropdown',\r\n className,\r\n );\r\n\r\n return (\r\n <div className={ titleClassName }>\r\n <DropdownCaption>\r\n { caption }\r\n </DropdownCaption>\r\n </div>\r\n );\r\n};\r\n\r\nexport default EmptyDropdown\r\n;","import PropTypes from 'prop-types';\r\nimport { Component } from 'react';\r\nimport isEqual from 'lodash/isEqual';\r\n\r\nimport { PriorityEnum } from 'constants/PriorityConstants';\r\n\r\nimport TableDropdown, { DropdownCloseHandler } from 'components/semantic/TableDropdown';\r\nimport MenuItemLink from 'components/semantic/MenuItemLink';\r\nimport EmptyDropdown from 'components/semantic/EmptyDropdown';\r\n\r\nimport LoginStore from 'stores/LoginStore';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { TFunction } from 'i18next';\r\nimport { translate } from 'utils/TranslationUtils';\r\nimport { runBackgroundSocketAction } from 'utils/ActionUtils';\r\n\r\n\r\ninterface PriorityMenuProps {\r\n itemPrio: API.QueuePriority;\r\n item: API.QueueItemBase;\r\n prioAction: (item: API.QueueItemBase, priority: API.QueuePriorityEnum) => Promise<any>;\r\n t: TFunction;\r\n}\r\n\r\nclass PriorityMenu extends Component<PriorityMenuProps> {\r\n static propTypes = {\r\n /**\r\n * Priority object\r\n */\r\n itemPrio: PropTypes.object.isRequired,\r\n\r\n /**\r\n * Item with priority properties\r\n */\r\n item: PropTypes.object.isRequired,\r\n\r\n prioAction: PropTypes.func.isRequired,\r\n };\r\n\r\n setPriority = (priorityId: API.QueuePriorityEnum) => {\r\n const { item, prioAction, t } = this.props;\r\n return runBackgroundSocketAction(\r\n () => prioAction(item, priorityId),\r\n t\r\n );\r\n }\r\n\r\n setAutoPriority = () => {\r\n this.setPriority(API.QueuePriorityEnum.DEFAULT);\r\n }\r\n\r\n shouldComponentUpdate(nextProps: PriorityMenuProps) {\r\n return !isEqual(nextProps.item.priority, this.props.item.priority);\r\n }\r\n\r\n getPriorityListItem = (priority: API.QueuePriority, t: TFunction, onClose: DropdownCloseHandler) => {\r\n const currentPrio = this.props.item.priority.id;\r\n return (\r\n <MenuItemLink \r\n key={ priority.id }\r\n active={ currentPrio === priority.id } \r\n onClick={ () => {\r\n this.setPriority(priority.id);\r\n onClose();\r\n }}\r\n >\r\n { translate(priority.str, t, UI.Modules.QUEUE) }\r\n </MenuItemLink>\r\n );\r\n }\r\n\r\n getChildren = (onClose: DropdownCloseHandler) => {\r\n const { t } = this.props;\r\n\r\n let children = Object.keys(PriorityEnum)\r\n .map(prioKey => this.getPriorityListItem(PriorityEnum[prioKey], t, onClose));\r\n\r\n children.push(<div key=\"divider\" className=\"ui divider\"/>);\r\n children.push(\r\n <MenuItemLink \r\n key=\"auto\"\r\n active={ this.props.itemPrio.auto } \r\n onClick={ () => {\r\n this.setPriority(API.QueuePriorityEnum.DEFAULT);\r\n onClose();\r\n } }\r\n >\r\n { translate('Auto', t, UI.Modules.QUEUE) }\r\n </MenuItemLink>\r\n );\r\n\r\n return children;\r\n }\r\n\r\n render() {\r\n const { itemPrio, t } = this.props;\r\n let caption = translate(PriorityEnum[itemPrio.id].str, t, UI.Modules.QUEUE);\r\n if (itemPrio.auto) {\r\n caption += ` (${translate('Auto', t, UI.Modules.QUEUE).toLocaleLowerCase()})`;\r\n }\r\n\r\n if (!LoginStore.hasAccess(API.AccessEnum.QUEUE_EDIT)) {\r\n return (\r\n <EmptyDropdown\r\n caption={ caption }\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <TableDropdown \r\n caption={ caption } \r\n className=\"priority-menu\"\r\n >\r\n { this.getChildren }\r\n </TableDropdown>\r\n );\r\n }\r\n}\r\n\r\nexport default PriorityMenu;","import * as React from 'react';\r\nimport classNames from 'classnames';\r\n\r\nimport Progress from 'components/semantic/Progress';\r\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\r\n\r\nimport * as API from 'types/api';\r\n\r\n\r\nconst getStatusClass = (cellData: API.QueueBundleStatus, rowData: API.QueueBundle) => {\r\n if (cellData.completed) {\r\n return 'success';\r\n }\r\n\r\n const statusId = cellData.id;\r\n return classNames(\r\n { 'grey': (!statusId || statusId === API.QueueBundleStatusEnum.QUEUED) && rowData.speed === 0 },\r\n { 'blue': (!statusId || statusId === API.QueueBundleStatusEnum.QUEUED) && rowData.speed > 0 },\r\n );\r\n};\r\n\r\nconst StatusCell: React.FC<RowWrapperCellChildProps<API.QueueBundleStatus, API.QueueBundle>> = (\r\n { cellData, rowDataGetter }\r\n) => {\r\n if (cellData!.failed) {\r\n // There isn't much space for other information\r\n return (\r\n <span className=\"error\">\r\n { cellData!.str }\r\n </span>\r\n );\r\n }\r\n\r\n const rowData = rowDataGetter!();\r\n return (\r\n <Progress \r\n className={ getStatusClass(cellData!, rowData) }\r\n caption={ cellData!.str }\r\n percent={ (rowData.downloaded_bytes * 100) / rowData.size }\r\n />\r\n );\r\n};\r\n\r\nexport default StatusCell;","import Reflux from 'reflux';\r\n\r\nimport QueueConstants from 'constants/QueueConstants';\r\nimport ViewStoreMixin from 'mixins/ViewStoreMixin';\r\n\r\n\r\nexport default Reflux.createStore({\r\n _viewName: 'queue_bundle_view',\r\n _apiUrl: QueueConstants.MODULE_URL,\r\n mixins: [ ViewStoreMixin('name') ],\r\n});\r\n","import Reflux from 'reflux';\r\n\r\nimport QueueConstants from 'constants/QueueConstants';\r\nimport ViewStoreMixin from 'mixins/ViewStoreMixin';\r\n\r\n\r\nexport default Reflux.createStore({\r\n _viewName: 'queue_file_view',\r\n _apiUrl: QueueConstants.MODULE_URL,\r\n mixins: [ ViewStoreMixin('name') ],\r\n});\r\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import * as React from 'react';\r\nimport { Column } from 'fixed-data-table-2';\r\n\r\nimport QueueFileUIActions from 'actions/ui/QueueFileActions';\r\n\r\nimport VirtualTable from 'components/table/VirtualTable';\r\n\r\nimport PriorityMenu from 'routes/Queue/components/PriorityMenu';\r\nimport StatusCell from 'routes/Queue/components/StatusCell';\r\n\r\nimport QueueFileViewStore from 'stores/QueueFileViewStore';\r\n\r\nimport { FileActionCell, SizeCell, SpeedCell, AbbreviatedDurationCell } from 'components/table/Cell';\r\n\r\nimport '../style.css';\r\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\r\n\r\nimport * as API from 'types/api';\r\nimport { setFilePriority } from 'services/api/QueueApi';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\nconst PriorityCell: React.FC<RowWrapperCellChildProps<API.QueuePriority, API.QueueBundle>> = (\r\n { cellData, rowDataGetter, t }\r\n) => (\r\n <PriorityMenu \r\n itemPrio={ cellData! } \r\n item={ rowDataGetter!() }\r\n prioAction={ setFilePriority }\r\n t={ t! }\r\n />\r\n);\r\n\r\ninterface BundleFileTableProps {\r\n bundle: API.QueueBundle;\r\n}\r\n\r\nclass BundleFileTable extends React.Component<BundleFileTableProps> {\r\n isActive = (cellData: any, rowData: API.QueueFile) => {\r\n return !rowData.status.downloaded;\r\n }\r\n\r\n isRunning = (cellData: any, rowData: API.QueueFile) => {\r\n return rowData.speed > 0;\r\n }\r\n\r\n render() {\r\n return (\r\n <VirtualTable\r\n store={ QueueFileViewStore }\r\n sourceFilter={ {\r\n pattern: this.props.bundle.id,\r\n method: API.FilterMethod.EXACT,\r\n property: 'bundle',\r\n } }\r\n moduleId={ QueueFileUIActions.moduleId }\r\n >\r\n <Column\r\n name=\"Name\"\r\n width={200}\r\n flexGrow={20}\r\n columnKey=\"name\"\r\n cell={ \r\n <FileActionCell \r\n actions={ QueueFileUIActions }\r\n remoteMenuId={ MenuConstants.QUEUE_FILE }\r\n /> \r\n }\r\n />\r\n <Column\r\n name=\"Size\"\r\n width={70}\r\n columnKey=\"size\"\r\n cell={ <SizeCell/> }\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Status\"\r\n width={120}\r\n columnKey=\"status\"\r\n cell={ <StatusCell/> }\r\n />\r\n <Column\r\n name=\"Sources\"\r\n width={65}\r\n columnKey=\"sources\"\r\n renderCondition={ this.isActive }\r\n />\r\n <Column\r\n name=\"Time left\"\r\n width={50}\r\n columnKey=\"seconds_left\"\r\n renderCondition={ this.isRunning }\r\n cell={ <AbbreviatedDurationCell/> }\r\n />\r\n <Column\r\n name=\"Speed\"\r\n width={55}\r\n columnKey=\"speed\"\r\n cell={ <SpeedCell/> }\r\n renderCondition={ this.isRunning }\r\n />\r\n <Column\r\n name=\"Priority\"\r\n width={80}\r\n columnKey=\"priority\"\r\n renderCondition={ this.isActive }\r\n cell={ <PriorityCell/> }\r\n flexGrow={1}\r\n />\r\n </VirtualTable>\r\n );\r\n }\r\n}\r\n\r\nexport default BundleFileTable;","import { Component } from 'react';\r\nimport Modal from 'components/semantic/Modal';\r\n\r\nimport ModalRouteDecorator, { ModalRouteDecoratorChildProps } from 'decorators/ModalRouteDecorator';\r\n\r\nimport FileIcon from 'components/icon/FileIcon';\r\nimport BundleFileTable from 'routes/Queue/components/BundleFileTable';\r\nimport DataProviderDecorator, { DataProviderDecoratorChildProps } from 'decorators/DataProviderDecorator';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport * as API from 'types/api';\r\n\r\n\r\ninterface BundleFileDialogProps {\r\n\r\n}\r\n\r\ninterface DataProps extends DataProviderDecoratorChildProps {\r\n bundle: API.QueueBundle;\r\n}\r\n\r\ninterface RouteProps {\r\n bundleId: string;\r\n}\r\n\r\ntype Props = BundleFileDialogProps & DataProps & ModalRouteDecoratorChildProps<RouteProps>;\r\n\r\nclass BundleFileDialog extends Component<Props> {\r\n static displayName = 'BundleFileDialog';\r\n\r\n render() {\r\n const { bundle, ...other } = this.props;\r\n return (\r\n <Modal \r\n className=\"source\" \r\n title={ bundle.name }\r\n subHeader={ bundle.target }\r\n closable={ true } \r\n icon={ <FileIcon typeInfo={ bundle.type }/> } \r\n fullHeight={ true }\r\n { ...other }\r\n >\r\n <BundleFileTable \r\n bundle={ bundle }\r\n />\r\n </Modal>\r\n );\r\n }\r\n}\r\n\r\nexport default ModalRouteDecorator<BundleFileDialogProps, RouteProps>(\r\n DataProviderDecorator<Omit<Props, keyof DataProps>, DataProps>(\r\n BundleFileDialog, {\r\n urls: {\r\n bundle: ({ match }, socket) => socket.get(`${QueueConstants.BUNDLES_URL}/${match.params.bundleId}`),\r\n }\r\n }\r\n ), \r\n 'content/:bundleId'\r\n);","import { default as QueueConstants } from 'constants/QueueConstants';\r\nimport SocketService from 'services/SocketService';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\n\r\ninterface ActionBundleSourceData {\r\n source: API.QueueBundleSource;\r\n bundle: API.QueueBundle;\r\n}\r\n\r\nconst handleRemoveBundleSource: UI.ActionHandler<ActionBundleSourceData> = ({ data }) => {\r\n const { source, bundle } = data;\r\n return SocketService.delete(`${QueueConstants.BUNDLES_URL}/${bundle.id}/sources/${source.user.cid}`);\r\n};\r\n\r\nconst BundleSourceActions: UI.ActionListType<ActionBundleSourceData> = {\r\n removeBundleSource: {\r\n access: API.AccessEnum.QUEUE_EDIT, \r\n displayName: 'Remove source', \r\n icon: IconConstants.REMOVE,\r\n handler: handleRemoveBundleSource,\r\n },\r\n};\r\n\r\n\r\nexport default {\r\n moduleId: UI.Modules.QUEUE,\r\n subId: 'bundleSource',\r\n actions: BundleSourceActions,\r\n};\r\n","import * as React from 'react';\r\n\r\nimport DataProviderDecorator, { DataProviderDecoratorChildProps } from 'decorators/DataProviderDecorator';\r\n\r\nimport QueueBundleSourceActions from 'actions/ui/QueueBundleSourceActions';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport { formatSize, formatSpeed } from 'utils/ValueFormat';\r\n\r\nimport { ActionMenu, UserMenu } from 'components/menu';\r\nimport { UserFileActions } from 'actions/ui/UserActions';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport { TFunction } from 'i18next';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\ninterface SourceProps {\r\n bundle: API.QueueBundle;\r\n source: API.QueueBundleSource;\r\n t: TFunction;\r\n}\r\n\r\nconst Source: React.FC<SourceProps> = ({ source, bundle, t }) => (\r\n <tr>\r\n <td className=\"user dropdown\">\r\n <UserMenu \r\n userIcon={ true }\r\n user={ source.user }\r\n ids={ UserFileActions }\r\n contextElement=\".source.modal\"\r\n remoteMenuId={ MenuConstants.HINTED_USER }\r\n >\r\n <ActionMenu \r\n actions={ QueueBundleSourceActions } \r\n //ids={ [ 'removeBundleSource' ]} \r\n itemData={ {\r\n source,\r\n bundle,\r\n } }\r\n />\r\n </UserMenu>\r\n </td>\r\n <td className=\"hubs\">\r\n { source.user.hub_names }\r\n </td>\r\n <td className=\"speed\">\r\n { source.last_speed > 0 && formatSpeed(source.last_speed, t) }\r\n </td>\r\n <td className=\"files\">\r\n { source.files }\r\n </td>\r\n <td className=\"size\">\r\n { formatSize(source.size, t) }\r\n </td>\r\n </tr>\r\n);\r\n\r\nconst userSort = (a: API.QueueBundleSource, b: API.QueueBundleSource) => a.user.nicks.localeCompare(b.user.nicks);\r\n\r\n\r\ninterface BundleSourceTableProps {\r\n bundle: API.QueueBundle;\r\n queueT: UI.ModuleTranslator;\r\n}\r\n\r\ninterface BundleSourceTableDataProps extends DataProviderDecoratorChildProps {\r\n sources: API.QueueBundleSource[];\r\n}\r\n\r\nconst BundleSourceTable: React.FC<BundleSourceTableProps & BundleSourceTableDataProps> = (\r\n { sources, bundle, queueT }\r\n) => {\r\n const { translate } = queueT;\r\n\r\n return (\r\n <div className=\"sources\">\r\n <h2>{ translate('Sources') }</h2>\r\n <table className=\"ui striped table\">\r\n <thead>\r\n <tr>\r\n <th>{ translate('User') }</th>\r\n <th>{ translate('Hubs') }</th>\r\n <th>{ translate('Last known speed') }</th>\r\n <th>{ translate('Files') }</th>\r\n <th>{ translate('Size') }</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n { sources.sort(userSort).map(source => (\r\n <Source \r\n key={ source.user.cid }\r\n source={ source }\r\n bundle={ bundle! }\r\n t={ queueT.plainT }\r\n />\r\n )) }\r\n </tbody>\r\n </table>\r\n </div>\r\n );\r\n};\r\n\r\nexport default DataProviderDecorator<BundleSourceTableProps, BundleSourceTableDataProps>(BundleSourceTable, {\r\n urls: {\r\n sources: ({ bundle }, socket) => socket.get(`${QueueConstants.BUNDLES_URL}/${bundle!.id}/sources`),\r\n },\r\n onSocketConnected: (addSocketListener, { refetchData, props }) => {\r\n addSocketListener<API.QueueBundle>(QueueConstants.MODULE_URL, QueueConstants.BUNDLE_SOURCES, data => {\r\n // Avoid flickering when there are many bundles running\r\n if (data.id === props.bundle!.id) {\r\n refetchData();\r\n }\r\n });\r\n }\r\n});","import { Component } from 'react';\r\nimport Modal from 'components/semantic/Modal';\r\n\r\nimport ModalRouteDecorator, { ModalRouteDecoratorChildProps } from 'decorators/ModalRouteDecorator';\r\n\r\nimport FileIcon from 'components/icon/FileIcon';\r\n\r\nimport SourceTable from 'routes/Queue/components/BundleSourceTable';\r\nimport DataProviderDecorator, { DataProviderDecoratorChildProps } from 'decorators/DataProviderDecorator';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\ninterface BundleSourceDialogProps {\r\n queueT: UI.ModuleTranslator;\r\n}\r\n\r\ninterface DataProps extends DataProviderDecoratorChildProps {\r\n bundle: API.QueueBundle;\r\n}\r\n\r\ninterface RouteProps { \r\n bundleId: string; \r\n}\r\n\r\ntype Props = BundleSourceDialogProps & ModalRouteDecoratorChildProps<RouteProps>;\r\n\r\nclass SourceDialog extends Component<Props & DataProps> {\r\n static displayName = 'SourceDialog';\r\n\r\n render() {\r\n const { bundle, queueT } = this.props;\r\n return (\r\n <Modal \r\n className=\"source\" \r\n title={ bundle.name }\r\n subHeader={ bundle.target }\r\n closable={ true } \r\n icon={ <FileIcon typeInfo={ bundle.type }/> } \r\n fullHeight={ true }\r\n { ...this.props }\r\n >\r\n <SourceTable \r\n bundle={ bundle }\r\n queueT={ queueT }\r\n />\r\n </Modal>\r\n );\r\n }\r\n}\r\n\r\nexport default ModalRouteDecorator<BundleSourceDialogProps, RouteProps>(\r\n DataProviderDecorator<Props, DataProps>(\r\n SourceDialog, {\r\n urls: {\r\n bundle: ({ match }, socket) => socket.get(`${QueueConstants.BUNDLES_URL}/${match.params.bundleId}`),\r\n }\r\n }\r\n ), \r\n 'sources/:bundleId'\r\n);","import * as React from 'react';\r\nimport { Column } from 'fixed-data-table-2';\r\n\r\nimport QueueActions from 'actions/ui/QueueActions';\r\nimport QueueBundleActions from 'actions/ui/QueueBundleActions';\r\nimport VirtualTable from 'components/table/VirtualTable';\r\n\r\nimport PriorityMenu from 'routes/Queue/components/PriorityMenu';\r\nimport StatusCell from 'routes/Queue/components/StatusCell';\r\nimport QueueBundleViewStore from 'stores/QueueBundleViewStore';\r\n\r\nimport BundleFileDialog from 'routes/Queue/components/BundleFileDialog';\r\nimport SourceDialog from 'routes/Queue/components/BundleSourceDialog';\r\n\r\nimport { ActionMenu } from 'components/menu';\r\nimport Message from 'components/semantic/Message';\r\n\r\nimport { \r\n ActionLinkCell, FileActionCell, SizeCell, \r\n SpeedCell, AbbreviatedDurationCell, DurationCell \r\n} from 'components/table/Cell';\r\n\r\nimport '../style.css';\r\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { withTranslation, WithTranslation } from 'react-i18next';\r\nimport { getModuleT } from 'utils/TranslationUtils';\r\nimport { setBundlePriority } from 'services/api/QueueApi';\r\nimport IconConstants from 'constants/IconConstants';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\nconst PriorityCell: React.FC<RowWrapperCellChildProps<API.QueuePriority, API.QueueBundle>> = (\r\n { cellData, rowDataGetter, t }\r\n) => (\r\n <PriorityMenu \r\n itemPrio={ cellData! } \r\n item={ rowDataGetter!() }\r\n prioAction={ setBundlePriority }\r\n t={ t! }\r\n />\r\n);\r\n\r\nclass Queue extends React.Component<WithTranslation> {\r\n static displayName = 'Queue';\r\n\r\n isActive = (cellData: any, rowData: API.QueueBundle) => {\r\n return !rowData.status.downloaded;\r\n }\r\n\r\n isDownloaded = (cellData: any, rowData: API.QueueBundle) => {\r\n return rowData.status.downloaded;\r\n }\r\n\r\n isRunning = (cellData: any, rowData: API.QueueBundle) => {\r\n return rowData.speed > 0;\r\n }\r\n\r\n emptyRowsNodeGetter = () => {\r\n const { t } = this.queueT;\r\n return (\r\n <Message \r\n title={ t('queueEmpty', 'The queue is empty') }\r\n icon={ IconConstants.FILE }\r\n description={ t<string>(\r\n 'queueEmptyDesc', \r\n 'New items can be queued from search or filelists'\r\n ) }\r\n />\r\n );\r\n }\r\n\r\n queueT = getModuleT(this.props.t, UI.Modules.QUEUE);\r\n render() {\r\n const { translate } = this.queueT;\r\n return (\r\n <>\r\n <VirtualTable\r\n emptyRowsNodeGetter={ this.emptyRowsNodeGetter }\r\n store={ QueueBundleViewStore }\r\n footerData={ \r\n <ActionMenu \r\n className=\"top left pointing\"\r\n caption={ translate('Actions...') } \r\n actions={ QueueActions }\r\n header={ translate('Queue actions') } \r\n triggerIcon=\"chevron up\"\r\n button={ true }\r\n />\r\n }\r\n moduleId={ QueueActions.moduleId }\r\n >\r\n <Column\r\n name=\"Name\"\r\n width={200}\r\n flexGrow={4}\r\n columnKey=\"name\"\r\n cell={ \r\n <FileActionCell \r\n actions={ QueueBundleActions }\r\n remoteMenuId={ MenuConstants.QUEUE_BUNDLE }\r\n ids={[ \r\n 'content', 'sources', \r\n 'divider', \r\n 'search', 'searchBundleAlternates',\r\n 'divider', \r\n 'removeBundle', \r\n 'divider', \r\n 'rescan', 'forceShare' \r\n ]}\r\n /> \r\n }\r\n />\r\n <Column\r\n name=\"Size\"\r\n width={60}\r\n columnKey=\"size\"\r\n cell={ <SizeCell/> }\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Type/content\"\r\n width={150}\r\n columnKey=\"type\"\r\n hideWidth={1000}\r\n cell={ \r\n <ActionLinkCell \r\n actions={ QueueBundleActions }\r\n actionId=\"content\"\r\n /> \r\n }\r\n />\r\n <Column\r\n name=\"Status\"\r\n width={120}\r\n flexGrow={3}\r\n columnKey=\"status\"\r\n cell={ <StatusCell/> }\r\n />\r\n <Column\r\n name=\"Sources\"\r\n width={60}\r\n columnKey=\"sources\"\r\n renderCondition={ this.isActive }\r\n flexGrow={1}\r\n cell={ \r\n <ActionLinkCell \r\n actions={ QueueBundleActions }\r\n actionId=\"sources\"\r\n /> \r\n }\r\n />\r\n <Column\r\n name=\"Time left\"\r\n width={50}\r\n columnKey=\"seconds_left\"\r\n renderCondition={ this.isRunning }\r\n cell={ <AbbreviatedDurationCell/> }\r\n />\r\n <Column\r\n name=\"Speed\"\r\n width={50}\r\n columnKey=\"speed\"\r\n cell={ <SpeedCell/> }\r\n renderCondition={ this.isRunning }\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Priority\"\r\n width={80}\r\n columnKey=\"priority\"\r\n renderCondition={ this.isActive }\r\n cell={ <PriorityCell/> }\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Added\"\r\n width={100}\r\n columnKey=\"time_added\"\r\n cell={ <DurationCell/> }\r\n hideWidth={1400}\r\n />\r\n <Column\r\n name=\"Finished\"\r\n width={100}\r\n columnKey=\"time_finished\"\r\n cell={ <DurationCell/> }\r\n renderCondition={ this.isDownloaded }\r\n hideWidth={1200}\r\n />\r\n </VirtualTable>\r\n <SourceDialog queueT={ this.queueT }/>\r\n <BundleFileDialog/>\r\n </>\r\n );\r\n }\r\n}\r\n\r\nexport default withTranslation()(Queue);"],"names":["___CSS_LOADER_EXPORT___","push","module","id","setBundlePriorities","prio","priority","QueueActions","removeCompleted","access","displayName","icon","handler","notifications","onSuccess","divider","pause","resume","moduleId","actions","QueueFileActions","search","data","itemInfo","location","searchFileAlternates","filter","item","time_finished","file","removeFile","confirmation","content","approveCaption","rejectCaption","checkboxCaption","removeFinished","remove_finished","Progress","className","percent","caption","undefined","style","transitionDuration","width","minWidth","propTypes","bundleValidationFailed","bundle","status","itemNotFinished","shareBundle","skipValidation","SocketService","QueueConstants","skip_validation","QueueBundleActions","sources","IconConstants","total","History","pathname","type","SearchActions","searchBundleAlternates","divider2","removeBundle","divider3","rescan","forceShare","PriorityEnum","str","titleClassName","DropdownCaption","PriorityMenu","Component","setPriority","priorityId","prioAction","this","props","t","setAutoPriority","getPriorityListItem","onClose","currentPrio","MenuItemLink","active","onClick","getChildren","children","Object","keys","map","prioKey","itemPrio","auto","shouldComponentUpdate","nextProps","render","toLocaleLowerCase","LoginStore","TableDropdown","getStatusClass","cellData","rowData","completed","statusId","speed","rowDataGetter","failed","downloaded_bytes","size","_viewName","_apiUrl","mixins","ViewStoreMixin","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","PriorityCell","BundleFileTable","isActive","downloaded","isRunning","VirtualTable","store","QueueFileViewStore","sourceFilter","pattern","method","property","Column","name","flexGrow","columnKey","cell","remoteMenuId","MenuConstants","renderCondition","BundleFileDialog","other","Modal","title","subHeader","target","closable","FileIcon","typeInfo","fullHeight","ModalRouteDecorator","DataProviderDecorator","urls","match","socket","get","params","bundleId","BundleSourceActions","removeBundleSource","source","user","cid","subId","Source","userIcon","ids","contextElement","QueueBundleSourceActions","itemData","hub_names","last_speed","files","userSort","a","b","nicks","localeCompare","queueT","translate","sort","plainT","onSocketConnected","addSocketListener","refetchData","SourceDialog","Queue","isDownloaded","emptyRowsNodeGetter","Message","description","QueueBundleViewStore","footerData","header","triggerIcon","button","hideWidth","actionId","withTranslation"],"sourceRoot":""}
1
+ {"version":3,"file":"js/queue.2fcf7a1381f1fb4af03f.chunk.js","mappings":"kKAGIA,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,oRAAqR,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,0CAA0C,MAAQ,GAAG,SAAW,6FAA6F,eAAiB,CAAC,qRAAqR,WAAa,MAE1yB,W,yFCEA,MAAMC,EAAuBC,GACpB,SAAmB,gBAA6B,YAAa,CAClEC,SAAUD,IAiBRE,EAAwC,CAC5CC,gBAAiB,CACfC,OAAQ,gBACRC,YAAa,2BACbC,KAAM,WACNC,QAV0B,IACrB,SAAmB,gBAA6B,qBAUrDC,cAAe,CACbC,UAAW,oDAGfC,QAAS,KACTC,MAAO,CACLN,YAAa,oBACbD,OAAQ,gBACRE,KAAM,UACNC,QA5BgB,IACXR,EAAoB,qBA6B3Ba,OAAQ,CACNP,YAAa,qBACbD,OAAQ,gBACRE,KAAM,SACNC,QA9BiB,IACZR,EAAoB,gBAiC7B,GACEc,SAAU,WACVC,QAASZ,I,oGC7CX,MAsBMa,EAAqD,CACzDC,OAAQ,CACNZ,OAAQ,YACRC,YAAa,sBACbC,KAAM,WACNC,QAxBkD,EAAGU,KAAMC,EAAUC,SAAAA,KAChE,WAAqBD,EAAUC,IAyBtCC,qBAAsB,CACpBhB,OAAQ,gBACRC,YAAa,wBACbC,KAAM,sBACNe,OAjCqBC,GAA+C,IAAvBA,EAAKC,cAkClDhB,QAlBgE,EAAGU,KAAMO,KACpE,SAAmB,GAAG,iBAA4BA,EAAK1B,aAkB5DU,cAAe,CACbC,UAAW,mDAGfgB,WAAY,CACVpB,YAAa,SACbD,OAAQ,gBACRE,KAAM,WACNoB,aAAc,CACZC,QAAS,+DACTC,eAAgB,cAChBC,cAAe,eACfC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C,KAAK,QACL5F,MAAO,IACP8F,UAAU,aACVC,MAAO,SAAC,KAAY,WACpB4D,UAAW,WAAI,IAEjB,SAAC,EAAAhE,OAAM,CACLC,KAAK,WACL5F,MAAO,IACP8F,UAAU,gBACVC,MAAO,SAAC,KAAY,WACpBG,gBAAkB/D,KAAK+G,aACvBS,UAAW,WAAI,WACf,IAEJ,SAAC,GAAY,CAAClB,OAAStG,KAAKsG,aAAM,IAClC,SAAC,GAAgB,kBAAE,IApJlB,GAAA5K,YAAc,QA0JvB,UAAe,EAAAgM,GAAA,IAAf,CAAiCZ","sources":["webpack://airdcpp-webui/./src/routes/Queue/style.css","webpack://airdcpp-webui/./src/actions/ui/QueueActions.ts","webpack://airdcpp-webui/./src/actions/ui/QueueFileActions.ts","webpack://airdcpp-webui/./src/components/semantic/Progress.tsx","webpack://airdcpp-webui/./src/actions/ui/QueueBundleActions.ts","webpack://airdcpp-webui/./src/constants/PriorityConstants.ts","webpack://airdcpp-webui/./src/components/semantic/EmptyDropdown.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/PriorityMenu.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/StatusCell.tsx","webpack://airdcpp-webui/./src/stores/QueueBundleViewStore.js","webpack://airdcpp-webui/./src/stores/QueueFileViewStore.js","webpack://airdcpp-webui/./src/routes/Queue/style.css?62bc","webpack://airdcpp-webui/./src/routes/Queue/components/BundleFileTable.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/BundleFileDialog.tsx","webpack://airdcpp-webui/./src/actions/ui/QueueBundleSourceActions.ts","webpack://airdcpp-webui/./src/routes/Queue/components/BundleSourceTable.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/BundleSourceDialog.tsx","webpack://airdcpp-webui/./src/routes/Queue/components/Queue.tsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".status .error {\\r\\n color: red;\\r\\n}\\r\\n\\r\\n@media only screen and (min-width: 767px) {\\r\\n .source.modal td {\\r\\n max-width: 250px;\\r\\n }\\r\\n\\r\\n /* Can't be applied to dropdown cells */\\r\\n .source.modal td:not(.user) {\\r\\n overflow-x: hidden;\\r\\n }\\r\\n}\\r\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/routes/Queue/style.css\"],\"names\":[],\"mappings\":\"AAAA;EACE,UAAU;AACZ;;AAEA;EACE;IACE,gBAAgB;EAClB;;EAEA,uCAAuC;EACvC;IACE,kBAAkB;EACpB;AACF\",\"sourcesContent\":[\".status .error {\\r\\n color: red;\\r\\n}\\r\\n\\r\\n@media only screen and (min-width: 767px) {\\r\\n .source.modal td {\\r\\n max-width: 250px;\\r\\n }\\r\\n\\r\\n /* Can't be applied to dropdown cells */\\r\\n .source.modal td:not(.user) {\\r\\n overflow-x: hidden;\\r\\n }\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","import QueueConstants from 'constants/QueueConstants';\r\nimport SocketService from 'services/SocketService';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\nconst setBundlePriorities = (prio: API.QueuePriorityEnum) => {\r\n return SocketService.post(QueueConstants.BUNDLES_URL + '/priority', { \r\n priority: prio \r\n });\r\n};\r\n\r\nconst handlePause = () => {\r\n return setBundlePriorities(API.QueuePriorityEnum.PAUSED_FORCED);\r\n};\r\n\r\nconst handleResume = () => {\r\n return setBundlePriorities(API.QueuePriorityEnum.DEFAULT);\r\n};\r\n\r\nconst handleRemoveCompleted = () => {\r\n return SocketService.post(QueueConstants.BUNDLES_URL + '/remove_completed');\r\n};\r\n\r\n\r\nconst QueueActions: UI.ActionListType<null> = {\r\n removeCompleted: {\r\n access: API.AccessEnum.QUEUE_EDIT, \r\n displayName: 'Remove completed bundles', \r\n icon: IconConstants.REMOVE,\r\n handler: handleRemoveCompleted,\r\n notifications: {\r\n onSuccess: '{{result.count}} completed bundles were removed'\r\n }\r\n },\r\n divider: null,\r\n pause: {\r\n displayName: 'Pause all bundles',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.PAUSE,\r\n handler: handlePause,\r\n },\r\n resume: { \r\n displayName: 'Resume all bundles',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.PLAY,\r\n handler: handleResume,\r\n }\r\n};\r\n\r\nexport default {\r\n moduleId: UI.Modules.QUEUE,\r\n actions: QueueActions,\r\n};\r\n\r\n","import QueueConstants from 'constants/QueueConstants';\r\nimport SocketService from 'services/SocketService';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport SearchActions from 'actions/reflux/SearchActions';\r\n\r\n\r\nconst itemNotFinished = (item: API.QueueFile) => item.time_finished === 0;\r\n\r\n\r\nconst handleSearch: UI.ActionHandler<API.QueueFile> = ({ data: itemInfo, location }) => {\r\n return SearchActions.search(itemInfo, location);\r\n};\r\n\r\nconst handleRemoveFile: UI.ActionHandler<API.QueueFile> = (\r\n { data: file },\r\n removeFinished: boolean\r\n) => {\r\n return SocketService.post(`${QueueConstants.FILES_URL}/${file.id}/remove`, {\r\n remove_finished: removeFinished,\r\n });\r\n};\r\n\r\nconst handleSearchFileAlternates: UI.ActionHandler<API.QueueFile> = ({ data: file }) => {\r\n return SocketService.post(`${QueueConstants.FILES_URL}/${file.id}/search`);\r\n};\r\n\r\n\r\n\r\nconst QueueFileActions: UI.ActionListType<API.QueueFile> = {\r\n search: {\r\n access: API.AccessEnum.SEARCH, \r\n displayName: 'Search (foreground)', \r\n icon: IconConstants.SEARCH,\r\n handler: handleSearch,\r\n },\r\n searchFileAlternates: {\r\n access: API.AccessEnum.QUEUE_EDIT, \r\n displayName: 'Search for alternates', \r\n icon: IconConstants.SEARCH_ALTERNATES,\r\n filter: itemNotFinished,\r\n handler: handleSearchFileAlternates,\r\n notifications: {\r\n onSuccess: 'File {{item.name}} was searched for alternates',\r\n }\r\n },\r\n removeFile: { \r\n displayName: 'Remove',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REMOVE,\r\n confirmation: {\r\n content: 'Are you sure that you want to remove the file {{item.name}}?',\r\n approveCaption: 'Remove file',\r\n rejectCaption: `Don't remove`,\r\n checkboxCaption: 'Remove on disk',\r\n },\r\n handler: handleRemoveFile,\r\n notifications: {\r\n onSuccess: 'File {{item.name}} was removed from queue',\r\n }\r\n },\r\n};\r\n\r\n\r\nexport default {\r\n moduleId: UI.Modules.QUEUE,\r\n //subId: 'file',\r\n actions: QueueFileActions,\r\n} as UI.ModuleActions<API.QueueFile>;\r\n","import PropTypes from 'prop-types';\r\nimport * as React from 'react';\r\nimport classNames from 'classnames';\r\n\r\n\r\nexport interface ProgressProps {\r\n caption?: React.ReactNode;\r\n className?: string | null;\r\n percent?: number;\r\n}\r\n\r\nconst Progress: React.FC<ProgressProps> = ({ className, percent, caption }) => (\r\n <div \r\n className={ classNames(\r\n 'ui progress', \r\n className, \r\n { 'indeterminate': percent === undefined },\r\n ) } \r\n data-percent={ percent }\r\n >\r\n <div \r\n className=\"bar\" \r\n style={{ \r\n transitionDuration: 300 + 'ms',\r\n width: percent === undefined ? undefined : percent + '%',\r\n minWidth: '0px'\r\n }}\r\n >\r\n <div className=\"progress\"/>\r\n </div>\r\n { !!caption && (\r\n <div className=\"label\">\r\n { caption }\r\n </div>\r\n )}\r\n </div>\r\n);\r\n\r\nProgress.propTypes = {\r\n percent: PropTypes.number.isRequired,\r\n caption: PropTypes.node.isRequired,\r\n className: PropTypes.string,\r\n};\r\n\r\nexport default Progress;","import { default as QueueConstants, StatusEnum } from 'constants/QueueConstants';\r\nimport SocketService from 'services/SocketService';\r\nimport History from 'utils/History';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport SearchActions from 'actions/reflux/SearchActions';\r\n\r\n\r\nconst bundleValidationFailed = (bundle: API.QueueBundle) => bundle.status.id === StatusEnum.COMPLETION_VALIDATION_ERROR;\r\nconst itemNotFinished = (bundle: API.QueueBundle) => bundle.time_finished === 0;\r\nconst isDirectoryBundle = (bundle: API.QueueBundle) => bundle.type.id === 'directory';\r\nconst hasSources = (bundle: API.QueueBundle) => bundle.sources.total > 0 && itemNotFinished(bundle);\r\n\r\n\r\nconst shareBundle = (\r\n bundle: API.QueueBundle, \r\n skipValidation: boolean\r\n) => {\r\n return SocketService.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/share`, { \r\n skip_validation: skipValidation, \r\n });\r\n};\r\n\r\nconst handleRescan: UI.ActionHandler<API.QueueBundle> = ({ data: bundle }) => {\r\n return shareBundle(bundle, false);\r\n};\r\n\r\nconst handleForceShare: UI.ActionHandler<API.QueueBundle> = ({ data: bundle }) => {\r\n return shareBundle(bundle, true);\r\n};\r\n\r\nconst handleRemoveBundle: UI.ActionHandler<API.QueueBundle> = (\r\n { data: bundle },\r\n removeFinished\r\n) => {\r\n return SocketService.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/remove`, { \r\n remove_finished: removeFinished,\r\n });\r\n};\r\n\r\nconst handleSearch: UI.ActionHandler<API.QueueBundle> = ({ data: itemInfo, location }) => {\r\n return SearchActions.search(itemInfo, location);\r\n};\r\n\r\nconst handleSearchBundleAlternates: UI.ActionHandler<API.QueueBundle> = (\r\n { data: bundle }\r\n) => {\r\n return SocketService.post(`${QueueConstants.BUNDLES_URL}/${bundle.id}/search`);\r\n};\r\n\r\nconst handleSources: UI.ActionHandler<API.QueueBundle> = ({ data, location }) => {\r\n History.push(`${location.pathname}/sources/${data.id}`);\r\n};\r\n\r\nconst handleContent: UI.ActionHandler<API.QueueBundle> = ({ data, location }) => {\r\n History.push(`${location.pathname}/content/${data.id}`);\r\n};\r\n\r\n\r\n\r\nconst QueueBundleActions: UI.ActionListType<API.QueueBundle> = {\r\n sources: { \r\n displayName: 'Manage sources...', \r\n icon: IconConstants.USER,\r\n filter: hasSources,\r\n handler: handleSources,\r\n },\r\n content: { \r\n displayName: 'Manage files...', \r\n icon: IconConstants.FILE,\r\n filter: isDirectoryBundle,\r\n handler: handleContent,\r\n },\r\n divider: null,\r\n search: { \r\n access: API.AccessEnum.SEARCH, \r\n displayName: 'Search (foreground)', \r\n icon: IconConstants.SEARCH,\r\n handler: handleSearch,\r\n },\r\n searchBundleAlternates: { \r\n access: API.AccessEnum.QUEUE_EDIT, \r\n displayName: 'Search for alternates', \r\n icon: IconConstants.SEARCH_ALTERNATES,\r\n filter: itemNotFinished,\r\n handler: handleSearchBundleAlternates,\r\n notifications: {\r\n onSuccess: 'The bundle {{item.name}} was searched for alternates'\r\n }\r\n },\r\n divider2: null,\r\n removeBundle: {\r\n displayName: 'Remove',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REMOVE,\r\n confirmation: {\r\n content: 'Are you sure that you want to remove the bundle {{item.name}}?',\r\n approveCaption: 'Remove bundle',\r\n rejectCaption: `Don't remove`,\r\n checkboxCaption: 'Remove finished files',\r\n },\r\n handler: handleRemoveBundle,\r\n },\r\n divider3: null,\r\n rescan: {\r\n displayName: 'Rescan for errors',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.REFRESH_COLORED,\r\n filter: bundleValidationFailed,\r\n handler: handleRescan,\r\n },\r\n forceShare: { \r\n displayName: 'Force in share',\r\n access: API.AccessEnum.QUEUE_EDIT,\r\n icon: IconConstants.ERROR,\r\n filter: bundleValidationFailed,\r\n handler: handleForceShare,\r\n }\r\n};\r\n\r\n\r\nexport default {\r\n moduleId: UI.Modules.QUEUE,\r\n //subId: 'bundle',\r\n actions: QueueBundleActions,\r\n} as UI.ModuleActions<API.QueueBundle>;\r\n","import { QueuePriorityEnum } from 'types/api';\r\n\r\nexport const PriorityEnum = {\r\n [QueuePriorityEnum.PAUSED_FORCED]: { str: 'Paused (forced)', id: 0 },\r\n [QueuePriorityEnum.PAUSED]: { str: 'Paused', id: 1 },\r\n [QueuePriorityEnum.LOWEST]: { str: 'Lowest', id: 2 },\r\n [QueuePriorityEnum.LOW]: { str: 'Low', id: 3 },\r\n [QueuePriorityEnum.NORMAL]: { str: 'Normal', id: 4 },\r\n [QueuePriorityEnum.HIGH]: { str: 'High', id: 5 },\r\n [QueuePriorityEnum.HIGHEST]: { str: 'Highest', id: 6 },\r\n};","import * as React from 'react';\r\nimport classNames from 'classnames';\r\n\r\nimport DropdownCaption from './DropdownCaption';\r\n\r\n\r\ninterface EmptyDropdownProps {\r\n caption: React.ReactNode;\r\n className?: string;\r\n}\r\n\r\n// A component used to emulate a dropdown when there are no items to display\r\nconst EmptyDropdown: React.FC<EmptyDropdownProps> = ({ caption, className }) => {\r\n const titleClassName = classNames(\r\n //'caption',\r\n 'ui empty dropdown',\r\n className,\r\n );\r\n\r\n return (\r\n <div className={ titleClassName }>\r\n <DropdownCaption>\r\n { caption }\r\n </DropdownCaption>\r\n </div>\r\n );\r\n};\r\n\r\nexport default EmptyDropdown\r\n;","import PropTypes from 'prop-types';\r\nimport { Component } from 'react';\r\nimport isEqual from 'lodash/isEqual';\r\n\r\nimport { PriorityEnum } from 'constants/PriorityConstants';\r\n\r\nimport TableDropdown, { DropdownCloseHandler } from 'components/semantic/TableDropdown';\r\nimport MenuItemLink from 'components/semantic/MenuItemLink';\r\nimport EmptyDropdown from 'components/semantic/EmptyDropdown';\r\n\r\nimport LoginStore from 'stores/LoginStore';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { TFunction } from 'i18next';\r\nimport { translate } from 'utils/TranslationUtils';\r\nimport { runBackgroundSocketAction } from 'utils/ActionUtils';\r\n\r\n\r\ninterface PriorityMenuProps {\r\n itemPrio: API.QueuePriority;\r\n item: API.QueueItemBase;\r\n prioAction: (item: API.QueueItemBase, priority: API.QueuePriorityEnum) => Promise<any>;\r\n t: TFunction;\r\n}\r\n\r\nclass PriorityMenu extends Component<PriorityMenuProps> {\r\n static propTypes = {\r\n /**\r\n * Priority object\r\n */\r\n itemPrio: PropTypes.object.isRequired,\r\n\r\n /**\r\n * Item with priority properties\r\n */\r\n item: PropTypes.object.isRequired,\r\n\r\n prioAction: PropTypes.func.isRequired,\r\n };\r\n\r\n setPriority = (priorityId: API.QueuePriorityEnum) => {\r\n const { item, prioAction, t } = this.props;\r\n return runBackgroundSocketAction(\r\n () => prioAction(item, priorityId),\r\n t\r\n );\r\n }\r\n\r\n setAutoPriority = () => {\r\n this.setPriority(API.QueuePriorityEnum.DEFAULT);\r\n }\r\n\r\n shouldComponentUpdate(nextProps: PriorityMenuProps) {\r\n return !isEqual(nextProps.item.priority, this.props.item.priority);\r\n }\r\n\r\n getPriorityListItem = (priority: API.QueuePriority, t: TFunction, onClose: DropdownCloseHandler) => {\r\n const currentPrio = this.props.item.priority.id;\r\n return (\r\n <MenuItemLink \r\n key={ priority.id }\r\n active={ currentPrio === priority.id } \r\n onClick={ () => {\r\n this.setPriority(priority.id);\r\n onClose();\r\n }}\r\n >\r\n { translate(priority.str, t, UI.Modules.QUEUE) }\r\n </MenuItemLink>\r\n );\r\n }\r\n\r\n getChildren = (onClose: DropdownCloseHandler) => {\r\n const { t } = this.props;\r\n\r\n let children = Object.keys(PriorityEnum)\r\n .map(prioKey => this.getPriorityListItem(PriorityEnum[prioKey], t, onClose));\r\n\r\n children.push(<div key=\"divider\" className=\"ui divider\"/>);\r\n children.push(\r\n <MenuItemLink \r\n key=\"auto\"\r\n active={ this.props.itemPrio.auto } \r\n onClick={ () => {\r\n this.setPriority(API.QueuePriorityEnum.DEFAULT);\r\n onClose();\r\n } }\r\n >\r\n { translate('Auto', t, UI.Modules.QUEUE) }\r\n </MenuItemLink>\r\n );\r\n\r\n return children;\r\n }\r\n\r\n render() {\r\n const { itemPrio, t } = this.props;\r\n let caption = translate(PriorityEnum[itemPrio.id].str, t, UI.Modules.QUEUE);\r\n if (itemPrio.auto) {\r\n caption += ` (${translate('Auto', t, UI.Modules.QUEUE).toLocaleLowerCase()})`;\r\n }\r\n\r\n if (!LoginStore.hasAccess(API.AccessEnum.QUEUE_EDIT)) {\r\n return (\r\n <EmptyDropdown\r\n caption={ caption }\r\n />\r\n );\r\n }\r\n\r\n return (\r\n <TableDropdown \r\n caption={ caption } \r\n className=\"priority-menu\"\r\n >\r\n { this.getChildren }\r\n </TableDropdown>\r\n );\r\n }\r\n}\r\n\r\nexport default PriorityMenu;","import * as React from 'react';\r\nimport classNames from 'classnames';\r\n\r\nimport Progress from 'components/semantic/Progress';\r\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\r\n\r\nimport * as API from 'types/api';\r\n\r\n\r\nconst getStatusClass = (cellData: API.QueueBundleStatus, rowData: API.QueueBundle) => {\r\n if (cellData.completed) {\r\n return 'success';\r\n }\r\n\r\n const statusId = cellData.id;\r\n return classNames(\r\n { 'grey': (!statusId || statusId === API.QueueBundleStatusEnum.QUEUED) && rowData.speed === 0 },\r\n { 'blue': (!statusId || statusId === API.QueueBundleStatusEnum.QUEUED) && rowData.speed > 0 },\r\n );\r\n};\r\n\r\nconst StatusCell: React.FC<RowWrapperCellChildProps<API.QueueBundleStatus, API.QueueBundle>> = (\r\n { cellData, rowDataGetter }\r\n) => {\r\n if (cellData!.failed) {\r\n // There isn't much space for other information\r\n return (\r\n <span className=\"error\">\r\n { cellData!.str }\r\n </span>\r\n );\r\n }\r\n\r\n const rowData = rowDataGetter!();\r\n return (\r\n <Progress \r\n className={ getStatusClass(cellData!, rowData) }\r\n caption={ cellData!.str }\r\n percent={ (rowData.downloaded_bytes * 100) / rowData.size }\r\n />\r\n );\r\n};\r\n\r\nexport default StatusCell;","import Reflux from 'reflux';\r\n\r\nimport QueueConstants from 'constants/QueueConstants';\r\nimport ViewStoreMixin from 'mixins/ViewStoreMixin';\r\n\r\n\r\nexport default Reflux.createStore({\r\n _viewName: 'queue_bundle_view',\r\n _apiUrl: QueueConstants.MODULE_URL,\r\n mixins: [ ViewStoreMixin('name') ],\r\n});\r\n","import Reflux from 'reflux';\r\n\r\nimport QueueConstants from 'constants/QueueConstants';\r\nimport ViewStoreMixin from 'mixins/ViewStoreMixin';\r\n\r\n\r\nexport default Reflux.createStore({\r\n _viewName: 'queue_file_view',\r\n _apiUrl: QueueConstants.MODULE_URL,\r\n mixins: [ ViewStoreMixin('name') ],\r\n});\r\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./style.css\";\n export default content && content.locals ? content.locals : undefined;\n","import * as React from 'react';\r\nimport { Column } from 'fixed-data-table-2';\r\n\r\nimport QueueFileUIActions from 'actions/ui/QueueFileActions';\r\n\r\nimport VirtualTable from 'components/table/VirtualTable';\r\n\r\nimport PriorityMenu from 'routes/Queue/components/PriorityMenu';\r\nimport StatusCell from 'routes/Queue/components/StatusCell';\r\n\r\nimport QueueFileViewStore from 'stores/QueueFileViewStore';\r\n\r\nimport { FileActionCell, SizeCell, SpeedCell, AbbreviatedDurationCell } from 'components/table/Cell';\r\n\r\nimport '../style.css';\r\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\r\n\r\nimport * as API from 'types/api';\r\nimport { setFilePriority } from 'services/api/QueueApi';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\nconst PriorityCell: React.FC<RowWrapperCellChildProps<API.QueuePriority, API.QueueBundle>> = (\r\n { cellData, rowDataGetter, t }\r\n) => (\r\n <PriorityMenu \r\n itemPrio={ cellData! } \r\n item={ rowDataGetter!() }\r\n prioAction={ setFilePriority }\r\n t={ t! }\r\n />\r\n);\r\n\r\ninterface BundleFileTableProps {\r\n bundle: API.QueueBundle;\r\n}\r\n\r\nclass BundleFileTable extends React.Component<BundleFileTableProps> {\r\n isActive = (cellData: any, rowData: API.QueueFile) => {\r\n return !rowData.status.downloaded;\r\n }\r\n\r\n isRunning = (cellData: any, rowData: API.QueueFile) => {\r\n return rowData.speed > 0;\r\n }\r\n\r\n render() {\r\n return (\r\n <VirtualTable\r\n store={ QueueFileViewStore }\r\n sourceFilter={ {\r\n pattern: this.props.bundle.id,\r\n method: API.FilterMethod.EXACT,\r\n property: 'bundle',\r\n } }\r\n moduleId={ QueueFileUIActions.moduleId }\r\n >\r\n <Column\r\n name=\"Name\"\r\n width={200}\r\n flexGrow={20}\r\n columnKey=\"name\"\r\n cell={ \r\n <FileActionCell \r\n actions={ QueueFileUIActions }\r\n remoteMenuId={ MenuConstants.QUEUE_FILE }\r\n /> \r\n }\r\n />\r\n <Column\r\n name=\"Size\"\r\n width={70}\r\n columnKey=\"size\"\r\n cell={ <SizeCell/> }\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Status\"\r\n width={120}\r\n columnKey=\"status\"\r\n cell={ <StatusCell/> }\r\n />\r\n <Column\r\n name=\"Sources\"\r\n width={65}\r\n columnKey=\"sources\"\r\n renderCondition={ this.isActive }\r\n />\r\n <Column\r\n name=\"Time left\"\r\n width={50}\r\n columnKey=\"seconds_left\"\r\n renderCondition={ this.isRunning }\r\n cell={ <AbbreviatedDurationCell/> }\r\n />\r\n <Column\r\n name=\"Speed\"\r\n width={55}\r\n columnKey=\"speed\"\r\n cell={ <SpeedCell/> }\r\n renderCondition={ this.isRunning }\r\n />\r\n <Column\r\n name=\"Priority\"\r\n width={80}\r\n columnKey=\"priority\"\r\n renderCondition={ this.isActive }\r\n cell={ <PriorityCell/> }\r\n flexGrow={1}\r\n />\r\n </VirtualTable>\r\n );\r\n }\r\n}\r\n\r\nexport default BundleFileTable;","import { Component } from 'react';\r\nimport Modal from 'components/semantic/Modal';\r\n\r\nimport ModalRouteDecorator, { ModalRouteDecoratorChildProps } from 'decorators/ModalRouteDecorator';\r\n\r\nimport FileIcon from 'components/icon/FileIcon';\r\nimport BundleFileTable from 'routes/Queue/components/BundleFileTable';\r\nimport DataProviderDecorator, { DataProviderDecoratorChildProps } from 'decorators/DataProviderDecorator';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport * as API from 'types/api';\r\n\r\n\r\ninterface BundleFileDialogProps {\r\n\r\n}\r\n\r\ninterface DataProps extends DataProviderDecoratorChildProps {\r\n bundle: API.QueueBundle;\r\n}\r\n\r\ninterface RouteProps {\r\n bundleId: string;\r\n}\r\n\r\ntype Props = BundleFileDialogProps & DataProps & ModalRouteDecoratorChildProps<RouteProps>;\r\n\r\nclass BundleFileDialog extends Component<Props> {\r\n static displayName = 'BundleFileDialog';\r\n\r\n render() {\r\n const { bundle, ...other } = this.props;\r\n return (\r\n <Modal \r\n className=\"source\" \r\n title={ bundle.name }\r\n subHeader={ bundle.target }\r\n closable={ true } \r\n icon={ <FileIcon typeInfo={ bundle.type }/> } \r\n fullHeight={ true }\r\n { ...other }\r\n >\r\n <BundleFileTable \r\n bundle={ bundle }\r\n />\r\n </Modal>\r\n );\r\n }\r\n}\r\n\r\nexport default ModalRouteDecorator<BundleFileDialogProps, RouteProps>(\r\n DataProviderDecorator<Omit<Props, keyof DataProps>, DataProps>(\r\n BundleFileDialog, {\r\n urls: {\r\n bundle: ({ match }, socket) => socket.get(`${QueueConstants.BUNDLES_URL}/${match.params.bundleId}`),\r\n }\r\n }\r\n ), \r\n 'content/:bundleId'\r\n);","import { default as QueueConstants } from 'constants/QueueConstants';\r\nimport SocketService from 'services/SocketService';\r\n\r\nimport IconConstants from 'constants/IconConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\n\r\ninterface ActionBundleSourceData {\r\n source: API.QueueBundleSource;\r\n bundle: API.QueueBundle;\r\n}\r\n\r\nconst handleRemoveBundleSource: UI.ActionHandler<ActionBundleSourceData> = ({ data }) => {\r\n const { source, bundle } = data;\r\n return SocketService.delete(`${QueueConstants.BUNDLES_URL}/${bundle.id}/sources/${source.user.cid}`);\r\n};\r\n\r\nconst BundleSourceActions: UI.ActionListType<ActionBundleSourceData> = {\r\n removeBundleSource: {\r\n access: API.AccessEnum.QUEUE_EDIT, \r\n displayName: 'Remove source', \r\n icon: IconConstants.REMOVE,\r\n handler: handleRemoveBundleSource,\r\n },\r\n};\r\n\r\n\r\nexport default {\r\n moduleId: UI.Modules.QUEUE,\r\n subId: 'bundleSource',\r\n actions: BundleSourceActions,\r\n};\r\n","import * as React from 'react';\r\n\r\nimport DataProviderDecorator, { DataProviderDecoratorChildProps } from 'decorators/DataProviderDecorator';\r\n\r\nimport QueueBundleSourceActions from 'actions/ui/QueueBundleSourceActions';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport { formatSize, formatSpeed } from 'utils/ValueFormat';\r\n\r\nimport { ActionMenu, UserMenu } from 'components/menu';\r\nimport { UserFileActions } from 'actions/ui/UserActions';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\nimport { TFunction } from 'i18next';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\ninterface SourceProps {\r\n bundle: API.QueueBundle;\r\n source: API.QueueBundleSource;\r\n t: TFunction;\r\n}\r\n\r\nconst Source: React.FC<SourceProps> = ({ source, bundle, t }) => (\r\n <tr>\r\n <td className=\"user dropdown\">\r\n <UserMenu \r\n userIcon={ true }\r\n user={ source.user }\r\n ids={ UserFileActions }\r\n contextElement=\".source.modal\"\r\n remoteMenuId={ MenuConstants.HINTED_USER }\r\n >\r\n <ActionMenu \r\n actions={ QueueBundleSourceActions } \r\n //ids={ [ 'removeBundleSource' ]} \r\n itemData={ {\r\n source,\r\n bundle,\r\n } }\r\n />\r\n </UserMenu>\r\n </td>\r\n <td className=\"hubs\">\r\n { source.user.hub_names }\r\n </td>\r\n <td className=\"speed\">\r\n { source.last_speed > 0 && formatSpeed(source.last_speed, t) }\r\n </td>\r\n <td className=\"files\">\r\n { source.files }\r\n </td>\r\n <td className=\"size\">\r\n { formatSize(source.size, t) }\r\n </td>\r\n </tr>\r\n);\r\n\r\nconst userSort = (a: API.QueueBundleSource, b: API.QueueBundleSource) => a.user.nicks.localeCompare(b.user.nicks);\r\n\r\n\r\ninterface BundleSourceTableProps {\r\n bundle: API.QueueBundle;\r\n queueT: UI.ModuleTranslator;\r\n}\r\n\r\ninterface BundleSourceTableDataProps extends DataProviderDecoratorChildProps {\r\n sources: API.QueueBundleSource[];\r\n}\r\n\r\nconst BundleSourceTable: React.FC<BundleSourceTableProps & BundleSourceTableDataProps> = (\r\n { sources, bundle, queueT }\r\n) => {\r\n const { translate } = queueT;\r\n\r\n return (\r\n <div className=\"sources\">\r\n <h2>{ translate('Sources') }</h2>\r\n <table className=\"ui striped table\">\r\n <thead>\r\n <tr>\r\n <th>{ translate('User') }</th>\r\n <th>{ translate('Hubs') }</th>\r\n <th>{ translate('Last known speed') }</th>\r\n <th>{ translate('Files') }</th>\r\n <th>{ translate('Size') }</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n { sources.sort(userSort).map(source => (\r\n <Source \r\n key={ source.user.cid }\r\n source={ source }\r\n bundle={ bundle! }\r\n t={ queueT.plainT }\r\n />\r\n )) }\r\n </tbody>\r\n </table>\r\n </div>\r\n );\r\n};\r\n\r\nexport default DataProviderDecorator<BundleSourceTableProps, BundleSourceTableDataProps>(BundleSourceTable, {\r\n urls: {\r\n sources: ({ bundle }, socket) => socket.get(`${QueueConstants.BUNDLES_URL}/${bundle!.id}/sources`),\r\n },\r\n onSocketConnected: (addSocketListener, { refetchData, props }) => {\r\n addSocketListener<API.QueueBundle>(QueueConstants.MODULE_URL, QueueConstants.BUNDLE_SOURCES, data => {\r\n // Avoid flickering when there are many bundles running\r\n if (data.id === props.bundle!.id) {\r\n refetchData();\r\n }\r\n });\r\n }\r\n});","import { Component } from 'react';\r\nimport Modal from 'components/semantic/Modal';\r\n\r\nimport ModalRouteDecorator, { ModalRouteDecoratorChildProps } from 'decorators/ModalRouteDecorator';\r\n\r\nimport FileIcon from 'components/icon/FileIcon';\r\n\r\nimport SourceTable from 'routes/Queue/components/BundleSourceTable';\r\nimport DataProviderDecorator, { DataProviderDecoratorChildProps } from 'decorators/DataProviderDecorator';\r\nimport QueueConstants from 'constants/QueueConstants';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\n\r\ninterface BundleSourceDialogProps {\r\n queueT: UI.ModuleTranslator;\r\n}\r\n\r\ninterface DataProps extends DataProviderDecoratorChildProps {\r\n bundle: API.QueueBundle;\r\n}\r\n\r\ninterface RouteProps { \r\n bundleId: string; \r\n}\r\n\r\ntype Props = BundleSourceDialogProps & ModalRouteDecoratorChildProps<RouteProps>;\r\n\r\nclass SourceDialog extends Component<Props & DataProps> {\r\n static displayName = 'SourceDialog';\r\n\r\n render() {\r\n const { bundle, queueT } = this.props;\r\n return (\r\n <Modal \r\n className=\"source\" \r\n title={ bundle.name }\r\n subHeader={ bundle.target }\r\n closable={ true } \r\n icon={ <FileIcon typeInfo={ bundle.type }/> } \r\n fullHeight={ true }\r\n { ...this.props }\r\n >\r\n <SourceTable \r\n bundle={ bundle }\r\n queueT={ queueT }\r\n />\r\n </Modal>\r\n );\r\n }\r\n}\r\n\r\nexport default ModalRouteDecorator<BundleSourceDialogProps, RouteProps>(\r\n DataProviderDecorator<Props, DataProps>(\r\n SourceDialog, {\r\n urls: {\r\n bundle: ({ match }, socket) => socket.get(`${QueueConstants.BUNDLES_URL}/${match.params.bundleId}`),\r\n }\r\n }\r\n ), \r\n 'sources/:bundleId'\r\n);","import * as React from 'react';\r\nimport { Column } from 'fixed-data-table-2';\r\n\r\nimport QueueActions from 'actions/ui/QueueActions';\r\nimport QueueBundleActions from 'actions/ui/QueueBundleActions';\r\nimport VirtualTable from 'components/table/VirtualTable';\r\n\r\nimport PriorityMenu from 'routes/Queue/components/PriorityMenu';\r\nimport StatusCell from 'routes/Queue/components/StatusCell';\r\nimport QueueBundleViewStore from 'stores/QueueBundleViewStore';\r\n\r\nimport BundleFileDialog from 'routes/Queue/components/BundleFileDialog';\r\nimport SourceDialog from 'routes/Queue/components/BundleSourceDialog';\r\n\r\nimport { ActionMenu } from 'components/menu';\r\nimport Message from 'components/semantic/Message';\r\n\r\nimport { \r\n ActionLinkCell, FileActionCell, SizeCell, \r\n SpeedCell, AbbreviatedDurationCell, DurationCell \r\n} from 'components/table/Cell';\r\n\r\nimport '../style.css';\r\nimport { RowWrapperCellChildProps } from 'components/table/RowWrapperCell';\r\n\r\nimport * as API from 'types/api';\r\nimport * as UI from 'types/ui';\r\n\r\nimport { withTranslation, WithTranslation } from 'react-i18next';\r\nimport { getModuleT } from 'utils/TranslationUtils';\r\nimport { setBundlePriority } from 'services/api/QueueApi';\r\nimport IconConstants from 'constants/IconConstants';\r\nimport MenuConstants from 'constants/MenuConstants';\r\n\r\n\r\nconst PriorityCell: React.FC<RowWrapperCellChildProps<API.QueuePriority, API.QueueBundle>> = (\r\n { cellData, rowDataGetter, t }\r\n) => (\r\n <PriorityMenu \r\n itemPrio={ cellData! } \r\n item={ rowDataGetter!() }\r\n prioAction={ setBundlePriority }\r\n t={ t! }\r\n />\r\n);\r\n\r\nclass Queue extends React.Component<WithTranslation> {\r\n static displayName = 'Queue';\r\n\r\n isActive = (cellData: any, rowData: API.QueueBundle) => {\r\n return !rowData.status.downloaded;\r\n }\r\n\r\n isDownloaded = (cellData: any, rowData: API.QueueBundle) => {\r\n return rowData.status.downloaded;\r\n }\r\n\r\n isRunning = (cellData: any, rowData: API.QueueBundle) => {\r\n return rowData.speed > 0;\r\n }\r\n\r\n emptyRowsNodeGetter = () => {\r\n const { t } = this.queueT;\r\n return (\r\n <Message \r\n title={ t('queueEmpty', 'The queue is empty') }\r\n icon={ IconConstants.FILE }\r\n description={ t<string>(\r\n 'queueEmptyDesc', \r\n 'New items can be queued from search or filelists'\r\n ) }\r\n />\r\n );\r\n }\r\n\r\n queueT = getModuleT(this.props.t, UI.Modules.QUEUE);\r\n render() {\r\n const { translate } = this.queueT;\r\n return (\r\n <>\r\n <VirtualTable\r\n emptyRowsNodeGetter={ this.emptyRowsNodeGetter }\r\n store={ QueueBundleViewStore }\r\n footerData={ \r\n <ActionMenu \r\n className=\"top left pointing\"\r\n caption={ translate('Actions...') } \r\n actions={ QueueActions }\r\n header={ translate('Queue actions') } \r\n triggerIcon=\"chevron up\"\r\n button={ true }\r\n />\r\n }\r\n moduleId={ QueueActions.moduleId }\r\n >\r\n <Column\r\n name=\"Name\"\r\n width={200}\r\n flexGrow={4}\r\n columnKey=\"name\"\r\n cell={ \r\n <FileActionCell \r\n actions={ QueueBundleActions }\r\n remoteMenuId={ MenuConstants.QUEUE_BUNDLE }\r\n ids={[ \r\n 'content', 'sources', \r\n 'divider', \r\n 'search', 'searchBundleAlternates',\r\n 'divider', \r\n 'removeBundle', \r\n 'divider', \r\n 'rescan', 'forceShare' \r\n ]}\r\n /> \r\n }\r\n />\r\n <Column\r\n name=\"Size\"\r\n width={60}\r\n columnKey=\"size\"\r\n cell={ <SizeCell/> }\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Type/content\"\r\n width={150}\r\n columnKey=\"type\"\r\n hideWidth={1000}\r\n cell={ \r\n <ActionLinkCell \r\n actions={ QueueBundleActions }\r\n actionId=\"content\"\r\n /> \r\n }\r\n />\r\n <Column\r\n name=\"Status\"\r\n width={120}\r\n flexGrow={3}\r\n columnKey=\"status\"\r\n cell={ <StatusCell/> }\r\n />\r\n <Column\r\n name=\"Sources\"\r\n width={60}\r\n columnKey=\"sources\"\r\n renderCondition={ this.isActive }\r\n flexGrow={1}\r\n cell={ \r\n <ActionLinkCell \r\n actions={ QueueBundleActions }\r\n actionId=\"sources\"\r\n /> \r\n }\r\n />\r\n <Column\r\n name=\"Time left\"\r\n width={50}\r\n columnKey=\"seconds_left\"\r\n renderCondition={ this.isRunning }\r\n cell={ <AbbreviatedDurationCell/> }\r\n />\r\n <Column\r\n name=\"Speed\"\r\n width={50}\r\n columnKey=\"speed\"\r\n cell={ <SpeedCell/> }\r\n renderCondition={ this.isRunning }\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Priority\"\r\n width={80}\r\n columnKey=\"priority\"\r\n renderCondition={ this.isActive }\r\n cell={ <PriorityCell/> }\r\n flexGrow={1}\r\n />\r\n <Column\r\n name=\"Added\"\r\n width={100}\r\n columnKey=\"time_added\"\r\n cell={ <DurationCell/> }\r\n hideWidth={1400}\r\n />\r\n <Column\r\n name=\"Finished\"\r\n width={100}\r\n columnKey=\"time_finished\"\r\n cell={ <DurationCell/> }\r\n renderCondition={ this.isDownloaded }\r\n hideWidth={1200}\r\n />\r\n </VirtualTable>\r\n <SourceDialog queueT={ this.queueT }/>\r\n <BundleFileDialog/>\r\n </>\r\n );\r\n }\r\n}\r\n\r\nexport default withTranslation()(Queue);"],"names":["___CSS_LOADER_EXPORT___","push","module","id","setBundlePriorities","prio","priority","QueueActions","removeCompleted","access","displayName","icon","handler","notifications","onSuccess","divider","pause","resume","moduleId","actions","QueueFileActions","search","data","itemInfo","location","searchFileAlternates","filter","item","time_finished","file","removeFile","confirmation","content","approveCaption","rejectCaption","checkboxCaption","removeFinished","remove_finished","Progress","className","percent","caption","undefined","style","transitionDuration","width","minWidth","propTypes","bundleValidationFailed","bundle","status","itemNotFinished","shareBundle","skipValidation","SocketService","QueueConstants","skip_validation","QueueBundleActions","sources","IconConstants","total","History","pathname","type","SearchActions","searchBundleAlternates","divider2","removeBundle","divider3","rescan","forceShare","PriorityEnum","str","titleClassName","DropdownCaption","PriorityMenu","Component","setPriority","priorityId","prioAction","this","props","t","setAutoPriority","getPriorityListItem","onClose","currentPrio","MenuItemLink","active","onClick","getChildren","children","Object","keys","map","prioKey","itemPrio","auto","shouldComponentUpdate","nextProps","render","toLocaleLowerCase","LoginStore","TableDropdown","getStatusClass","cellData","rowData","completed","statusId","speed","rowDataGetter","failed","downloaded_bytes","size","_viewName","_apiUrl","mixins","ViewStoreMixin","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","PriorityCell","BundleFileTable","isActive","downloaded","isRunning","VirtualTable","store","QueueFileViewStore","sourceFilter","pattern","method","property","Column","name","flexGrow","columnKey","cell","remoteMenuId","MenuConstants","renderCondition","BundleFileDialog","other","Modal","title","subHeader","target","closable","FileIcon","typeInfo","fullHeight","ModalRouteDecorator","DataProviderDecorator","urls","match","socket","get","params","bundleId","BundleSourceActions","removeBundleSource","source","user","cid","subId","Source","userIcon","ids","contextElement","QueueBundleSourceActions","itemData","hub_names","last_speed","files","userSort","a","b","nicks","localeCompare","queueT","translate","sort","plainT","onSocketConnected","addSocketListener","refetchData","SourceDialog","Queue","isDownloaded","emptyRowsNodeGetter","Message","description","QueueBundleViewStore","footerData","header","triggerIcon","button","hideWidth","actionId","withTranslation"],"sourceRoot":""}