Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05a679c2c8 | ||
|
|
23e2f9c5e7 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tallynote",
|
"name": "tallynote",
|
||||||
"version": "1.1.39",
|
"version": "1.1.41",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@9.0.6",
|
"packageManager": "pnpm@9.0.6",
|
||||||
|
|||||||
@@ -84,12 +84,22 @@ export function triggerInProcessDownload(
|
|||||||
try {
|
try {
|
||||||
const currentRelease = realpathSync(config.currentLink);
|
const currentRelease = realpathSync(config.currentLink);
|
||||||
if (currentRelease) {
|
if (currentRelease) {
|
||||||
const fsPromises = await import("node:fs/promises");
|
|
||||||
for (const entry of ["node_modules", "runtime", "pnpm-lock.yaml"] as const) {
|
for (const entry of ["node_modules", "runtime", "pnpm-lock.yaml"] as const) {
|
||||||
const source = path.join(currentRelease, entry);
|
const source = path.join(currentRelease, entry);
|
||||||
|
const target = path.join(stagedDir, entry);
|
||||||
|
let copied = false;
|
||||||
|
try {
|
||||||
|
const { execFile } = await import("node:child_process");
|
||||||
|
const { promisify } = await import("node:util");
|
||||||
|
await promisify(execFile)("cp", ["-a", source, target]);
|
||||||
|
copied = true;
|
||||||
|
} catch {}
|
||||||
|
if (!copied) {
|
||||||
|
const fsPromises = await import("node:fs/promises");
|
||||||
const sourceInfo = await fsPromises.lstat(source).catch(() => null);
|
const sourceInfo = await fsPromises.lstat(source).catch(() => null);
|
||||||
if (sourceInfo && !sourceInfo.isSymbolicLink()) {
|
if (sourceInfo && !sourceInfo.isSymbolicLink()) {
|
||||||
await fsPromises.cp(source, path.join(stagedDir, entry), { recursive: sourceInfo.isDirectory(), errorOnExist: true, force: false }).catch(() => {});
|
await fsPromises.cp(source, target, { recursive: sourceInfo.isDirectory(), errorOnExist: true, force: false }).catch(() => {});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -731,28 +731,6 @@ export default function UpdatePage({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ marginTop: 14, padding: "10px 14px", background: "var(--tn-navy-50)", border: "1px solid var(--tn-navy-100)", borderRadius: 6, display: "flex", alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: 8, fontSize: "12.5px" }}>
|
|
||||||
<div style={{ display: "flex", flexDirection: "column", gap: 2, minWidth: 260, flex: 1 }}>
|
|
||||||
<span style={{ color: "var(--tn-navy-800)", fontWeight: 500 }}>
|
|
||||||
安装包下载直链 ({latest.assetName || "发布包"}):
|
|
||||||
</span>
|
|
||||||
<code style={{ fontSize: "11.5px", color: "var(--tn-navy-600)", wordBreak: "break-all" }}>
|
|
||||||
{latest.assetUrl || `https://git.awaioi.com/awaioi/TallyNote/releases/download/v${latest.version}/${latest.assetName || `tallynote-${latest.version}-linux-x64-glibc.tar.gz`}`}
|
|
||||||
</code>
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
size="small"
|
|
||||||
variant="outline"
|
|
||||||
onClick={() => {
|
|
||||||
const url = latest.assetUrl || `https://git.awaioi.com/awaioi/TallyNote/releases/download/v${latest.version}/${latest.assetName || `tallynote-${latest.version}-linux-x64-glibc.tar.gz`}`;
|
|
||||||
navigator.clipboard.writeText(url);
|
|
||||||
notify?.("已复制安装包下载直链", "success");
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
复制直链
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="tn-ascii-release-actions">
|
<div className="tn-ascii-release-actions">
|
||||||
{canDownload && (
|
{canDownload && (
|
||||||
<Button
|
<Button
|
||||||
@@ -900,9 +878,7 @@ export default function UpdatePage({
|
|||||||
{job?.status === "downloading" && (
|
{job?.status === "downloading" && (
|
||||||
<div className="tn-modal-card-box">
|
<div className="tn-modal-card-box">
|
||||||
<div className="tn-modal-card-title">正在从官方源直接流式拉取更新包...</div>
|
<div className="tn-modal-card-title">正在从官方源直接流式拉取更新包...</div>
|
||||||
<div style={{ fontSize: "12px", color: "var(--tn-navy-600)", margin: "-4px 0 12px 0", wordBreak: "break-all" }}>
|
|
||||||
请求地址: <code>{job.assetUrl || latest?.assetUrl || `https://git.awaioi.com/awaioi/TallyNote/releases/download/v${latest?.version || job.version}/${job.assetName || "release.tar.gz"}`}</code>
|
|
||||||
</div>
|
|
||||||
<div
|
<div
|
||||||
className="tn-progress-stream"
|
className="tn-progress-stream"
|
||||||
role="progressbar"
|
role="progressbar"
|
||||||
@@ -944,9 +920,7 @@ export default function UpdatePage({
|
|||||||
<div className="tn-modal-card-title">
|
<div className="tn-modal-card-title">
|
||||||
<div style={{ marginBottom: 12 }}><BeamBar width={160} /></div>正在建立与官方 Git 仓库的流式传输连接...
|
<div style={{ marginBottom: 12 }}><BeamBar width={160} /></div>正在建立与官方 Git 仓库的流式传输连接...
|
||||||
</div>
|
</div>
|
||||||
<div style={{ fontSize: "12px", color: "var(--tn-navy-600)", margin: "4px 0 14px 0", wordBreak: "break-all" }}>
|
|
||||||
目标地址: <code>{job.assetUrl || latest?.assetUrl || "https://git.awaioi.com"}</code>
|
|
||||||
</div>
|
|
||||||
<div className="tn-modal-actions-bar">
|
<div className="tn-modal-actions-bar">
|
||||||
<Button variant="outline" onClick={() => void cancelJob()} loading={cancelling} disabled={cancelling}>
|
<Button variant="outline" onClick={() => void cancelJob()} loading={cancelling} disabled={cancelling}>
|
||||||
取消
|
取消
|
||||||
@@ -955,6 +929,22 @@ export default function UpdatePage({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* 场景 B2: 校验与环境就绪中 (verifying) */}
|
||||||
|
{job?.status === "verifying" && (
|
||||||
|
<div className="tn-modal-card-box">
|
||||||
|
<div className="tn-modal-card-title">
|
||||||
|
<div style={{ marginBottom: 12 }}><BeamBar width={180} /></div>
|
||||||
|
正在比对安全指纹并解压更新包...
|
||||||
|
</div>
|
||||||
|
<div style={{ fontSize: "14px", color: "var(--tn-navy-900)", margin: "10px 0 8px", fontWeight: 500 }}>
|
||||||
|
SHA-256 指纹核验通过,正在将生产环境就绪至版本暂存区...
|
||||||
|
</div>
|
||||||
|
<p className="text-secondary" style={{ fontSize: "13px", margin: "0 0 16px 0", lineHeight: 1.6 }}>
|
||||||
|
系统正在核对发布包完整性与解压 dist 生产运行结构,校验就绪后将立即亮起“立即应用”按钮。
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* 场景 C: 校验通过准备就绪 (staged) (Exact ASCII) */}
|
{/* 场景 C: 校验通过准备就绪 (staged) (Exact ASCII) */}
|
||||||
{job?.status === "staged" && (
|
{job?.status === "staged" && (
|
||||||
<div className="tn-modal-card-box">
|
<div className="tn-modal-card-box">
|
||||||
|
|||||||
Reference in New Issue
Block a user