This commit is contained in:
Liang Ding 2023-01-19 14:07:38 +08:00
parent f6dd7722ad
commit 622b6d2c84
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
12 changed files with 27 additions and 8 deletions

View file

@ -393,6 +393,7 @@
"math": "Formula Block", "math": "Formula Block",
"listItem": "List item", "listItem": "List item",
"superBlock": "Super block", "superBlock": "Super block",
"embedBlock": "Embed block",
"expand": "Expand", "expand": "Expand",
"showDock": "Show Dock", "showDock": "Show Dock",
"hideDock": "Hide Dock", "hideDock": "Hide Dock",
@ -574,7 +575,6 @@
"sync": "Sync", "sync": "Sync",
"syncNow": "Sync now", "syncNow": "Sync now",
"waitSync": "The editing data has not been synchronized to the cloud", "waitSync": "The editing data has not been synchronized to the cloud",
"cloudBook": "Cloud Notebook",
"paymentSum": "Cumulatively paid", "paymentSum": "Cumulatively paid",
"refresh": "Refresh", "refresh": "Refresh",
"accountManage": "Account Manage", "accountManage": "Account Manage",

View file

@ -393,6 +393,7 @@
"math": "Bloque de fórmula", "math": "Bloque de fórmula",
"listItem": "Elemento de la lista", "listItem": "Elemento de la lista",
"superBlock": "Superbloque", "superBlock": "Superbloque",
"embedBlock": "Bloque incrustado",
"expand": "Expandir", "expand": "Expandir",
"showDock": "Mostrar Dock", "showDock": "Mostrar Dock",
"hideDock": "Ocultar Dock", "hideDock": "Ocultar Dock",
@ -574,7 +575,6 @@
"sync": "Sincronización", "sync": "Sincronización",
"syncNow": "Sincronizar ahora", "syncNow": "Sincronizar ahora",
"waitSync": "Los datos de edición no se han sincronizado con la nube", "waitSync": "Los datos de edición no se han sincronizado con la nube",
"cloudBook": "Cuaderno de notas en la nube",
"paymentSum": "Pagado acumulativamente", "paymentSum": "Pagado acumulativamente",
"refresh": "Actualizar", "refresh": "Actualizar",
"accountManage": "Gestión de la cuenta", "accountManage": "Gestión de la cuenta",

View file

@ -393,6 +393,7 @@
"math": "Bloc de formule", "math": "Bloc de formule",
"listItem": "Élément de liste", "listItem": "Élément de liste",
"superBlock": "Superblock", "superBlock": "Superblock",
"embedBlock": "Bloc intégré",
"expand": "Élargir", "expand": "Élargir",
"showDock": "Montrer le Dock", "showDock": "Montrer le Dock",
"hideDock": "Cacher le Dock", "hideDock": "Cacher le Dock",
@ -574,7 +575,6 @@
"sync": "Synchro", "sync": "Synchro",
"syncNow": "Synchro maintenant", "syncNow": "Synchro maintenant",
"waitSync": "Les données d'édition n'ont pas été synchronisées avec le cloud", "waitSync": "Les données d'édition n'ont pas été synchronisées avec le cloud",
"cloudBook": "Carnet de notes du Cloud",
"paymentSum": "Cumulativement payé", "paymentSum": "Cumulativement payé",
"refresh": "Rafraîchir", "refresh": "Rafraîchir",
"accountManage": "Gestion des comptes", "accountManage": "Gestion des comptes",

View file

@ -393,6 +393,7 @@
"math": "公式塊", "math": "公式塊",
"listItem": "列表項", "listItem": "列表項",
"superBlock": "超級塊", "superBlock": "超級塊",
"embedBlock": "嵌入塊",
"expand": "展開", "expand": "展開",
"showDock": "顯示停靠欄", "showDock": "顯示停靠欄",
"hideDock": "隱藏停靠欄", "hideDock": "隱藏停靠欄",
@ -574,7 +575,6 @@
"sync": "同步", "sync": "同步",
"syncNow": "立即同步", "syncNow": "立即同步",
"waitSync": "編輯數據尚未同步到雲端", "waitSync": "編輯數據尚未同步到雲端",
"cloudBook": "雲端筆記本",
"payment": "累計已支付", "payment": "累計已支付",
"refresh": "重新整理", "refresh": "重新整理",
"accountManage": "帳號管理", "accountManage": "帳號管理",

View file

@ -393,6 +393,7 @@
"math": "公式块", "math": "公式块",
"listItem": "列表项", "listItem": "列表项",
"superBlock": "超级块", "superBlock": "超级块",
"embedBlock": "嵌入块",
"expand": "展开", "expand": "展开",
"showDock": "显示停靠栏", "showDock": "显示停靠栏",
"hideDock": "隐藏停靠栏", "hideDock": "隐藏停靠栏",
@ -574,7 +575,6 @@
"sync": "同步", "sync": "同步",
"syncNow": "立即同步", "syncNow": "立即同步",
"waitSync": "编辑数据尚未同步到云端", "waitSync": "编辑数据尚未同步到云端",
"cloudBook": "云端笔记本",
"paymentSum": "累计已支付", "paymentSum": "累计已支付",
"refresh": "刷新", "refresh": "刷新",
"accountManage": "账号管理", "accountManage": "账号管理",

View file

@ -83,6 +83,13 @@ export const query = {
<span class="fn__space"></span> <span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="htmlBlock" type="checkbox"${window.siyuan.config.search.htmlBlock ? " checked" : ""}/> <input class="b3-switch fn__flex-center" id="htmlBlock" type="checkbox"${window.siyuan.config.search.htmlBlock ? " checked" : ""}/>
</label> </label>
<label class="fn__flex">
<div class="fn__flex-1 b3-label__text">
${window.siyuan.languages.embedBlock}
</div>
<span class="fn__space"></span>
<input class="b3-switch fn__flex-center" id="embedBlock" type="checkbox"${window.siyuan.config.search.embedBlock ? " checked" : ""}/>
</label>
</div> </div>
</div> </div>
<div class="b3-label"> <div class="b3-label">
@ -226,6 +233,7 @@ export const query = {
listItem: (query.element.querySelector("#listItem") as HTMLInputElement).checked, listItem: (query.element.querySelector("#listItem") as HTMLInputElement).checked,
codeBlock: (query.element.querySelector("#codeBlock") as HTMLInputElement).checked, codeBlock: (query.element.querySelector("#codeBlock") as HTMLInputElement).checked,
htmlBlock: (query.element.querySelector("#htmlBlock") as HTMLInputElement).checked, htmlBlock: (query.element.querySelector("#htmlBlock") as HTMLInputElement).checked,
embedBlock: (query.element.querySelector("#embedBlock") as HTMLInputElement).checked,
mathBlock: (query.element.querySelector("#mathBlock") as HTMLInputElement).checked, mathBlock: (query.element.querySelector("#mathBlock") as HTMLInputElement).checked,
table: (query.element.querySelector("#table") as HTMLInputElement).checked, table: (query.element.querySelector("#table") as HTMLInputElement).checked,
blockquote: (query.element.querySelector("#blockquote") as HTMLInputElement).checked, blockquote: (query.element.querySelector("#blockquote") as HTMLInputElement).checked,

View file

@ -197,6 +197,7 @@ export const getLocalStorage = (cb:()=>void) => {
blockquote: window.siyuan.config.search.blockquote, blockquote: window.siyuan.config.search.blockquote,
superBlock: window.siyuan.config.search.superBlock, superBlock: window.siyuan.config.search.superBlock,
paragraph: window.siyuan.config.search.paragraph, paragraph: window.siyuan.config.search.paragraph,
embedBlock: window.siyuan.config.search.embedBlock,
} }
}; };
defaultStorage[Constants.LOCAL_ZOOM] = 1; defaultStorage[Constants.LOCAL_ZOOM] = 1;

View file

@ -846,6 +846,7 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:
blockquote: window.siyuan.config.search.blockquote, blockquote: window.siyuan.config.search.blockquote,
superBlock: window.siyuan.config.search.superBlock, superBlock: window.siyuan.config.search.superBlock,
paragraph: window.siyuan.config.search.paragraph, paragraph: window.siyuan.config.search.paragraph,
embedBlock: window.siyuan.config.search.embedBlock,
} }
}, config, edit); }, config, edit);
} }
@ -990,6 +991,13 @@ const addConfigFilterMenu = (config: ISearchOption, edit: Protyle, element: Elem
<span class="fn__space"></span> <span class="fn__space"></span>
<input id="removeAssets" class="b3-switch fn__flex-center" data-type="htmlBlock" type="checkbox"${config.types.htmlBlock ? " checked" : ""}> <input id="removeAssets" class="b3-switch fn__flex-center" data-type="htmlBlock" type="checkbox"${config.types.htmlBlock ? " checked" : ""}>
</label> </label>
<label class="fn__flex b3-label">
<div class="fn__flex-1 fn__flex-center">
${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" : ""}>
</label>
</div> </div>
<div class="b3-dialog__action"> <div class="b3-dialog__action">
<button class="b3-button b3-button--cancel">${window.siyuan.languages.cancel}</button><div class="fn__space"></div> <button class="b3-button b3-button--cancel">${window.siyuan.languages.cancel}</button><div class="fn__space"></div>

View file

@ -85,6 +85,7 @@ interface ISearchOption {
listItem: boolean listItem: boolean
codeBlock: boolean codeBlock: boolean
htmlBlock: boolean htmlBlock: boolean
embedBlock: boolean
} }
} }
@ -442,6 +443,7 @@ declare interface IConfig {
sort: number sort: number
} }
search: { search: {
embedBlock: boolean
htmlBlock: boolean htmlBlock: boolean
document: boolean document: boolean
heading: boolean heading: boolean

View file

@ -189,7 +189,7 @@ func (s *Search) TypeFilter() string {
buf.WriteString(",") buf.WriteString(",")
} }
// 无法搜索到 iframe 块、视频块和音频块 https://github.com/siyuan-note/siyuan/issues/3604 // 无法搜索到 iframe 块、视频块和音频块 https://github.com/siyuan-note/siyuan/issues/3604
buf.WriteString("'iframe','query_embed','video','audio',") buf.WriteString("'iframe','video','audio',")
// 挂件块支持内置属性搜索 https://github.com/siyuan-note/siyuan/issues/4497 // 挂件块支持内置属性搜索 https://github.com/siyuan-note/siyuan/issues/4497
buf.WriteString("'widget',") buf.WriteString("'widget',")

View file

@ -398,7 +398,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
WaitForWritingFiles() WaitForWritingFiles()
if !force { if !force {
SyncData(false, true, false) syncData(false, true, false)
if 0 != ExitSyncSucc { if 0 != ExitSyncSucc {
exitCode = 1 exitCode = 1
return return

View file

@ -1220,7 +1220,7 @@ func updateRefText(refNode *ast.Node, changedDefNodes map[string]*ast.Node) (cha
func AutoIndexEmbedBlock() { func AutoIndexEmbedBlock() {
for { for {
task.AppendTask(task.DatabaseIndexEmbedBlock, autoIndexEmbedBlock) task.AppendTask(task.DatabaseIndexEmbedBlock, autoIndexEmbedBlock)
time.Sleep(30 * time.Second) time.Sleep(10 * time.Minute)
} }
} }