Compare commits
1
Commits
v1.2.1
...
4c71861813
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c71861813 |
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tallynote",
|
"name": "tallynote",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@9.0.6",
|
"packageManager": "pnpm@9.0.6",
|
||||||
|
|||||||
@@ -450,7 +450,8 @@ export default function UpdatePage({
|
|||||||
|
|
||||||
// Start download action
|
// Start download action
|
||||||
const startDownload = async () => {
|
const startDownload = async () => {
|
||||||
if (!latest) return;
|
if (!latest || actionInFlight.current || hasActiveJob || canApply) return;
|
||||||
|
actionInFlight.current = true;
|
||||||
setActionBusy(true);
|
setActionBusy(true);
|
||||||
setError("");
|
setError("");
|
||||||
setModalError("");
|
setModalError("");
|
||||||
@@ -469,12 +470,14 @@ export default function UpdatePage({
|
|||||||
notify?.(msg, "error");
|
notify?.(msg, "error");
|
||||||
} finally {
|
} finally {
|
||||||
setActionBusy(false);
|
setActionBusy(false);
|
||||||
|
actionInFlight.current = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Start apply action
|
// Start apply action
|
||||||
const startApply = async () => {
|
const startApply = async () => {
|
||||||
if (!latest) return;
|
if (!latest || !job || job.status !== "staged" || job.operation !== "download" || actionInFlight.current) return;
|
||||||
|
actionInFlight.current = true;
|
||||||
setActionBusy(true);
|
setActionBusy(true);
|
||||||
setError("");
|
setError("");
|
||||||
setModalError("");
|
setModalError("");
|
||||||
@@ -492,6 +495,7 @@ export default function UpdatePage({
|
|||||||
notify?.(msg, "error");
|
notify?.(msg, "error");
|
||||||
} finally {
|
} finally {
|
||||||
setActionBusy(false);
|
setActionBusy(false);
|
||||||
|
actionInFlight.current = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user