Skip to content

Commit

Permalink
feat: 优化帮助文档
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Jun 1, 2023
1 parent bc8c878 commit b626917
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 418 deletions.
7 changes: 5 additions & 2 deletions src/i18n/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"loading": "Loading",
"importFile": "Importing files",
"importTip": "Support .md, .epub, .docx, .html, .opml",
"importTipHelp": "Move the mouse up to view the help details",
"importSingleNotice": "Convert the document to a temporary Markdown file, then create the document",
"importFolder": "Batch Import",
"importFolderTip": "Batch import the supported files under the selected folder, and support mixed formats",
Expand All @@ -32,5 +33,7 @@
"clean": "Delete",
"tempCount": "temporary files",
"tempCountExists": "Please clean up the temporary files before batch import",
"supportedTypes": "Currently supported formats: .epub, .docx, .html, .opml"
}
"reportBug1": "Encounter problems? , to the developer terwer ",
"reportBug2": "feedback",
"reportBug3": " bar~"
}
12 changes: 9 additions & 3 deletions src/i18n/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,22 @@
"loading": "加载中",
"importFile": "单个导入",
"importTip": "支持.md, .epub, .docx, .html, .opml",
"importSingleNotice": "将文档转换成Markdown临时文件,然后创建文档",
"importTipHelp": "鼠标移上来查看帮助详情",
"importSingleNotice1": "1、将文档转换成Markdown临时文件,然后创建文档",
"importSingleNotice2": "2、html资源文件夹(仅PC客户端)必须是 [文件名]_files",
"importFolder": "批量导入",
"importFolderTip": "支持混合.epub,.docx,.html,.opml",
"importNotRecursive": "不递归,不支持MD,批量导入MD请使用笔记本自带功能",
"importNotRecursive1": "1、不递归",
"importNotRecursive2": "2、不支持MD,批量导入MD请使用笔记本自带功能。",
"importNotRecursive3": "3、html资源文件夹(仅PC客户端)必须是 [文件名]_files",
"importTipNotAllowed": "不允许的文件类型:",
"importError": "导入出错:",
"cleanTemp": "清理临时文件",
"tempTotal": "",
"clean": "删除",
"tempCount": "个临时文件",
"tempCountExists": "请先清理临时文件在进行批量导入",
"supportedTypes": "目前支持的格式:.md, .epub, .docx, .html, .opml"
"reportBug1": "遇到问题? 发邮件到 [email protected] 或者 给开发者 terwer ",
"reportBug2": "反馈一下",
"reportBug3": " 吧~"
}
33 changes: 27 additions & 6 deletions src/lib/ImportForm.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,10 @@
<div class="fn__flex b3-label config__item">
<div class="fn__flex-1 fn__flex-center">
{pluginInstance.i18n.importFile}
<div class="b3-label__text">
<div>{pluginInstance.i18n.importTip}</div>
<div class="highlight">{pluginInstance.i18n.importSingleNotice}</div>
<div class="b3-label__text tips">
<div>{pluginInstance.i18n.importTip} <span class="sign">({pluginInstance.i18n.importTipHelp})</span></div>
<div class="highlight">{pluginInstance.i18n.importSingleNotice1}</div>
<div class="highlight">{pluginInstance.i18n.importSingleNotice2}</div>
</div>
</div>
<span class="fn__space" />
Expand All @@ -249,8 +250,10 @@
<div class="fn__flex-1 fn__flex-center">
{pluginInstance.i18n.importFolder}
<div class="b3-label__text">
<div>{pluginInstance.i18n.importFolderTip}</div>
<div class="highlight">{pluginInstance.i18n.importNotRecursive}</div>
<div>{pluginInstance.i18n.importFolderTip} <span class="sign">({pluginInstance.i18n.importTipHelp})</span></div>
<div class="highlight">{pluginInstance.i18n.importNotRecursive1}</div>
<div class="highlight">{pluginInstance.i18n.importNotRecursive2}</div>
<div class="highlight">{pluginInstance.i18n.importNotRecursive3}</div>
</div>
</div>
<span class="fn__space" />
Expand Down Expand Up @@ -284,7 +287,11 @@
</button>
</div>

<div class="fn__flex b3-label config__item">{pluginInstance.i18n.supportedTypes}</div>
<div class="fn__flex b3-label config__item">
{pluginInstance.i18n.reportBug1}
&nbsp;<a href="https://github.com/terwer/siyuan-plugin-importer/issues/new" target="_blank">{pluginInstance.i18n.reportBug2}</a>&nbsp;
{pluginInstance.i18n.reportBug3}
</div>
</div>
</div>

Expand All @@ -300,10 +307,24 @@
.highlight {
color: red;
display: none; /* 初始状态下隐藏 */
}
.link {
color: var(--b3-theme-primary);
cursor: pointer;
}
.tips{
cursor: pointer;
}
.b3-label__text .sign{
cursor: pointer;
color: var(--b3-theme-primary);
}
.config__item:hover .highlight {
display: block;
}
</style>
Loading

0 comments on commit b626917

Please sign in to comment.