Harden auth/vault path sanitization and clean WeKnora docs
This commit is contained in:
@@ -1966,7 +1966,7 @@ function startTreeShellRuntime() {
|
||||
const message = error instanceof Error ? error.message : "创建页面失败";
|
||||
setStatus(message, "error");
|
||||
setLastAction("创建页面失败", "error");
|
||||
window.alert(message);
|
||||
await window.mnote.alert(message);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2040,7 +2040,7 @@ function startTreeShellRuntime() {
|
||||
setLastAction("重命名失败", "error");
|
||||
inlineRenameState = { mode: null, id: null, committing: false };
|
||||
renderTree();
|
||||
window.alert(message);
|
||||
await window.mnote.alert(message);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2071,7 +2071,7 @@ function startTreeShellRuntime() {
|
||||
const item = itemById.get(nodeId);
|
||||
if (!item) return;
|
||||
const siblings = getSiblings(item.parentNodeId);
|
||||
const currentIndex = siblings.findIndex((entry) => entry.nodeId === nodeId);
|
||||
const currentIndex = siblings.findIndex(entry) => entry.nodeId === nodeId);
|
||||
if (currentIndex === -1) return;
|
||||
const nextIndex = currentIndex + delta;
|
||||
if (nextIndex < 0 || nextIndex >= siblings.length) return;
|
||||
@@ -2099,7 +2099,7 @@ function startTreeShellRuntime() {
|
||||
const message = error instanceof Error ? error.message : "移动页面失败";
|
||||
setStatus(message, "error");
|
||||
setLastAction("移动页面失败", "error");
|
||||
window.alert(message);
|
||||
await window.mnote.alert(message);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2108,7 +2108,7 @@ function startTreeShellRuntime() {
|
||||
const targetItem = itemById.get(targetNodeId);
|
||||
if (!sourceItem || !targetItem) return;
|
||||
const siblings = getSiblings(targetItem.parentNodeId);
|
||||
const targetIndex = siblings.findIndex((entry) => entry.nodeId === targetNodeId);
|
||||
const targetIndex = siblings.findIndex(entry) => entry.nodeId === targetNodeId);
|
||||
if (targetIndex < 0) return;
|
||||
try {
|
||||
const result = await sendCommand({
|
||||
@@ -2134,7 +2134,7 @@ function startTreeShellRuntime() {
|
||||
const message = error instanceof Error ? error.message : "拖拽移动失败";
|
||||
setStatus(message, "error");
|
||||
setLastAction("拖拽移动失败", "error");
|
||||
window.alert(message);
|
||||
await window.mnote.alert(message);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user