@celljs/ta-sync 4.15.0 → 4.15.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 (2) hide show
  1. package/package.json +4 -4
  2. package/web/index.js +9 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celljs/ta-sync",
3
- "version": "4.15.0",
3
+ "version": "4.15.1",
4
4
  "description": "A pi package for Ta: the user's settings, instructions, skills, extensions and the data extensions declare, the same on each of their computers, through a room of the relay sealed end to end, without an account",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -26,9 +26,9 @@
26
26
  "watch": "tsc -b -w --preserveWatchOutput"
27
27
  },
28
28
  "devDependencies": {
29
- "@celljs/ta-protocol": "4.15.0",
30
- "@celljs/ta-relay": "4.15.0",
31
- "@celljs/ta-web": "4.15.0",
29
+ "@celljs/ta-protocol": "4.15.1",
30
+ "@celljs/ta-relay": "4.15.1",
31
+ "@celljs/ta-web": "4.15.1",
32
32
  "@types/react": "^19.3.0"
33
33
  },
34
34
  "publishConfig": {
package/web/index.js CHANGED
@@ -1869,6 +1869,7 @@ function DeviceRow({ pi, store, device, owner }) {
1869
1869
  if (device.owner) {
1870
1870
  parts.push(words.owner);
1871
1871
  }
1872
+ const [removing, start] = useBusy(pi.ui);
1872
1873
  const remove = async () => {
1873
1874
  if (await pi.ui.confirm(SyncWords.format(words.removeConfirm, { name: device.name }))) {
1874
1875
  await store.call("removeDevice", device.member);
@@ -1890,9 +1891,13 @@ function DeviceRow({ pi, store, device, owner }) {
1890
1891
  className: `tsy-dot${device.online ? " tsy-on" : ""}`
1891
1892
  }), /* @__PURE__ */ React.createElement("span", null, parts.join(" · ")))), owner && !device.self && /* @__PURE__ */ React.createElement("button", {
1892
1893
  type: "button",
1893
- className: "tsy-link tsy-danger",
1894
- onClick: () => void remove().catch((error) => pi.ui.notify(message2(error), "error"))
1895
- }, words.remove));
1894
+ className: `tsy-link tsy-danger${removing ? " ta-busy" : ""}`,
1895
+ "aria-busy": removing || undefined,
1896
+ disabled: removing,
1897
+ onClick: () => void start(() => remove().catch((error) => pi.ui.notify(message2(error), "error")))
1898
+ }, removing && /* @__PURE__ */ React.createElement("span", {
1899
+ className: "ta-spinner ta-busy-mark"
1900
+ }), /* @__PURE__ */ React.createElement("span", null, words.remove)));
1896
1901
  }
1897
1902
  function Status({ pi, status }) {
1898
1903
  const words = useWords2(pi);
@@ -2208,6 +2213,7 @@ var STYLE = `
2208
2213
  .tsy-link { padding: 2px 4px; border: 0; border-radius: 6px; background: none; color: var(--ta-link); font: inherit; font-size: calc(12px * var(--ta-font-scale)); cursor: pointer; }
2209
2214
  .tsy-link:hover { background: var(--ta-hover); }
2210
2215
  .tsy-link.tsy-danger { color: var(--ta-red); }
2216
+ .tsy-link.ta-busy { position: relative; }
2211
2217
  .tsy-dialog { display: flex; flex-direction: column; gap: 14px; width: min(400px, calc(100vw - 48px)); }
2212
2218
  .tsy-dialog .tsy-qr { width: 200px; }
2213
2219
  .tsy-dialog .tsy-link-box { max-height: 3.4em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-all; }