mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
6fc62d12ee
commit
f6d0be00d6
3 changed files with 14 additions and 1 deletions
|
|
@ -109,6 +109,7 @@ export abstract class Constants {
|
||||||
toggleWin: {default: "⌥M", custom: "⌥M"},
|
toggleWin: {default: "⌥M", custom: "⌥M"},
|
||||||
lockScreen: {default: "⌥N", custom: "⌥N"},
|
lockScreen: {default: "⌥N", custom: "⌥N"},
|
||||||
move: {default: "", custom: ""},
|
move: {default: "", custom: ""},
|
||||||
|
selectOpen1: {default: "", custom: ""},
|
||||||
},
|
},
|
||||||
editor: {
|
editor: {
|
||||||
general: {
|
general: {
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ export class Files extends Model {
|
||||||
${window.siyuan.languages.fileTree}
|
${window.siyuan.languages.fileTree}
|
||||||
</div>
|
</div>
|
||||||
<span class="fn__flex-1 fn__space"></span>
|
<span class="fn__flex-1 fn__space"></span>
|
||||||
<span data-type="focus" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.selectOpen1}"><svg><use xlink:href='#iconFocus'></use></svg></span>
|
<span data-type="focus" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.selectOpen1} ${updateHotkeyTip(window.siyuan.config.keymap.general.selectOpen1.custom)}"><svg><use xlink:href='#iconFocus'></use></svg></span>
|
||||||
<span class="fn__space"></span>
|
<span class="fn__space"></span>
|
||||||
<span data-type="collapse" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.collapseAll} ${updateHotkeyTip("⌘↑")}">
|
<span data-type="collapse" class="block__icon b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.collapseAll} ${updateHotkeyTip("⌘↑")}">
|
||||||
<svg><use xlink:href="#iconContract"></use></svg>
|
<svg><use xlink:href="#iconContract"></use></svg>
|
||||||
|
|
|
||||||
|
|
@ -646,6 +646,18 @@ const fileTreeKeydown = (event: KeyboardEvent) => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const files = dockFile.data.file as Files;
|
const files = dockFile.data.file as Files;
|
||||||
|
if (matchHotKey(window.siyuan.config.keymap.general.selectOpen1.custom, event)) {
|
||||||
|
event.preventDefault();
|
||||||
|
const element = document.querySelector(".layout__wnd--active > .layout-tab-bar > .item--focus") ||
|
||||||
|
document.querySelector(".layout-tab-bar > .item--focus");
|
||||||
|
if (element) {
|
||||||
|
const tab = getInstanceById(element.getAttribute("data-id")) as Tab;
|
||||||
|
if (tab && tab.model instanceof Editor) {
|
||||||
|
files.selectItem(tab.model.editor.protyle.notebookId, tab.model.editor.protyle.path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!files.element.previousElementSibling.classList.contains("block__icons--active")) {
|
if (!files.element.previousElementSibling.classList.contains("block__icons--active")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue