mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 16:28:49 +01:00
This commit is contained in:
parent
c455f876ba
commit
09b4304df2
9 changed files with 117 additions and 30 deletions
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"video": "Video",
|
||||
"audio": "Audio",
|
||||
"updateAll": "Update all",
|
||||
"confirmUpdateAll": "Are you sure you want to update all?",
|
||||
"confirmUpdate": "Are you sure you want to update?",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"vídeo": "Vídeo",
|
||||
"audio": "Audio",
|
||||
"updateAll": "Actualizar todo",
|
||||
"confirmUpdateAll": "¿Estás seguro de que deseas actualizar todo?",
|
||||
"confirmUpdate": "¿Estás seguro de que deseas actualizar?",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"video": "Vidéo",
|
||||
"audio": "Audio",
|
||||
"updateAll": "Tout mettre à jour",
|
||||
"confirmUpdateAll": "Etes-vous sûr de vouloir tout mettre à jour ?",
|
||||
"confirmUpdate": "Êtes-vous sûr de vouloir mettre à jour ?",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"video": "影片",
|
||||
"audio": "音訊",
|
||||
"updateAll": "全部更新",
|
||||
"confirmUpdateAll": "確定全部更新嗎?",
|
||||
"confirmUpdate": "確定更新嗎?",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"video": "视频",
|
||||
"audio": "音频",
|
||||
"updateAll": "全部更新",
|
||||
"confirmUpdateAll": "确定全部更新吗?",
|
||||
"confirmUpdate": "确定更新吗?",
|
||||
|
|
|
|||
|
|
@ -122,7 +122,43 @@ export const query = {
|
|||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch" id="databaseBlock" type="checkbox"${window.siyuan.config.search.databaseBlock ? " checked" : ""}/>
|
||||
</label>
|
||||
</label>
|
||||
<label class="fn__flex">
|
||||
<svg class="svg"><use xlink:href="#iconVideo"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.video}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch" id="videoBlock" type="checkbox"${window.siyuan.config.search.videoBlock ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex">
|
||||
<svg class="svg"><use xlink:href="#iconRecord"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.audio}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch" id="audioBlock" type="checkbox"${window.siyuan.config.search.audioBlock ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex">
|
||||
<svg class="svg"><use xlink:href="#iconLanguage"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1">
|
||||
IFrame
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch" id="iFrameBlock" type="checkbox"${window.siyuan.config.search.iFrameBlock ? " checked" : ""}/>
|
||||
</label>
|
||||
<label class="fn__flex">
|
||||
<svg class="svg"><use xlink:href="#iconBoth"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.widget}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch" id="widgetBlock" type="checkbox"${window.siyuan.config.search.widgetBlock ? " checked" : ""}/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b3-label">
|
||||
|
|
@ -279,6 +315,10 @@ export const query = {
|
|||
htmlBlock: (query.element.querySelector("#htmlBlock") as HTMLInputElement).checked,
|
||||
embedBlock: (query.element.querySelector("#embedBlock") as HTMLInputElement).checked,
|
||||
databaseBlock: (query.element.querySelector("#databaseBlock") as HTMLInputElement).checked,
|
||||
audioBlock: (query.element.querySelector("#audioBlock") as HTMLInputElement).checked,
|
||||
videoBlock: (query.element.querySelector("#videoBlock") as HTMLInputElement).checked,
|
||||
iFrameBlock: (query.element.querySelector("#iFrameBlock") as HTMLInputElement).checked,
|
||||
widgetBlock: (query.element.querySelector("#widgetBlock") 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,
|
||||
|
|
|
|||
|
|
@ -130,6 +130,42 @@ export const filterMenu = (config: ISearchOption, cb: () => void) => {
|
|||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" data-type="databaseBlock" type="checkbox"${config.types.databaseBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconVideo"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1 fn__flex-center">
|
||||
${window.siyuan.languages.video}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" data-type="videoBlock" type="checkbox"${config.types.videoBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconRecord"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1 fn__flex-center">
|
||||
${window.siyuan.languages.audio}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" data-type="audioBlock" type="checkbox"${config.types.audioBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconLanguage"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1 fn__flex-center">
|
||||
IFrame
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" data-type="iFrameBlock" type="checkbox"${config.types.iFrameBlock ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<svg class="ft__on-surface svg fn__flex-center"><use xlink:href="#iconBoth"></use></svg>
|
||||
<span class="fn__space"></span>
|
||||
<div class="fn__flex-1 fn__flex-center">
|
||||
${window.siyuan.languages.widget}
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" data-type="widgetBlock" type="checkbox"${config.types.widgetBlock ? " checked" : ""}>
|
||||
</label>
|
||||
</div>
|
||||
<div class="b3-dialog__action">
|
||||
<button class="b3-button b3-button--cancel">${window.siyuan.languages.cancel}</button><div class="fn__space"></div>
|
||||
|
|
|
|||
|
|
@ -507,6 +507,10 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
|||
r: "",
|
||||
page: 1,
|
||||
types: {
|
||||
audioBlock: window.siyuan.config.search.audioBlock,
|
||||
videoBlock: window.siyuan.config.search.videoBlock,
|
||||
iFrameBlock: window.siyuan.config.search.iFrameBlock,
|
||||
widgetBlock: window.siyuan.config.search.widgetBlock,
|
||||
document: window.siyuan.config.search.document,
|
||||
heading: window.siyuan.config.search.heading,
|
||||
list: window.siyuan.config.search.list,
|
||||
|
|
@ -763,6 +767,10 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
|||
r: "",
|
||||
page: 1,
|
||||
types: {
|
||||
audioBlock: window.siyuan.config.search.audioBlock,
|
||||
videoBlock: window.siyuan.config.search.videoBlock,
|
||||
iFrameBlock: window.siyuan.config.search.iFrameBlock,
|
||||
widgetBlock: window.siyuan.config.search.widgetBlock,
|
||||
document: window.siyuan.config.search.document,
|
||||
heading: window.siyuan.config.search.heading,
|
||||
list: window.siyuan.config.search.list,
|
||||
|
|
|
|||
51
app/src/types/index.d.ts
vendored
51
app/src/types/index.d.ts
vendored
|
|
@ -268,26 +268,32 @@ interface ISearchOption {
|
|||
idPath: string[]
|
||||
k: string
|
||||
r: string
|
||||
types: {
|
||||
mathBlock: boolean
|
||||
table: boolean
|
||||
blockquote: boolean
|
||||
superBlock: boolean
|
||||
paragraph: boolean
|
||||
document: boolean
|
||||
heading: boolean
|
||||
list: boolean
|
||||
listItem: boolean
|
||||
codeBlock: boolean
|
||||
htmlBlock: boolean
|
||||
embedBlock: boolean
|
||||
databaseBlock: boolean
|
||||
},
|
||||
types: ISearchType,
|
||||
replaceTypes: {
|
||||
[key: string]: boolean;
|
||||
},
|
||||
}
|
||||
|
||||
interface ISearchType {
|
||||
audioBlock: boolean
|
||||
videoBlock: boolean
|
||||
iFrameBlock: boolean
|
||||
widgetBlock: boolean
|
||||
mathBlock: boolean
|
||||
table: boolean
|
||||
blockquote: boolean
|
||||
superBlock: boolean
|
||||
paragraph: boolean
|
||||
document: boolean
|
||||
heading: boolean
|
||||
list: boolean
|
||||
listItem: boolean
|
||||
codeBlock: boolean
|
||||
htmlBlock: boolean
|
||||
embedBlock: boolean
|
||||
databaseBlock: boolean
|
||||
}
|
||||
|
||||
interface ITextOption {
|
||||
color?: string,
|
||||
type: string
|
||||
|
|
@ -823,20 +829,7 @@ interface IConfig {
|
|||
tag: {
|
||||
sort: number
|
||||
}
|
||||
search: {
|
||||
databaseBlock: boolean
|
||||
embedBlock: boolean
|
||||
htmlBlock: boolean
|
||||
document: boolean
|
||||
heading: boolean
|
||||
list: boolean
|
||||
listItem: boolean
|
||||
codeBlock: boolean
|
||||
mathBlock: boolean
|
||||
table: boolean
|
||||
blockquote: boolean
|
||||
superBlock: boolean
|
||||
paragraph: boolean
|
||||
search: ISearchType & {
|
||||
name: boolean
|
||||
alias: boolean
|
||||
memo: boolean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue