cicy-desktop 2.1.159 → 2.1.161

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.
@@ -745,7 +745,7 @@ export default function App() {
745
745
 
746
746
  // Logged in: unified tabs + cards grid on the left, full-height webview
747
747
  // drawer on the right.
748
- // The Docker-版 cicy-code on :8009 has its own dedicated <DockerCard> (right of
748
+ // The Docker-版 cicy-code on :8008 has its own dedicated <DockerCard> (right of
749
749
  // the local card), so pull it out of the generic node list — else it'd ALSO
750
750
  // render as a 自定义 card (the bootstrap registers it as a team for the
751
751
  // token-injected 打开/刷新 flow).
@@ -869,7 +869,7 @@ export default function App() {
869
869
  // (主人: 必须拿到 token 才能打开,否则被卡在登录页).
870
870
  try {
871
871
  const r = await window.cicy?.docker?.appOpen?.();
872
- if (!r?.ok) window.alert("拿不到容器 token,无法打开 :8009。请确认服务已就绪(或用卡片菜单「重启」)后再试。");
872
+ if (!r?.ok) window.alert("拿不到容器 token,无法打开 :8008。请确认服务已就绪(或用卡片菜单「重启」)后再试。");
873
873
  } catch (e) { console.warn("[DockerCard] open", e); }
874
874
  }}
875
875
  cloudTitle={dockerCloudTeam?.title}
