mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
📱 replace type
This commit is contained in:
parent
9d639e8ff0
commit
f54f040a37
9 changed files with 17 additions and 5 deletions
|
|
@ -445,6 +445,7 @@
|
||||||
"cancelMerged": "Cancel cell merge",
|
"cancelMerged": "Cancel cell merge",
|
||||||
"useDefaultWidth": "Use Default Column Width",
|
"useDefaultWidth": "Use Default Column Width",
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
|
"replaceType": "Replace type",
|
||||||
"searchBlockType": "Block types (searches in the enabled types below, the filter option in the global search overrides this setting)",
|
"searchBlockType": "Block types (searches in the enabled types below, the filter option in the global search overrides this setting)",
|
||||||
"searchBlockAttr": "Block attributes (search not only in the content, but also in the following enabled attributes)",
|
"searchBlockAttr": "Block attributes (search not only in the content, but also in the following enabled attributes)",
|
||||||
"searchIndex": "Index",
|
"searchIndex": "Index",
|
||||||
|
|
|
||||||
|
|
@ -445,6 +445,7 @@
|
||||||
"cancelMerged": "Cancelar fusión de celda",
|
"cancelMerged": "Cancelar fusión de celda",
|
||||||
"useDefaultWidth": "Usar el ancho de columna por defecto",
|
"useDefaultWidth": "Usar el ancho de columna por defecto",
|
||||||
"type": "Tipo",
|
"type": "Tipo",
|
||||||
|
"replaceType": "Reemplazar tipo",
|
||||||
"searchBlockType": "Tipos de bloque (busque en los tipos habilitados a continuación, la opción de filtro en la búsqueda global anula esta configuración)",
|
"searchBlockType": "Tipos de bloque (busque en los tipos habilitados a continuación, la opción de filtro en la búsqueda global anula esta configuración)",
|
||||||
"searchBlockAttr": "Atributos de bloque (busca no sólo en el contenido, sino también en los siguientes atributos habilitados)",
|
"searchBlockAttr": "Atributos de bloque (busca no sólo en el contenido, sino también en los siguientes atributos habilitados)",
|
||||||
"searchIndex": "Índice",
|
"searchIndex": "Índice",
|
||||||
|
|
|
||||||
|
|
@ -445,6 +445,7 @@
|
||||||
"cancelMerged": "Annuler la fusion de cellules",
|
"cancelMerged": "Annuler la fusion de cellules",
|
||||||
"useDefaultWidth": "Utiliser la largeur de colonne par défaut",
|
"useDefaultWidth": "Utiliser la largeur de colonne par défaut",
|
||||||
"type": "Type",
|
"type": "Type",
|
||||||
|
"replaceType": "Remplacer le type",
|
||||||
"searchBlockType": "Types de bloc (recherche dans les types activés ci-dessous, l'option de filtre dans la recherche globale remplace ce paramètre)",
|
"searchBlockType": "Types de bloc (recherche dans les types activés ci-dessous, l'option de filtre dans la recherche globale remplace ce paramètre)",
|
||||||
"searchBlockAttr": "Attributs de bloc (recherche non seulement dans le contenu, mais aussi dans les attributs activés suivants)",
|
"searchBlockAttr": "Attributs de bloc (recherche non seulement dans le contenu, mais aussi dans les attributs activés suivants)",
|
||||||
"searchIndex": "Index",
|
"searchIndex": "Index",
|
||||||
|
|
|
||||||
|
|
@ -445,6 +445,7 @@
|
||||||
"cancelMerged": "拆分單元格",
|
"cancelMerged": "拆分單元格",
|
||||||
"useDefaultWidth": "使用預設列寬",
|
"useDefaultWidth": "使用預設列寬",
|
||||||
"type": "類型",
|
"type": "類型",
|
||||||
|
"replaceType": "替換類型",
|
||||||
"searchBlockType": "塊級類型(在以下啟用的類型中進行搜索,全域搜索中的過濾選項會覆蓋該設置)",
|
"searchBlockType": "塊級類型(在以下啟用的類型中進行搜索,全域搜索中的過濾選項會覆蓋該設置)",
|
||||||
"searchBlockAttr": "塊級屬性(不僅在內容中進行搜索,同時也會在以下啟用的屬性中搜索)",
|
"searchBlockAttr": "塊級屬性(不僅在內容中進行搜索,同時也會在以下啟用的屬性中搜索)",
|
||||||
"searchIndex": "索引",
|
"searchIndex": "索引",
|
||||||
|
|
|
||||||
|
|
@ -445,6 +445,7 @@
|
||||||
"cancelMerged": "拆分单元格",
|
"cancelMerged": "拆分单元格",
|
||||||
"useDefaultWidth": "使用默认列宽",
|
"useDefaultWidth": "使用默认列宽",
|
||||||
"type": "类型",
|
"type": "类型",
|
||||||
|
"replaceType": "替换类型",
|
||||||
"searchBlockType": "块级类型(在以下启用的类型中进行搜索,全局搜索中的过滤选项会覆盖该设置)",
|
"searchBlockType": "块级类型(在以下启用的类型中进行搜索,全局搜索中的过滤选项会覆盖该设置)",
|
||||||
"searchBlockAttr": "块级属性(不仅在内容中进行搜索,同时也会在以下启用的属性中搜索)",
|
"searchBlockAttr": "块级属性(不仅在内容中进行搜索,同时也会在以下启用的属性中搜索)",
|
||||||
"searchIndex": "索引",
|
"searchIndex": "索引",
|
||||||
|
|
|
||||||
|
|
@ -498,7 +498,7 @@ const initSearchEvent = (app: App, element: Element, config: ISearchOption) => {
|
||||||
embedBlock: window.siyuan.config.search.embedBlock,
|
embedBlock: window.siyuan.config.search.embedBlock,
|
||||||
databaseBlock: window.siyuan.config.search.databaseBlock,
|
databaseBlock: window.siyuan.config.search.databaseBlock,
|
||||||
},
|
},
|
||||||
replaceTypes: Constants.SIYUAN_DEFAULT_REPLACETYPES,
|
replaceTypes: Object.assign({}, Constants.SIYUAN_DEFAULT_REPLACETYPES),
|
||||||
}, config);
|
}, config);
|
||||||
});
|
});
|
||||||
window.siyuan.menus.menu.fullscreen();
|
window.siyuan.menus.menu.fullscreen();
|
||||||
|
|
|
||||||
|
|
@ -239,7 +239,7 @@ export const getLocalStorage = (cb: () => void) => {
|
||||||
embedBlock: window.siyuan.config.search.embedBlock,
|
embedBlock: window.siyuan.config.search.embedBlock,
|
||||||
databaseBlock: window.siyuan.config.search.databaseBlock,
|
databaseBlock: window.siyuan.config.search.databaseBlock,
|
||||||
},
|
},
|
||||||
replaceTypes: Constants.SIYUAN_DEFAULT_REPLACETYPES,
|
replaceTypes: Object.assign({}, Constants.SIYUAN_DEFAULT_REPLACETYPES),
|
||||||
};
|
};
|
||||||
defaultStorage[Constants.LOCAL_ZOOM] = 1;
|
defaultStorage[Constants.LOCAL_ZOOM] = 1;
|
||||||
|
|
||||||
|
|
@ -267,7 +267,7 @@ export const getLocalStorage = (cb: () => void) => {
|
||||||
// 搜索数据添加 replaceTypes 兼容
|
// 搜索数据添加 replaceTypes 兼容
|
||||||
if (!window.siyuan.storage[Constants.LOCAL_SEARCHDATA].replaceTypes ||
|
if (!window.siyuan.storage[Constants.LOCAL_SEARCHDATA].replaceTypes ||
|
||||||
Object.keys(window.siyuan.storage[Constants.LOCAL_SEARCHDATA].replaceTypes).length === 0) {
|
Object.keys(window.siyuan.storage[Constants.LOCAL_SEARCHDATA].replaceTypes).length === 0) {
|
||||||
window.siyuan.storage[Constants.LOCAL_SEARCHDATA].replaceTypes = Constants.SIYUAN_DEFAULT_REPLACETYPES;
|
window.siyuan.storage[Constants.LOCAL_SEARCHDATA].replaceTypes = Object.assign({}, Constants.SIYUAN_DEFAULT_REPLACETYPES);
|
||||||
}
|
}
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -377,6 +377,13 @@ export const moreMenu = async (config: ISearchOption,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
|
iconHTML: "",
|
||||||
|
label: window.siyuan.languages.replaceType,
|
||||||
|
click() {
|
||||||
|
replaceFilterMenu(config);
|
||||||
|
}
|
||||||
|
}).element);
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
iconHTML: "",
|
iconHTML: "",
|
||||||
label: window.siyuan.languages.searchMethod,
|
label: window.siyuan.languages.searchMethod,
|
||||||
|
|
|
||||||
|
|
@ -477,7 +477,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
||||||
embedBlock: window.siyuan.config.search.embedBlock,
|
embedBlock: window.siyuan.config.search.embedBlock,
|
||||||
databaseBlock: window.siyuan.config.search.databaseBlock,
|
databaseBlock: window.siyuan.config.search.databaseBlock,
|
||||||
},
|
},
|
||||||
replaceTypes: Constants.SIYUAN_DEFAULT_REPLACETYPES,
|
replaceTypes: Object.assign({}, Constants.SIYUAN_DEFAULT_REPLACETYPES),
|
||||||
}, config, edit);
|
}, config, edit);
|
||||||
element.querySelector(".b3-chip--current")?.classList.remove("b3-chip--current");
|
element.querySelector(".b3-chip--current")?.classList.remove("b3-chip--current");
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
@ -693,7 +693,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
|
||||||
embedBlock: window.siyuan.config.search.embedBlock,
|
embedBlock: window.siyuan.config.search.embedBlock,
|
||||||
databaseBlock: window.siyuan.config.search.databaseBlock,
|
databaseBlock: window.siyuan.config.search.databaseBlock,
|
||||||
},
|
},
|
||||||
replaceTypes: Constants.SIYUAN_DEFAULT_REPLACETYPES,
|
replaceTypes: Object.assign({}, Constants.SIYUAN_DEFAULT_REPLACETYPES),
|
||||||
}, config, edit);
|
}, config, edit);
|
||||||
element.querySelector("#criteria .b3-chip--current")?.classList.remove("b3-chip--current");
|
element.querySelector("#criteria .b3-chip--current")?.classList.remove("b3-chip--current");
|
||||||
}, () => {
|
}, () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue