@linxin666/dsh-remote-web-ui 0.2.4 → 0.2.6

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 (90) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +148 -77
  3. package/README.zh.md +32 -26
  4. package/lib/client.js +603 -68
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +667 -32
  7. package/lib/mobile.js +3 -1
  8. package/lib/mobile.js.map +1 -1
  9. package/lib/types/client/FenceNotice.d.ts +21 -0
  10. package/lib/types/client/FenceNotice.d.ts.map +1 -0
  11. package/lib/types/client/FenceNotice.js +10 -0
  12. package/lib/types/client/RemoteEntry.d.ts.map +1 -1
  13. package/lib/types/client/RemoteEntry.js +18 -11
  14. package/lib/types/client/RemotePanel.d.ts +10 -4
  15. package/lib/types/client/RemotePanel.d.ts.map +1 -1
  16. package/lib/types/client/RemotePanel.js +7 -6
  17. package/lib/types/client/RemoteSettingsCard.d.ts +4 -0
  18. package/lib/types/client/RemoteSettingsCard.d.ts.map +1 -1
  19. package/lib/types/client/RemoteSettingsCard.js +3 -1
  20. package/lib/types/client/device-name.d.ts +3 -0
  21. package/lib/types/client/device-name.d.ts.map +1 -0
  22. package/lib/types/client/device-name.js +30 -0
  23. package/lib/types/client/index.d.ts.map +1 -1
  24. package/lib/types/client/index.js +48 -0
  25. package/lib/types/client/locales.d.ts +51 -1
  26. package/lib/types/client/locales.d.ts.map +1 -1
  27. package/lib/types/client/locales.js +79 -29
  28. package/lib/types/client/pair-api.d.ts +35 -0
  29. package/lib/types/client/pair-api.d.ts.map +1 -1
  30. package/lib/types/client/pair-api.js +39 -0
  31. package/lib/types/client/remote-channel.d.ts +93 -0
  32. package/lib/types/client/remote-channel.d.ts.map +1 -0
  33. package/lib/types/client/remote-channel.js +246 -0
  34. package/lib/types/dsh-home.d.ts +17 -0
  35. package/lib/types/dsh-home.d.ts.map +1 -0
  36. package/lib/types/dsh-home.js +34 -0
  37. package/lib/types/gate.d.ts.map +1 -1
  38. package/lib/types/gate.js +5 -2
  39. package/lib/types/index.d.ts +19 -12
  40. package/lib/types/index.d.ts.map +1 -1
  41. package/lib/types/index.js +73 -5
  42. package/lib/types/loopback-proxy.d.ts +28 -0
  43. package/lib/types/loopback-proxy.d.ts.map +1 -0
  44. package/lib/types/loopback-proxy.js +112 -0
  45. package/lib/types/mobile/views/SessionListView.d.ts.map +1 -1
  46. package/lib/types/mobile/views/SessionListView.js +6 -1
  47. package/lib/types/mobile-api.d.ts.map +1 -1
  48. package/lib/types/mobile-api.js +6 -2
  49. package/lib/types/mobile-routes.js +1 -1
  50. package/lib/types/pairing.d.ts +63 -11
  51. package/lib/types/pairing.d.ts.map +1 -1
  52. package/lib/types/pairing.js +137 -20
  53. package/lib/types/pairing.persist.test.js +60 -5
  54. package/lib/types/posture.d.ts +75 -0
  55. package/lib/types/posture.d.ts.map +1 -0
  56. package/lib/types/posture.js +116 -0
  57. package/lib/types/remote-api.d.ts +60 -0
  58. package/lib/types/remote-api.d.ts.map +1 -0
  59. package/lib/types/remote-api.js +181 -0
  60. package/lib/types/remote-methods.d.ts +33 -0
  61. package/lib/types/remote-methods.d.ts.map +1 -0
  62. package/lib/types/remote-methods.js +54 -0
  63. package/lib/types/routes.d.ts +4 -0
  64. package/lib/types/routes.d.ts.map +1 -1
  65. package/lib/types/routes.js +33 -4
  66. package/package.json +2 -2
  67. package/src/client/FenceNotice.tsx +43 -0
  68. package/src/client/RemoteEntry.tsx +19 -9
  69. package/src/client/RemotePanel.tsx +83 -10
  70. package/src/client/RemoteSettingsCard.tsx +16 -0
  71. package/src/client/device-name.ts +31 -0
  72. package/src/client/index.ts +46 -0
  73. package/src/client/locales.ts +79 -29
  74. package/src/client/pair-api.ts +60 -0
  75. package/src/client/remote-channel.ts +269 -0
  76. package/src/client/remote.module.css +240 -16
  77. package/src/client/settings-card.module.css +2 -0
  78. package/src/dsh-home.ts +36 -0
  79. package/src/gate.ts +5 -2
  80. package/src/index.ts +89 -17
  81. package/src/loopback-proxy.ts +126 -0
  82. package/src/mobile/views/SessionListView.tsx +6 -1
  83. package/src/mobile-api.ts +6 -2
  84. package/src/mobile-routes.ts +1 -1
  85. package/src/pairing.persist.test.ts +64 -5
  86. package/src/pairing.ts +167 -20
  87. package/src/posture.ts +154 -0
  88. package/src/remote-api.ts +217 -0
  89. package/src/remote-methods.ts +62 -0
  90. package/src/routes.ts +33 -4
package/lib/mobile.js CHANGED
@@ -14920,6 +14920,7 @@ function SessionListView({ workspace, onBack, onPick }) {
14920
14920
  const [presetsLoading, setPresetsLoading] = (0, import_react.useState)(true);
14921
14921
  const cursorRef = (0, import_react.useRef)(void 0);
14922
14922
  const busyRef = (0, import_react.useRef)(false);
14923
+ const workspaceRef = (0, import_react.useRef)(workspace);
14923
14924
  (0, import_react.useEffect)(() => {
14924
14925
  let cancelled = false;
14925
14926
  setLoading(true);
@@ -14927,6 +14928,7 @@ function SessionListView({ workspace, onBack, onPick }) {
14927
14928
  Promise.all([listSessions(), listWorkspaces()]).then(([page, workspaces]) => {
14928
14929
  if (cancelled) return;
14929
14930
  const current = workspaces.find((candidate) => candidate.workspaceId === workspace.workspaceId) ?? workspace;
14931
+ workspaceRef.current = current;
14930
14932
  setRows(ownedItems(page.items, current));
14931
14933
  cursorRef.current = page.nextCursor;
14932
14934
  setHasMore(page.hasMore);
@@ -14971,7 +14973,7 @@ function SessionListView({ workspace, onBack, onPick }) {
14971
14973
  setLoading(false);
14972
14974
  cursorRef.current = page.nextCursor;
14973
14975
  setHasMore(page.hasMore);
14974
- setRows((previous) => [...previous, ...ownedItems(page.items, workspace)]);
14976
+ setRows((previous) => [...previous, ...ownedItems(page.items, workspaceRef.current)]);
14975
14977
  }, (reason) => {
14976
14978
  busyRef.current = false;
14977
14979
  setLoading(false);