mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-20 05:58:07 +01:00
This commit is contained in:
parent
84b29657f8
commit
5c034d93d0
4 changed files with 19 additions and 18 deletions
|
|
@ -8,8 +8,18 @@ import {getAllDocks} from "../layout/getAll";
|
|||
import {Dialog} from "../dialog";
|
||||
import {focusByRange} from "../protyle/util/selection";
|
||||
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
||||
import {hideElements} from "../protyle/ui/hideElements";
|
||||
|
||||
export const openRecentDocs = () => {
|
||||
const openRecentDocsDialog = window.siyuan.dialogs.find(item => {
|
||||
if (item.element.getAttribute("data-key") === window.siyuan.config.keymap.general.recentDocs.custom) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
if (openRecentDocsDialog) {
|
||||
hideElements(["dialog"]);
|
||||
return;
|
||||
}
|
||||
fetchPost("/api/storage/getRecentDocs", {}, (response) => {
|
||||
let range: Range;
|
||||
if (getSelection().rangeCount > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue