Vanessa 2024-04-25 21:03:21 +08:00
parent 1dc0b67d93
commit c5de82d91a

View file

@ -22,7 +22,14 @@ declare interface INotebookConf {
export const genNotebookOption = (id: string) => {
let html = `<option value="">${window.siyuan.languages.currentNotebook}</option>`;
const helpIds: string[] = [];
Object.keys(Constants.HELP_PATH).forEach((key: "zh_CN") => {
helpIds.push(Constants.HELP_PATH[key]);
});
window.siyuan.notebooks.forEach((item) => {
if (helpIds.includes(item.id)) {
return;
}
html += `<option value="${item.id}" ${id === item.id ? "selected" : ""}>${item.name}</option>`;
});
return html;