mirror of
https://github.com/insile/OpenWords.git
synced 2026-07-22 05:48:39 +00:00
2026/2/22
This commit is contained in:
parent
5a1774b64d
commit
39de9cfc20
6 changed files with 21 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "openwords",
|
||||
"name": "OpenWords",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"minAppVersion": "1.10.0",
|
||||
"description": "用于英语学习中背单词与单词管理的插件",
|
||||
"author": "insile",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "openwords",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"description": "用于英语学习中背单词与单词管理的插件",
|
||||
"main": "main.js",
|
||||
"type": "module",
|
||||
|
|
|
|||
|
|
@ -390,13 +390,12 @@ export default class OpenWords extends Plugin {
|
|||
...letterRows
|
||||
].join('\n');
|
||||
|
||||
await this.writeFile(mainIndexPath, '##### 英语单词索引\n\n' + mainContent);
|
||||
await this.writeFile(mainIndexPath, '##### 英语单词索引\n\n' + mainContent + '\n\n');
|
||||
|
||||
// 生成总计 .base 配置文件(总计列)
|
||||
notice.setMessage('索引中... 生成总计索引');
|
||||
const allBasePath = `${indexDir}/英语单词索引.总计.base`;
|
||||
const allBaseContent = `
|
||||
filters:
|
||||
const allBaseContent = `filters:
|
||||
and:
|
||||
- file.folder.startsWith("${wordsDir}")
|
||||
views:
|
||||
|
|
@ -432,9 +431,7 @@ ${Array.from({ length: 26 }, (_, i) => {
|
|||
notice.setMessage(`索引中... ${level.name}`);
|
||||
const basePath = `${indexDir}/英语单词索引.${level.name}.base`;
|
||||
|
||||
// 构建 DataviewJS 配置
|
||||
const baseContent = `
|
||||
filters:
|
||||
const baseContent = `filters:
|
||||
and:
|
||||
- file.folder.startsWith("${wordsDir}")
|
||||
- file.tags.contains("${level.tag}")
|
||||
|
|
|
|||
|
|
@ -20,6 +20,13 @@ export async function LearningPage(this: MainView) {
|
|||
this.render();
|
||||
};
|
||||
|
||||
// ESC 快捷键返回
|
||||
learningContainer.addEventListener('keydown', (event: KeyboardEvent) => {
|
||||
if (event.key === 'Escape') {
|
||||
backBtn.click();
|
||||
}
|
||||
});
|
||||
|
||||
this.renderCard(cardContainer);
|
||||
this.renderSettings(cardContainer, settingsContainer);
|
||||
|
||||
|
|
@ -198,7 +205,7 @@ export function registerRenderKeyEvents(this: MainView, learningContainer: HTMLD
|
|||
setTimeout(() => {
|
||||
cardContainer.addEventListener('mouseenter', showMarkdown);
|
||||
cardContainer.addEventListener('mouseleave', showWord);
|
||||
}, 1000);
|
||||
}, 0);
|
||||
|
||||
const handleKeyDown = async (event: KeyboardEvent) => {
|
||||
if (event.key === 'Tab') {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,13 @@ export async function SpellingPage(this: MainView) {
|
|||
this.render();
|
||||
};
|
||||
|
||||
// ESC 快捷键返回
|
||||
spellingContainer.addEventListener('keydown', (event: KeyboardEvent) => {
|
||||
if (event.key === 'Escape') {
|
||||
backBtn.click();
|
||||
}
|
||||
});
|
||||
|
||||
await this.renderInput(wordMeaningContainer, inputContainer, feedbackContainer);
|
||||
|
||||
// Tab键显示答案
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"1.0.9": "1.10.0"
|
||||
"1.0.10": "1.10.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue