mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 18:56:09 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
92feafcd46
11 changed files with 83 additions and 42 deletions
|
|
@ -114,6 +114,15 @@ export const query = {
|
|||
<span class="fn__space"></span>
|
||||
<input class="b3-switch" id="embedBlock" type="checkbox"${window.siyuan.config.search.embedBlock ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex">
|
||||
<svg class="svg"><use xlink:href="#iconDatabase"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.database}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch" id="databaseBlock" type="checkbox"${window.siyuan.config.search.databaseBlock ? " checked" : ""}/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b3-label">
|
||||
|
|
@ -269,6 +278,7 @@ export const query = {
|
|||
codeBlock: (query.element.querySelector("#codeBlock") as HTMLInputElement).checked,
|
||||
htmlBlock: (query.element.querySelector("#htmlBlock") as HTMLInputElement).checked,
|
||||
embedBlock: (query.element.querySelector("#embedBlock") as HTMLInputElement).checked,
|
||||
databaseBlock: (query.element.querySelector("#databaseBlock") as HTMLInputElement).checked,
|
||||
mathBlock: (query.element.querySelector("#mathBlock") as HTMLInputElement).checked,
|
||||
table: (query.element.querySelector("#table") as HTMLInputElement).checked,
|
||||
blockquote: (query.element.querySelector("#blockquote") as HTMLInputElement).checked,
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export const initConfigSearch = (element: HTMLElement, app: App) => {
|
|||
// 搜索
|
||||
getLang(["search", "searchLimit", "searchLimit1", "memo", "name", "alias", "keywordsLimit",
|
||||
"doc", "headings", "list1", "listItem", "code", "math", "table", "quote", "superBlock", "paragraph",
|
||||
"indexAssetPath"]),
|
||||
"indexAssetPath", "embedBlock", "database"]),
|
||||
|
||||
// 快捷键
|
||||
getLang(["keymap", "keymapTip2"].concat(Object.keys(Constants.SIYUAN_KEYMAP.general))
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@ import {App} from "../../index";
|
|||
import {
|
||||
assetFilterMenu,
|
||||
assetInputEvent,
|
||||
assetMethodMenu, assetMoreMenu,
|
||||
assetMethodMenu,
|
||||
assetMoreMenu,
|
||||
renderNextAssetMark,
|
||||
renderPreview,
|
||||
} from "../../search/assets";
|
||||
|
|
@ -482,6 +483,7 @@ const initSearchEvent = (app: App, element: Element, config: ISearchOption) => {
|
|||
superBlock: window.siyuan.config.search.superBlock,
|
||||
paragraph: window.siyuan.config.search.paragraph,
|
||||
embedBlock: window.siyuan.config.search.embedBlock,
|
||||
databaseBlock: window.siyuan.config.search.databaseBlock,
|
||||
}
|
||||
}, config);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.math}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="mathBlock" type="checkbox"${config.types.mathBlock ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="mathBlock" type="checkbox"${config.types.mathBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconTable"></use></svg>
|
||||
|
|
@ -29,7 +29,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.table}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="table" type="checkbox"${config.types.table ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="table" type="checkbox"${config.types.table ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconQuote"></use></svg>
|
||||
|
|
@ -38,7 +38,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.quote}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="blockquote" type="checkbox"${config.types.blockquote ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="blockquote" type="checkbox"${config.types.blockquote ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconSuper"></use></svg>
|
||||
|
|
@ -47,7 +47,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.superBlock}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="superBlock" type="checkbox"${config.types.superBlock ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="superBlock" type="checkbox"${config.types.superBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconParagraph"></use></svg>
|
||||
|
|
@ -56,7 +56,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.paragraph}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="paragraph" type="checkbox"${config.types.paragraph ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="paragraph" type="checkbox"${config.types.paragraph ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconFile"></use></svg>
|
||||
|
|
@ -65,7 +65,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.doc}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="document" type="checkbox"${config.types.document ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="document" type="checkbox"${config.types.document ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconHeadings"></use></svg>
|
||||
|
|
@ -74,7 +74,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.headings}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="heading" type="checkbox"${config.types.heading ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="heading" type="checkbox"${config.types.heading ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconList"></use></svg>
|
||||
|
|
@ -83,7 +83,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.list1}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="list" type="checkbox"${config.types.list ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="list" type="checkbox"${config.types.list ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconListItem"></use></svg>
|
||||
|
|
@ -92,7 +92,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.listItem}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="listItem" type="checkbox"${config.types.listItem ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="listItem" type="checkbox"${config.types.listItem ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconCode"></use></svg>
|
||||
|
|
@ -101,7 +101,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.code}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="codeBlock" type="checkbox"${config.types.codeBlock ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="codeBlock" type="checkbox"${config.types.codeBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconHTML5"></use></svg>
|
||||
|
|
@ -110,7 +110,7 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
HTML
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="htmlBlock" type="checkbox"${config.types.htmlBlock ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="htmlBlock" type="checkbox"${config.types.htmlBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconSQL"></use></svg>
|
||||
|
|
@ -119,7 +119,16 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
${window.siyuan.languages.embedBlock}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="embedBlock" type="checkbox"${config.types.embedBlock ? " checked" : ""}>
|
||||
<input class="b3-switch fn__flex-center" data-type="embedBlock" type="checkbox"${config.types.embedBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconDatabase"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1 fn__flex-center">
|
||||
${window.siyuan.languages.database}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" data-type="databaseBlock" type="checkbox"${config.types.databaseBlock ? " checked" : ""}>
|
||||
</label>
|
||||
</div>
|
||||
<div class="b3-dialog__action">
|
||||
|
|
|
|||
|
|
@ -32,8 +32,10 @@ import {upDownHint} from "../util/upDownHint";
|
|||
import {
|
||||
assetFilterMenu,
|
||||
assetInputEvent,
|
||||
assetMethodMenu, assetMoreMenu,
|
||||
openSearchAsset, renderNextAssetMark,
|
||||
assetMethodMenu,
|
||||
assetMoreMenu,
|
||||
openSearchAsset,
|
||||
renderNextAssetMark,
|
||||
renderPreview,
|
||||
toggleAssetHistory
|
||||
} from "./assets";
|
||||
|
|
@ -365,6 +367,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
|||
superBlock: window.siyuan.config.search.superBlock,
|
||||
paragraph: window.siyuan.config.search.paragraph,
|
||||
embedBlock: window.siyuan.config.search.embedBlock,
|
||||
databaseBlock: window.siyuan.config.search.databaseBlock,
|
||||
}
|
||||
}, config, edit);
|
||||
element.querySelector(".b3-chip--current")?.classList.remove("b3-chip--current");
|
||||
|
|
@ -578,6 +581,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
|||
superBlock: window.siyuan.config.search.superBlock,
|
||||
paragraph: window.siyuan.config.search.paragraph,
|
||||
embedBlock: window.siyuan.config.search.embedBlock,
|
||||
databaseBlock: window.siyuan.config.search.databaseBlock,
|
||||
}
|
||||
}, config, edit);
|
||||
element.querySelector("#criteria .b3-chip--current")?.classList.remove("b3-chip--current");
|
||||
|
|
|
|||
2
app/src/types/index.d.ts
vendored
2
app/src/types/index.d.ts
vendored
|
|
@ -237,6 +237,7 @@ interface ISearchOption {
|
|||
codeBlock: boolean
|
||||
htmlBlock: boolean
|
||||
embedBlock: boolean
|
||||
databaseBlock: boolean
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -751,6 +752,7 @@ interface IConfig {
|
|||
sort: number
|
||||
}
|
||||
search: {
|
||||
databaseBlock: boolean
|
||||
embedBlock: boolean
|
||||
htmlBlock: boolean
|
||||
document: boolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue