fixes #4 : removed repetitve varibales
Anmol Gupta committed
Oct 3, 2022 at 11:49 UTC
18d0ebccb02a43cd024f80a0f4b54173431c3f92
3 files changed
+3
-9
src/components/Content/Editor/TabMenu.svelte
+1
-3
@@ -46,9 +46,7 @@
46
<span slot="labelText" title={filepath}>Copy Absolute Path</span>
47
</ContextMenuOption>
48
<ContextMenuOption labelText="Show in Explorer" on:click={() => {
49
- let dir = filepath.split(path.sep);
50
- let explorerPath = dir.join(path.sep);
51
- invoke("open_in_explorer",{ path:explorerPath})
49
+ invoke("open_in_explorer",{ path:filepath})
50
}}></ContextMenuOption>
51
</ContextMenu>
52
src/components/FileTree/LeafNodeMenu.svelte
+1
-3
@@ -39,9 +39,7 @@
39
</ContextMenuOption>
40
</ContextMenuOption>
41
<ContextMenuOption labelText="Show in Explorer" on:click={() => {
42
- let dir = filepath.split(path.sep);
43
- let explorerPath = dir.join(path.sep);
44
- invoke("open_in_explorer",{ path:explorerPath})
42
+ invoke("open_in_explorer",{ path:filepath})
43
}}></ContextMenuOption>
44
45
<ContextMenuDivider></ContextMenuDivider>
src/components/FileTree/ParentNodeMenu.svelte
+1
-3
@@ -41,9 +41,7 @@
41
</ContextMenuOption>
42
</ContextMenuOption>
43
<ContextMenuOption labelText="Show in Explorer" on:click={() => {
44
- let dir = filepath.split(path.sep);
45
- let explorerPath = dir.join(path.sep);
46
- invoke("open_in_explorer",{ path:explorerPath})
44
+ invoke("open_in_explorer",{ path:filepath})
45
}}></ContextMenuOption>
46
<ContextMenuDivider></ContextMenuDivider>
47
<ContextMenuOption labelText="Delete..." on:click={ async() => {