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:
parent
cc3500c14f
commit
105657400b
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1904,7 +1904,7 @@
|
|||
.tabs { display: flex; border-bottom: 1px solid #2a2a3c; flex-shrink: 0; padding: 0 24px; }
|
||||
.tab { padding: 10px 16px; border: none; background: none; color: #888; font-size: 13px; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
|
||||
.tab:hover { color: #a5b4fc; }
|
||||
.tab.active { color: #e4e4ef; border-bottom-color: #6366f1; background: rgba(99,102,241,0.06); font-weight: 500; }
|
||||
.tab.active { color: #e4e4ef; border-bottom-color: #818cf8; background: rgba(99,102,241,0.12); font-weight: 600; }
|
||||
|
||||
/* Tab content */
|
||||
.tab-content { flex: 1; overflow-y: auto; }
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
}
|
||||
|
||||
function handleShowInFolder() {
|
||||
menuOpen = false
|
||||
dispatch('showInFolder', item.nodeId || item.id)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue