Skip to content

Commit

Permalink
🎨 siyuan-note#12497 只有本地 assets/ 开头的允许重命名
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Nov 4, 2024
1 parent 38b611e commit c79ae40
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/src/protyle/render/av/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,16 @@ ${window.siyuan.languages.title}
});
}
});
menu.addItem({
label: window.siyuan.languages.rename,
icon: "iconEdit",
click() {
renameAsset(linkAddress);
document.querySelector(".av__panel")?.remove();
}
});
if (linkAddress?.startsWith("assets/")) {
menu.addItem({
label: window.siyuan.languages.rename,
icon: "iconEdit",
click() {
renameAsset(linkAddress);
document.querySelector(".av__panel")?.remove();
}
});
}
menu.addSeparator();
if (type !== "file") {
menu.addItem({
Expand Down

0 comments on commit c79ae40

Please sign in to comment.