Mobile: search=file palette, commands button, hide top tabs, always full-open files
This commit is contained in:
+15
-3
@@ -355,7 +355,11 @@ async function incrementalLoadDirectory(vaultName, dirPath, container) {
|
||||
attachTreeItemLongPress(fileItem, () => ({ vault: vaultName, path: item.path, type: "file", isReadonly: false }));
|
||||
fileItem.addEventListener("click", () => {
|
||||
scrollTreeItemIntoView(fileItem, false);
|
||||
TabManager.openPreview(vaultName, item.path);
|
||||
if (window.innerWidth <= 768) {
|
||||
TabManager.openPersistent(vaultName, item.path);
|
||||
} else {
|
||||
TabManager.openPreview(vaultName, item.path);
|
||||
}
|
||||
closeMobileSidebar();
|
||||
});
|
||||
|
||||
@@ -646,7 +650,11 @@ async function loadDirectory(vaultName, dirPath, container) {
|
||||
attachTreeItemLongPress(fileItem, () => ({ vault: vaultName, path: item.path, type: "file", isReadonly: false }));
|
||||
fileItem.addEventListener("click", () => {
|
||||
scrollTreeItemIntoView(fileItem, false);
|
||||
TabManager.openPreview(vaultName, item.path);
|
||||
if (window.innerWidth <= 768) {
|
||||
TabManager.openPersistent(vaultName, item.path);
|
||||
} else {
|
||||
TabManager.openPreview(vaultName, item.path);
|
||||
}
|
||||
closeMobileSidebar();
|
||||
});
|
||||
|
||||
@@ -806,7 +814,11 @@ function renderFilteredSidebarResults(query, results) {
|
||||
if (entry.type === "directory") {
|
||||
await focusPathInSidebar(entry.vault, entry.path, { alignToTop: true, expandTarget: true });
|
||||
} else {
|
||||
await TabManager.openPreview(entry.vault, entry.path);
|
||||
if (window.innerWidth <= 768) {
|
||||
await TabManager.openPersistent(entry.vault, entry.path);
|
||||
} else {
|
||||
await TabManager.openPreview(entry.vault, entry.path);
|
||||
}
|
||||
await focusPathInSidebar(entry.vault, getParentDirectoryPath(entry.path), { alignToTop: true, expandTarget: true });
|
||||
syncActiveFileTreeItem(entry.vault, entry.path);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user