feat: move-to-root, active tab highlight, show-in-explorer for all file items
- Add 'Move to root' context menu item for non-root sidebar tree nodes - Improve active tab visual contrast (background + font-weight) - FileTreeRow: show-in-explorer inline button & context menu for all items - OpenFolder now resolves file-type nodes to parent directory - handleShowInFolder uses item.nodeId || item.id for FileDTO compatibility - Add i18n key nav.moveToRoot (ru/en)
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
"verstak/internal/core/nodes"
|
||||
"verstak/internal/core/plugins"
|
||||
"verstak/internal/i18n"
|
||||
|
||||
@@ -117,11 +118,14 @@ func (a *App) OpenFolder(nodeID string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
dir := filepath.Join(a.vault, n.FsPath)
|
||||
if _, err := os.Stat(dir); os.IsNotExist(err) {
|
||||
dir = a.vault
|
||||
target := filepath.Join(a.vault, n.FsPath)
|
||||
if n.Type == nodes.TypeFile {
|
||||
target = filepath.Dir(target)
|
||||
}
|
||||
cmd := exec.Command("xdg-open", dir)
|
||||
if _, err := os.Stat(target); os.IsNotExist(err) {
|
||||
target = a.vault
|
||||
}
|
||||
cmd := exec.Command("xdg-open", target)
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -16,8 +16,8 @@
|
||||
background: #13131f;
|
||||
}
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/main-y7k2Kn7r.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/main-CJu7OoK7.css">
|
||||
<script type="module" crossorigin src="/assets/main-flblZtvd.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/main-DsSP02cl.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in New Issue
Block a user