@@ -1691,7 +1691,7 @@ function DockerInstallDrawerHost() {
1691
1691
  </span>
1692
1692
  <div>
1693
1693
  <div className="drawer__h">{tr("docker.setupTitle", "安装 Docker cicy-code")}</div>
1694
- <div className="drawer__sub">127.0.0.1:8009</div>
1694
+ <div className="drawer__sub">127.0.0.1:8008</div>
1695
1695
  </div>
1696
1696
  </div>
1697
1697
  <div className="drawer__headbtns">
@@ -1770,7 +1770,7 @@ function DockerInstallDrawerHost() {
1770
1770
  }
1771
1771
 
1772
1772
  // Docker-版 cicy-code card (Windows only): a SECOND cicy-code instance running
1773
- // in Docker on :8009, alongside the native local daemon (:8008). If Docker
1773
+ // in Docker on :8008, alongside the native local daemon (:8008). If Docker
1774
1774
  // Desktop is missing, the install flow downloads its installer to the user's
1775
1775
  // Desktop and runs it (主人指令), streaming progress through the drawer above.
1776
1776
  function DockerCard({ dockerTeam, cloudTitle, onOpen, onRename, onRefresh }) {
@@ -1782,8 +1782,8 @@ function DockerCard({ dockerTeam, cloudTitle, onOpen, onRename, onRefresh }) {
1782
1782
  const [editing, setEditing] = useState(false);
1783
1783
  const [draft, setDraft] = useState("");
1784
1784
  // 标题 = 云端 team 的 title(和其它团队同一套;refreshCloudTeams 周期刷新 → 自动跟随
1785
- // 云端改名)。还没建好云端 team 时回退 "Docker 团队"。
1786
- const displayName = cloudTitle || "Docker 团队";
1785
+ // 云端改名)。还没建好云端 team 时回退 "本地团队"(docker-only:这就是本地团队卡)
1786
+ const displayName = cloudTitle || "本地团队";
1787
1787
  const startEdit = (e) => { e?.stopPropagation?.(); setDraft(displayName); setEditing(true); };
1788
1788
  const commitName = async () => {
1789
1789
  setEditing(false);
@@ -1917,7 +1917,7 @@ function DockerCard({ dockerTeam, cloudTitle, onOpen, onRename, onRefresh }) {
1917
1917
  if (platform !== "win32" && platform !== "darwin") return null;
1918
1918
 
1919
1919
  // Distinct states (主人: 状态分清楚):
1920
- // running — :8009 container healthy → 打开
1920
+ // running — :8008 container healthy → 打开
1921
1921
  // dockerRunning — engine up, no container → 启动 (build/start container)
1922
1922
  // installed — Docker on disk but engine down → 启动 Docker
1923
1923
  // else — not installed → 下载安装
@@ -1959,10 +1959,10 @@ function DockerCard({ dockerTeam, cloudTitle, onOpen, onRename, onRefresh }) {
1959
1959
  const onCta = async () => {
1960
1960
  if (isBusy) return;
1961
1961
  if (running) {
1962
- // 主人令:打开很慢 → 先探这个 :8009 tab 开过没。开过(openedWc 里有它的
1962
+ // 主人令:打开很慢 → 先探这个 :8008 tab 开过没。开过(openedWc 里有它的
1963
1963
  // webContentsId)就**直接 active 秒切**,不再拿 token / 注册 team(那是慢的根)。
1964
1964
  try {
1965
- const r = await window.cicy?.tabs?.activateIfOpen?.("http://127.0.0.1:8009");
1965
+ const r = await window.cicy?.tabs?.activateIfOpen?.("http://127.0.0.1:8008");
1966
1966
  if (r?.active) return;
1967
1967
  } catch {}
1968
1968
  // 没开过 → 显示 loading(打开中…),走慢路径:拿容器 token 再开 tab。
@@ -2021,7 +2021,7 @@ function DockerCard({ dockerTeam, cloudTitle, onOpen, onRename, onRefresh }) {
2021
2021
  {tr("docker.update", "更新")}
2022
2022
  </button>
2023
2023
  <button type="button" data-id="DockerCard-reload" className="bcard__menu-item"
2024
- onClick={(e) => { e.stopPropagation(); setMenuOpen(false); window.cicy?.tabs?.reloadIfOpen?.("http://127.0.0.1:8009", "Docker 团队"); }}>
2024
+ onClick={(e) => { e.stopPropagation(); setMenuOpen(false); window.cicy?.tabs?.reloadIfOpen?.("http://127.0.0.1:8008", displayName); }}>
2025
2025
  {tr("docker.reloadWindow", "刷新窗口")}
2026
2026
  </button>
2027
2027
  <button type="button" data-id="DockerCard-restart" className="bcard__menu-item"
@@ -2047,8 +2047,8 @@ function DockerCard({ dockerTeam, cloudTitle, onOpen, onRename, onRefresh }) {
2047
2047
  <button type="button" data-id="DockerCard-addr" className="bcard__menu-item"
2048
2048
  title={tr("localTeams.copyAddr", "点击复制地址")}
2049
2049
  style={{ whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}
2050
- onClick={(e) => { e.stopPropagation(); setMenuOpen(false); try { navigator.clipboard.writeText("http://127.0.0.1:8009"); } catch {} }}>
2051
- http://127.0.0.1:8009
2050
+ onClick={(e) => { e.stopPropagation(); setMenuOpen(false); try { navigator.clipboard.writeText("http://127.0.0.1:8008"); } catch {} }}>
2051
+ http://127.0.0.1:8008
2052
2052
  </button>
2053
2053
  </div>,
2054
2054
  document.body
@@ -2057,7 +2057,7 @@ function DockerCard({ dockerTeam, cloudTitle, onOpen, onRename, onRefresh }) {
2057
2057
  )}
2058
2058
  </div>
2059
2059
  <div className="bcard__body">
2060
- {/* 8009 现在有独立云端 team(cloud_team_id 是它自己的,不再和 8008 串),所以
2060
+ {/* 8008 现在有独立云端 team(cloud_team_id 是它自己的,不再和 8008 串),所以
2061
2061
  标题可改名:本地节点名 + 云端 PATCH 双写(onRename 在父组件处理)。 */}
2062
2062
  <div style={{ height: 28, display: "flex", alignItems: "center" }}>
2063
2063
  {editing ? (
@@ -2532,13 +2532,13 @@ function isLocalSidecar(baseUrl) {
2532
2532
  } catch { return false; }
2533
2533
  }
2534
2534
 
2535
- // The Docker-版 cicy-code instance — localhost:8009. Owned by <DockerCard>, so
2535
+ // The Docker-版 cicy-code instance — localhost:8008. Owned by <DockerCard>, so
2536
2536
  // it's filtered out of the generic node lists.
2537
2537
  function isDockerApp(baseUrl) {
2538
2538
  try {
2539
2539
  const p = new URL(baseUrl);
2540
2540
  const local = p.hostname === "127.0.0.1" || p.hostname === "localhost" || p.hostname === "::1";
2541
- return local && p.port === "8009";
2541
+ return local && p.port === "8008";
2542
2542
  } catch { return false; }
2543
2543
  }
2544
2544