fix: context menu close, OpenFolder for TypeFile nodes, tab highlight visibility
- FileTreeRow handleShowInFolder now closes the menu (menuOpen = false) - OpenFolder: TypeFile nodes with empty FsPath fall back to file record path - Active tab background increased to rgba(99,102,241,0.12), weight 600, border #818cf8
This commit is contained in:
@@ -118,9 +118,21 @@ func (a *App) OpenFolder(nodeID string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
target := filepath.Join(a.vault, n.FsPath)
|
||||
if n.Type == nodes.TypeFile {
|
||||
var target string
|
||||
if n.Type == nodes.TypeFile && n.FsPath == "" {
|
||||
records, _ := a.files.ListByNode(nodeID)
|
||||
if len(records) > 0 {
|
||||
target = filepath.Join(a.vault, records[0].Path)
|
||||
}
|
||||
if target == "" {
|
||||
target = a.vault
|
||||
}
|
||||
target = filepath.Dir(target)
|
||||
} else {
|
||||
target = filepath.Join(a.vault, n.FsPath)
|
||||
if n.Type == nodes.TypeFile {
|
||||
target = filepath.Dir(target)
|
||||
}
|
||||
}
|
||||
if _, err := os.Stat(target); os.IsNotExist(err) {
|
||||
target = a.vault
|
||||
|
||||
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-43Kzwqa7.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/main-D6qvckLy.css">
|
||||
<script type="module" crossorigin src="/assets/main-CuGUigdf.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/main-D-hpY-IS.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in New Issue
Block a user