mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
cd82976170
commit
a7d951856c
7 changed files with 1564 additions and 61 deletions
|
|
@ -231,17 +231,27 @@ export class Files extends Model {
|
|||
break;
|
||||
} else if (target.tagName === "LI") {
|
||||
needFocus = false;
|
||||
if (!event.metaKey && !event.ctrlKey) {
|
||||
if ((event.metaKey || event.ctrlKey) && !event.altKey && !event.shiftKey) {
|
||||
setPanelFocus(this.element.parentElement);
|
||||
target.classList.toggle("b3-list-item--focus");
|
||||
} else {
|
||||
this.setCurrent(target, false);
|
||||
if (target.getAttribute("data-type") === "navigation-file") {
|
||||
if (window.siyuan.altIsPressed) {
|
||||
if (event.altKey && !event.metaKey && !event.ctrlKey && !event.shiftKey) {
|
||||
openFileById({
|
||||
id: target.getAttribute("data-node-id"),
|
||||
position: "right",
|
||||
action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL]
|
||||
});
|
||||
} else if (!event.altKey && !event.metaKey && !event.ctrlKey && event.shiftKey) {
|
||||
openFileById({
|
||||
id: target.getAttribute("data-node-id"),
|
||||
position: "bottom",
|
||||
action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL]
|
||||
});
|
||||
} else {
|
||||
openFileById({
|
||||
removeCurrentTab: !((event.altKey && (event.metaKey || event.ctrlKey) && !event.shiftKey)),
|
||||
id: target.getAttribute("data-node-id"),
|
||||
action: [Constants.CB_GET_FOCUS, Constants.CB_GET_SCROLL]
|
||||
});
|
||||
|
|
@ -250,9 +260,6 @@ export class Files extends Model {
|
|||
this.getLeaf(target, notebookId);
|
||||
setPanelFocus(this.element.parentElement);
|
||||
}
|
||||
} else {
|
||||
setPanelFocus(this.element.parentElement);
|
||||
target.classList.toggle("b3-list-item--focus");
|
||||
}
|
||||
this.element.querySelector('[select-end="true"]')?.removeAttribute("select-end");
|
||||
this.element.querySelector('[select-start="true"]')?.removeAttribute("select-start");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue