💄 add icon
This commit is contained in:
parent
5e3aefa793
commit
1a4b3f41a8
4 changed files with 8 additions and 5 deletions
|
@ -297,6 +297,7 @@ export const initNavigationMenu = (app: App, liElement: HTMLElement) => {
|
|||
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
|
||||
/// #if !BROWSER
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
icon: "iconFolder",
|
||||
label: window.siyuan.languages.showInFolder,
|
||||
click: () => {
|
||||
shell.openPath(path.join(window.siyuan.config.system.dataDir, notebookId));
|
||||
|
|
|
@ -113,6 +113,7 @@ export const openEditorTab = (app: App, id: string, notebookId?: string, pathStr
|
|||
/// #if !BROWSER
|
||||
openSubmenus.push({type: "separator"});
|
||||
openSubmenus.push({
|
||||
icon: "iconFolder",
|
||||
label: window.siyuan.languages.showInFolder,
|
||||
click: () => {
|
||||
if (notebookId) {
|
||||
|
|
|
@ -85,7 +85,7 @@ export const workspaceMenu = (app: App, rect: DOMRect) => {
|
|||
label: `${window.siyuan.languages.new} / ${window.siyuan.languages.openBy}`,
|
||||
iconHTML: "",
|
||||
click: async () => {
|
||||
const localPath = await ipcRenderer.invoke(Constants.SIYUAN_GET,{
|
||||
const localPath = await ipcRenderer.invoke(Constants.SIYUAN_GET, {
|
||||
cmd: "showOpenDialog",
|
||||
defaultPath: window.siyuan.config.system.homeDir,
|
||||
properties: ["openDirectory", "createDirectory"],
|
||||
|
@ -445,26 +445,26 @@ const workspaceItem = (item: IWorkspace) => {
|
|||
iconHTML: Constants.ZWSP,
|
||||
type: "submenu",
|
||||
submenu: [{
|
||||
iconHTML: Constants.ZWSP,
|
||||
icon: "iconOpenWindow",
|
||||
label: window.siyuan.languages.openBy,
|
||||
click() {
|
||||
openWorkspace(item.path);
|
||||
}
|
||||
}, {
|
||||
iconHTML: Constants.ZWSP,
|
||||
icon: "iconFolder",
|
||||
label: window.siyuan.languages.showInFolder,
|
||||
click() {
|
||||
showFileInFolder(item.path);
|
||||
}
|
||||
}, {
|
||||
iconHTML: Constants.ZWSP,
|
||||
icon: "iconCopy",
|
||||
label: window.siyuan.languages.copyPath,
|
||||
click() {
|
||||
writeText(item.path);
|
||||
showMessage(window.siyuan.languages.copied);
|
||||
}
|
||||
}, {
|
||||
iconHTML: Constants.ZWSP,
|
||||
icon: "iconTrashcan",
|
||||
label: window.siyuan.languages.removeWorkspaceTip,
|
||||
click() {
|
||||
fetchPost("/api/system/removeWorkspaceDir", {path: item.path});
|
||||
|
|
|
@ -208,6 +208,7 @@ export const openTitleMenu = (protyle: IProtyle, position: IPosition) => {
|
|||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
icon: "iconFolder",
|
||||
label: window.siyuan.languages.showInFolder,
|
||||
click: () => {
|
||||
showFileInFolder(path.join(window.siyuan.config.system.dataDir, protyle.notebookId, protyle.path));
|
||||
|
|
Loading…
Add table
Reference in a new issue