mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-19 18:41:00 +08:00
🎨 add rename icon
This commit is contained in:
parent
bb3518b01e
commit
ced5995d2e
@ -758,6 +758,7 @@ export const renameMenu = (options: {
|
||||
}) => {
|
||||
return new MenuItem({
|
||||
accelerator: window.siyuan.config.keymap.editor.general.rename.custom,
|
||||
icon: "iconEdit",
|
||||
label: window.siyuan.languages.rename,
|
||||
click: () => {
|
||||
rename(options);
|
||||
|
@ -795,6 +795,7 @@ export const imgMenu = (protyle: IProtyle, range: Range, assetElement: HTMLEleme
|
||||
if (imagePath.startsWith("assets/")) {
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.rename,
|
||||
icon: "iconEdit",
|
||||
click() {
|
||||
renameAsset(imagePath);
|
||||
}
|
||||
@ -1032,6 +1033,7 @@ export const linkMenu = (protyle: IProtyle, linkElement: HTMLElement, focusText
|
||||
if (linkAddress?.startsWith("assets/")) {
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.rename,
|
||||
icon: "iconEdit",
|
||||
click() {
|
||||
renameAsset(linkAddress);
|
||||
}
|
||||
@ -1181,6 +1183,7 @@ export const tagMenu = (protyle: IProtyle, tagElement: HTMLElement) => {
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.rename,
|
||||
icon: "iconEdit",
|
||||
click() {
|
||||
renameTag(tagElement.textContent.replace(Constants.ZWSP, ""));
|
||||
}
|
||||
@ -1330,6 +1333,7 @@ export const videoMenu = (protyle: IProtyle, nodeElement: Element, type: string)
|
||||
});
|
||||
subMenus.push({
|
||||
label: window.siyuan.languages.rename,
|
||||
icon: "iconEdit",
|
||||
click() {
|
||||
renameAsset(src);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user