فهرست منبع

Fix type errors related to `siyuan.config` (#10733)

* :art: Improve the type definition of `siyuan.config`

* :bug: Fix type errors related to `siyuan.config`

* :lipstick: `types/config.d.ts`

* :bug: Fix type errors related to `siyuan.config`

* :bug: Fix type errors related to `siyuan.config`

* :bug: Fix type errors related to `siyuan.config`
Yingyi / 颖逸 1 سال پیش
والد
کامیت
35ef97c25c
2فایلهای تغییر یافته به همراه43 افزوده شده و 1 حذف شده
  1. 23 1
      app/src/constants.ts
  2. 20 0
      app/src/types/config.d.ts

+ 23 - 1
app/src/constants.ts

@@ -482,7 +482,13 @@ export abstract class Constants {
                     "size": "auto",
                     "type": "center",
                     "instance": "Layout",
-                    "children": [{"instance": "Wnd", "children": [{"instance": "Tab", "children": []}]}]
+                    "children": [{
+                        "instance": "Wnd",
+                        "children": [{
+                            "instance": "Tab",
+                            "children": []
+                        } as Config.IUILayoutTab]
+                    }]
                 }, {
                     "direction": "tb",
                     "size": "0px",
@@ -527,30 +533,40 @@ export abstract class Constants {
                     show: true,
                     icon: "iconFiles",
                     hotkeyLangId: "fileTree",
+                    hotkey: "",
+                    title: "",
                 }, {
                     type: "outline",
                     size: {width: 227, height: 0},
                     show: false,
                     icon: "iconAlignCenter",
                     hotkeyLangId: "outline",
+                    hotkey: "",
+                    title: "",
                 }, {
                     type: "inbox",
                     size: {width: 320, height: 0},
                     show: false,
                     icon: "iconInbox",
                     hotkeyLangId: "inbox",
+                    hotkey: "",
+                    title: "",
                 }], [{
                     type: "bookmark",
                     size: {width: 227, height: 0},
                     show: false,
                     icon: "iconBookmark",
                     hotkeyLangId: "bookmark",
+                    hotkey: "",
+                    title: "",
                 }, {
                     type: "tag",
                     size: {width: 227, height: 0},
                     show: false,
                     icon: "iconTags",
                     hotkeyLangId: "tag",
+                    hotkey: "",
+                    title: "",
                 }]
             ]
         },
@@ -563,18 +579,24 @@ export abstract class Constants {
                     show: false,
                     icon: "iconGraph",
                     hotkeyLangId: "graphView",
+                    hotkey: "",
+                    title: "",
                 }, {
                     type: "globalGraph",
                     size: {width: 320, height: 0},
                     show: false,
                     icon: "iconGlobalGraph",
                     hotkeyLangId: "globalGraph",
+                    hotkey: "",
+                    title: "",
                 }], [{
                     type: "backlink",
                     size: {width: 320, height: 0},
                     show: false,
                     icon: "iconLink",
                     hotkeyLangId: "backlinks",
+                    hotkey: "",
+                    title: "",
                 }]
             ]
         }

+ 20 - 0
app/src/types/config.d.ts

@@ -2067,6 +2067,11 @@ declare namespace Config {
      * Search type filtering
      */
     export interface IUILayoutTabSearchConfigTypes {
+        /**
+         * Search results contain audio blocks
+         * @default false
+         */
+        audioBlock: boolean;
         /**
          * Search results contain blockquote blocks
          * @default false
@@ -2102,6 +2107,11 @@ declare namespace Config {
          * @default false
          */
         htmlBlock: boolean;
+        /**
+         * Search results contain iframe blocks
+         * @default false
+         */
+        iFrameBlock: boolean;
         /**
          * Search results contain list blocks
          * @default false
@@ -2132,6 +2142,16 @@ declare namespace Config {
          * @default false
          */
         table: boolean;
+        /**
+         * Search results contain video blocks
+         * @default false
+         */
+        videoBlock: boolean;
+        /**
+         * Search results contain widget blocks
+         * @default false
+         */
+        widgetBlock: boolean;
     }